Skip to content

Commit

Permalink
merge 4.0alpha1 for #18 which is subtask of #16
Browse files Browse the repository at this point in the history
  • Loading branch information
fklassen committed Dec 9, 2013
1 parent 9cba129 commit 77387f1
Show file tree
Hide file tree
Showing 147 changed files with 6,903 additions and 3,122 deletions.
2 changes: 1 addition & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -16493,7 +16493,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
CFLAGS="$OLD_CFLAGS $wfatal_errors"


for ac_header in fcntl.h stddef.h sys/socket.h arpa/inet.h sys/time.h signal.h string.h strings.h sys/types.h stdint.h sys/select.h netinet/in.h poll.h sys/poll.h unistd.h sys/param.h inttypes.h
for ac_header in fcntl.h stddef.h sys/socket.h arpa/inet.h sys/time.h signal.h string.h strings.h sys/types.h stdint.h sys/select.h netinet/in.h netinet/in_systm.h poll.h sys/poll.h unistd.h sys/param.h inttypes.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ CFLAGS="$OLD_CFLAGS $wfatal_errors"


dnl Check for other header files
AC_CHECK_HEADERS([fcntl.h stddef.h sys/socket.h arpa/inet.h sys/time.h signal.h string.h strings.h sys/types.h stdint.h sys/select.h netinet/in.h poll.h sys/poll.h unistd.h sys/param.h inttypes.h])
AC_CHECK_HEADERS([fcntl.h stddef.h sys/socket.h arpa/inet.h sys/time.h signal.h string.h strings.h sys/types.h stdint.h sys/select.h netinet/in.h netinet/in_systm.h poll.h sys/poll.h unistd.h sys/param.h inttypes.h])

dnl OpenBSD has special requirements
AC_CHECK_HEADERS([sys/sysctl.h net/route.h], [], [], [
Expand Down
1 change: 1 addition & 0 deletions docs/CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
$Id$

??/??/2013 Version 3.5.0
- Merge code cleanups from old 4.0alpha1 project (appneta #18)
- Deprecated file-cache option - use preload-pcap instead (appneta #17)
- Removed obsolete sleep-mode and sleep-accel options (appneta #16)
- Remove unreliable RDTSC option (appneta #16)
Expand Down
17 changes: 9 additions & 8 deletions docs/HACKING
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,15 @@ etc.

The file layout is pretty simple:

/ - Base directory
/lib - 3rd party libraries stolen verbatim
/libopts - GNU AutoOpts tearoff
/src - Main code routines
/src/common - Common routines for all binaries
/src/tcpedit - libtcpedit
/docs - Where to find documentation
/test - Test scripts and stuff which is used during 'make test'
/ - Base directory
/lib - 3rd party libraries stolen verbatim
/libopts - GNU AutoOpts tearoff
/src - Main code routines
/src/common - Common routines for all binaries
/src/tcpedit - libtcpedit
/src/tcpedit/plugins - plugins for libtcpedit (mostly DLT)
/docs - Where to find documentation
/test - Test scripts and stuff which is used during 'make test'

3. Coding Standards
1) Indent 4 spaces using spaces, not tabs
Expand Down
21 changes: 17 additions & 4 deletions doxygen.cfg.in
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ PROJECT_NAME = TCPREPLAY
# This could be handy for archiving the generated documentation or
# if some version control system is used.

PROJECT_NUMBER = @TCPREPLAY_VERSION@
PROJECT_NUMBER = @VERSION@

# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put.
Expand Down Expand Up @@ -461,7 +461,20 @@ libopts/compat \
libopts/autoopts \
src \
src/common \
src/tcpedit
src/tcpedit \
src/tcpedit/plugins \
src/tcpedit/plugins/dlt_en10mb \
src/tcpedit/plugins/dlt_hdlc \
src/tcpedit/plugins/dlt_ieee80211 \
src/tcpedit/plugins/dlt_jnpr_ether \
src/tcpedit/plugins/dlt_linuxsll \
src/tcpedit/plugins/dlt_loop \
src/tcpedit/plugins/dlt_null \
src/tcpedit/plugins/dlt_radiotap \
src/tcpedit/plugins/dlt_raw \
src/tcpedit/plugins/dlt_user \
src/gui \
src/fragroute

# If the value of the INPUT tag contains directories, you can use the
# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
Expand Down Expand Up @@ -494,7 +507,7 @@ EXCLUDE_SYMLINKS = NO
# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
# certain files from those directories.

EXCLUDE_PATTERNS =
EXCLUDE_PATTERNS = .git

# The EXAMPLE_PATH tag can be used to specify one or more files or
# directories that contain example code fragments that are included (see
Expand Down Expand Up @@ -567,7 +580,7 @@ INLINE_SOURCES = NO
# doxygen to hide any special comment blocks from generated source code
# fragments. Normal C and C++ comments will always remain visible.

STRIP_CODE_COMMENTS = YES
STRIP_CODE_COMMENTS = NO

# If the REFERENCED_BY_RELATION tag is set to YES (the default)
# then for each documented function all documented
Expand Down
9 changes: 0 additions & 9 deletions lib/sll.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,3 @@ struct sll_header {
#define LINUX_SLL_P_802_2 0x0004 /* 802.2 frames (not D/I/X Ethernet) */

#endif

/*
Local Variables:
mode:c
indent-tabs-mode:nil
c-basic-offset:4
End:
*/

9 changes: 9 additions & 0 deletions lib/strlcpy.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,19 @@

#include <sys/types.h>

#ifdef __cplusplus
extern "C" {
#endif


size_t
strlcpy(char *dst, const char *src, size_t size);

size_t
strlcat(char *dst, const char *src, size_t size);

#endif
#ifdef __cplusplus
}
#endif

38 changes: 23 additions & 15 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ else
LIBSTRL = ../lib/libstrl.a
endif

manpages: tcpprep.1 tcprewrite.1 tcpreplay.1 tcpbridge.1 tcpreplay-edit.1 tcpliveplay.1
manpages: tcpprep.1 tcprewrite.1 tcpreplay.1 tcpbridge.1 tcpreplay-edit.1 tcpliveplay.1 tcpcapinfo.1

autoopts: tcpreplay_opts.c tcprewrite_opts.c tcpbridge_opts.c tcpliveplay_opts.c manpages \
tcpreplay_edit_opts.c
autoopts: tcpreplay_opts.c tcprewrite_opts.c tcpbridge_opts.c tcpliveplay_opts.c tcpcapinfo_opts.c \
manpages tcpreplay_edit_opts.c


# Get AutoOpts search path
Expand All @@ -42,9 +42,12 @@ tcpbridge.1: tcpbridge_opts.def tcpedit/tcpedit_opts.def
tcpliveplay.1: tcpliveplay_opts.def
@AUTOGEN@ -T agman-cmd.tpl $(opts_list) tcpliveplay_opts.def || true

man_MANS = tcpreplay.1 tcpprep.1 tcprewrite.1 tcpreplay-edit.1
tcpcapinfo.1: tcpcapinfo_opts.def
@AUTOGEN@ -T agman-cmd.tpl $(opts_list) tcpcapinfo_opts.def || true

man_MANS = tcpreplay.1 tcpprep.1 tcprewrite.1 tcpreplay-edit.1 tcpcapinfo.1
EXTRA_DIST = tcpreplay.1 tcpprep.1 tcprewrite.1 tcpbridge.1 tcpreplay-edit.1 \
tcpliveplay.1 timestamp_trace.h
tcpliveplay.1 tcpcapinfo.1 timestamp_trace.h
bin_PROGRAMS = tcpreplay tcpprep tcprewrite tcpreplay-edit tcpcapinfo

if COMPILE_TCPBRIDGE
Expand All @@ -57,9 +60,9 @@ bin_PROGRAMS += tcpliveplay
man_MANS += tcpliveplay.1
endif

tcpreplay_edit_CFLAGS = $(LIBOPTS_CFLAGS) -I.. $(LNAV_CFLAGS) @LDNETINC@ -DTCPREPLAY -DTCPREPLAY_EDIT -DHAVE_CACHEFILE_SUPPORT
tcpreplay_edit_CFLAGS = $(LIBOPTS_CFLAGS) -I.. -Itcpedit $(LNAV_CFLAGS) @LDNETINC@ -DTCPREPLAY -DTCPREPLAY_EDIT -DHAVE_CACHEFILE_SUPPORT
tcpreplay_edit_LDADD = ./tcpedit/libtcpedit.a ./common/libcommon.a $(LIBSTRL) @LPCAPLIB@ @LDNETLIB@ $(LIBOPTS_LDADD)
tcpreplay_edit_SOURCES = tcpreplay_edit_opts.c send_packets.c signal_handler.c tcpreplay.c sleep.c
tcpreplay_edit_SOURCES = tcpreplay_edit_opts.c send_packets.c signal_handler.c tcpreplay.c sleep.c tcpreplay_api.c replay.c
tcpreplay_edit_OBJECTS: tcpreplay_opts.h
tcpreplay_edit_opts.h: tcpreplay_edit_opts.c

Expand All @@ -68,7 +71,7 @@ tcpreplay_edit_opts.c: tcpreplay_opts.def
tcpreplay_opts.def || true

tcpreplay_CFLAGS = $(LIBOPTS_CFLAGS) -I.. $(LNAV_CFLAGS) @LDNETINC@ -DTCPREPLAY
tcpreplay_SOURCES = tcpreplay_opts.c send_packets.c signal_handler.c tcpreplay.c sleep.c
tcpreplay_SOURCES = tcpreplay_opts.c send_packets.c signal_handler.c tcpreplay.c sleep.c tcpreplay_api.c replay.c
tcpreplay_LDADD = ./common/libcommon.a $(LIBSTRL) @LPCAPLIB@ @LDNETLIB@ $(LIBOPTS_LDADD)
tcpreplay_OBJECTS: tcpreplay_opts.h
tcpreplay_opts.h: tcpreplay_opts.c
Expand All @@ -91,7 +94,7 @@ tcpliveplay_opts.c: tcpliveplay_opts.def
@AUTOGEN@ $(opts_list) tcpliveplay_opts.def || true


tcprewrite_CFLAGS = $(LIBOPTS_CFLAGS) -I.. @LDNETINC@ $(LNAV_CFLAGS) -DTCPREWRITE -DHAVE_CACHEFILE_SUPPORT
tcprewrite_CFLAGS = $(LIBOPTS_CFLAGS) -I.. -Itcpedit @LDNETINC@ $(LNAV_CFLAGS) -DTCPREWRITE -DHAVE_CACHEFILE_SUPPORT
tcprewrite_LDADD = ./tcpedit/libtcpedit.a ./common/libcommon.a \
$(LIBSTRL) @LPCAPLIB@ $(LIBOPTS_LDADD) @DMALLOC_LIB@ \
$(LIBFRAGROUTE)
Expand All @@ -104,18 +107,23 @@ tcprewrite_opts.c: tcprewrite_opts.def tcpedit/tcpedit_opts.def
tcpcapinfo_CFLAGS = $(LIBOPTS_CFLAGS) -I.. $(LNAV_CFLAGS) @LDNETINC@ -DTCPCAPINFO
tcpcapinfo_LDADD = ./common/libcommon.a \
$(LIBSTRL) @LPCAPLIB@ $(LIBOPTS_LDADD) @DMALLOC_LIB@
tcpcapinfo_SOURCES = tcpcapinfo.c
tcpcapinfo_SOURCES = tcpcapinfo_opts.c tcpcapinfo.c
tcpcapinfo_OBJECTS: tcpcapinfo_opts.h
tcpcapinfo_opts.h: tcpcapinfo_opts.c

tcpcapinfo_opts.c: tcpcapinfo_opts.def
@AUTOGEN@ $(opts_list) tcpcapinfo_opts.def || true

tcpprep_CFLAGS = $(LIBOPTS_CFLAGS) -I.. $(LNAV_CFLAGS) @LDNETINC@ -DTCPPREP
tcpprep_LDADD = ./common/libcommon.a \
$(LIBSTRL) @LPCAPLIB@ $(LIBOPTS_LDADD) @DMALLOC_LIB@
tcpprep_SOURCES = tcpprep_opts.c tcpprep.c tree.c
tcpprep_SOURCES = tcpprep_opts.c tcpprep.c tree.c tcpprep_api.c
tcpprep_OBJECTS: tcpprep_opts.h
tcpprep_opts.h: tcpprep_opts.c
tcpprep_opts.c: tcpprep_opts.def
@AUTOGEN@ tcpprep_opts.def || true

tcpbridge_CFLAGS = $(LIBOPTS_CFLAGS) -I.. $(LNAV_CFLAGS) @LDNETINC@ -DTCPBRIDGE
tcpbridge_CFLAGS = $(LIBOPTS_CFLAGS) -I.. -Itcpedit $(LNAV_CFLAGS) @LDNETINC@ -DTCPBRIDGE
tcpbridge_LDADD = ./tcpedit/libtcpedit.a ./common/libcommon.a \
$(LIBSTRL) @LPCAPLIB@ @LDNETLIB@ $(LIBOPTS_LDADD) @DMALLOC_LIB@
if ENABLE_OSX_FRAMEWORKS
Expand All @@ -131,14 +139,14 @@ noinst_HEADERS = tcpreplay.h tcpprep.h bridge.h defines.h tree.h tcpliveplay.h \
send_packets.h signal_handler.h common.h tcpreplay_opts.h tcpliveplay_opts.h \
tcpreplay_edit_opts.h tcprewrite.h tcprewrite_opts.h tcpprep_opts.h \
tcpprep_opts.def tcprewrite_opts.def tcpreplay_opts.def tcpliveplay_opts.def \
tcpbridge_opts.def tcpbridge.h tcpbridge_opts.h tcpr.h sleep.h
tcpbridge_opts.def tcpbridge.h tcpbridge_opts.h tcpr.h sleep.h tcpcapinfo_opts.h


MOSTLYCLEANFILES = *~ *.o

MAINTAINERCLEANFILES = Makefile.in tcpreplay_opts.h tcpreplay_opts.c tcpliveplay_opts.c \
tcprewrite_opts.c tcprewrite_opts.h tcpprep_opts.c tcpliveplay_opts.h \
tcpprep_opts.h tcpprep.1 tcpreplay.1 tcprewrite.1 tcpliveplay.1 \
tcprewrite_opts.c tcprewrite_opts.h tcpprep_opts.c tcpliveplay_opts.h tcpcapinfo_opts.h \
tcpprep_opts.h tcpprep.1 tcpreplay.1 tcprewrite.1 tcpliveplay.1 tcpcapinfo.1 \
tcpbridge.1 tcpbridge_opts.h tcpbridge_opts.c \
tcpreplay_edit_opts.c tcpreplay_edit_opts.h \
tcpreplay-edit.1
Loading

0 comments on commit 77387f1

Please sign in to comment.