Browse Source

Import upstream version 3.3.1

Aaron Turner 13 years ago
parent
commit
16745a8624
100 changed files with 14251 additions and 6622 deletions
  1. 33 21
      Makefile.in
  2. 200 107
      aclocal.m4
  3. 7039 5929
      configure
  4. 109 28
      configure.ac
  5. 30 2
      docs/CHANGELOG
  6. 2 2
      docs/LICENSE
  7. 9 2
      docs/Makefile.in
  8. 16 10
      lib/Makefile.in
  9. 20 14
      libopts/Makefile.in
  10. 16 10
      scripts/Makefile.in
  11. BIN
      src/._Makefile.am
  12. BIN
      src/._tcpreplay_opts.def
  13. 30 12
      src/Makefile.am
  14. 117 54
      src/Makefile.in
  15. 1 0
      src/common.h
  16. BIN
      src/common/._sendpacket.c
  17. 2 2
      src/common/Makefile.am
  18. 21 14
      src/common/Makefile.in
  19. 1 1
      src/common/cache.c
  20. 5 1
      src/common/err.h
  21. 12 12
      src/common/get.c
  22. 1 1
      src/common/interface.c
  23. 79 0
      src/common/rdtsc.c
  24. 125 0
      src/common/rdtsc.h
  25. 131 53
      src/common/sendpacket.c
  26. 3 2
      src/common/sendpacket.h
  27. 1 1
      src/common/svn_version.c
  28. 12 16
      src/common/timer.c
  29. 127 10
      src/common/timer.h
  30. 1 27
      src/common/utils.c
  31. 1 2
      src/common/utils.h
  32. 12 0
      src/config.h.in
  33. 71 1
      src/defines.h
  34. 71 1
      src/defines.h.in
  35. 29 0
      src/fragroute/LICENSE
  36. 18 0
      src/fragroute/Makefile.am
  37. 794 0
      src/fragroute/Makefile.in
  38. 33 0
      src/fragroute/README
  39. 68 0
      src/fragroute/argv.c
  40. 15 0
      src/fragroute/argv.h
  41. 1592 0
      src/fragroute/bget.c
  42. 30 0
      src/fragroute/bget.h
  43. 141 0
      src/fragroute/fragroute.c
  44. 69 0
      src/fragroute/fragroute.h
  45. 183 0
      src/fragroute/mod.c
  46. 27 0
      src/fragroute/mod.h
  47. 97 0
      src/fragroute/mod_delay.c
  48. 97 0
      src/fragroute/mod_drop.c
  49. 100 0
      src/fragroute/mod_dup.c
  50. 57 0
      src/fragroute/mod_echo.c
  51. 125 0
      src/fragroute/mod_ip_chaff.c
  52. 171 0
      src/fragroute/mod_ip_frag.c
  53. 91 0
      src/fragroute/mod_ip_opt.c
  54. 69 0
      src/fragroute/mod_ip_tos.c
  55. 73 0
      src/fragroute/mod_ip_ttl.c
  56. 79 0
      src/fragroute/mod_order.c
  57. 326 0
      src/fragroute/mod_print.c
  58. 177 0
      src/fragroute/mod_tcp_chaff.c
  59. 91 0
      src/fragroute/mod_tcp_opt.c
  60. 150 0
      src/fragroute/mod_tcp_seg.c
  61. 280 0
      src/fragroute/pkt.c
  62. 79 0
      src/fragroute/pkt.h
  63. 49 0
      src/fragroute/randutil.c
  64. 14 0
      src/fragroute/randutil.h
  65. 237 101
      src/send_packets.c
  66. 101 0
      src/sleep.c
  67. 146 0
      src/sleep.h
  68. 16 3
      src/tcpbridge.1
  69. 2 2
      src/tcpbridge.c
  70. 6 1
      src/tcpbridge.h
  71. 77 55
      src/tcpbridge_opts.c
  72. 3 3
      src/tcpbridge_opts.def
  73. 47 45
      src/tcpbridge_opts.h
  74. BIN
      src/tcpedit/._dlt.c
  75. BIN
      src/tcpedit/._tcpedit.c
  76. 16 10
      src/tcpedit/Makefile.in
  77. 40 1
      src/tcpedit/edit_packet.c
  78. 3 1
      src/tcpedit/edit_packet.h
  79. 22 4
      src/tcpedit/parse_args.c
  80. BIN
      src/tcpedit/plugins/._dlt_plugins.c
  81. BIN
      src/tcpedit/plugins/._dlt_plugins.h
  82. 1 1
      src/tcpedit/plugins/dlt_en10mb/en10mb.c
  83. 1 1
      src/tcpedit/plugins/dlt_hdlc/hdlc.c
  84. 1 1
      src/tcpedit/plugins/dlt_ieee80211/ieee80211.c
  85. 5 3
      src/tcpedit/plugins/dlt_ieee80211/ieee80211.h
  86. 1 1
      src/tcpedit/plugins/dlt_linuxsll/linuxsll.c
  87. 5 4
      src/tcpedit/plugins/dlt_linuxsll/linuxsll.h
  88. 1 1
      src/tcpedit/plugins/dlt_null/null.c
  89. 5 3
      src/tcpedit/plugins/dlt_null/null.h
  90. 3 1
      src/tcpedit/plugins/dlt_plugins.c
  91. 3 2
      src/tcpedit/plugins/dlt_radiotap/radiotap.h
  92. 1 1
      src/tcpedit/plugins/dlt_raw/raw.c
  93. 5 3
      src/tcpedit/plugins/dlt_raw/raw.h
  94. 3 2
      src/tcpedit/plugins/dlt_user/user.h
  95. 10 3
      src/tcpedit/tcpedit-int.h
  96. 8 3
      src/tcpedit/tcpedit.c
  97. 17 0
      src/tcpedit/tcpedit_opts.def
  98. 29 27
      src/tcpedit/tcpedit_stub.h
  99. 14 4
      src/tcpprep.1
  100. 0 0
      src/tcpprep.c

+ 33 - 21
Makefile.in

@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.10 from Makefile.am.
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -85,6 +85,7 @@ CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CUT = @CUT@
 CXX = @CXX@
 CXXCPP = @CXXCPP@
 CXXDEPMODE = @CXXDEPMODE@
@@ -92,6 +93,8 @@ CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DMALLOC_LIB = @DMALLOC_LIB@
+DSYMUTIL = @DSYMUTIL@
 ECHO = @ECHO@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
@@ -107,6 +110,8 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
 LDFLAGS = @LDFLAGS@
+LDNETINC = @LDNETINC@
+LDNETLIB = @LDNETLIB@
 LIBOBJS = @LIBOBJS@
 LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@
 LIBOPTS_DIR = @LIBOPTS_DIR@
@@ -124,6 +129,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
+NMEDIT = @NMEDIT@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -200,6 +206,7 @@ target_cpu = @target_cpu@
 target_os = @target_os@
 target_vendor = @target_vendor@
 tcpdump_path = @tcpdump_path@
+top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 
@@ -339,8 +346,8 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS
 
@@ -365,8 +372,8 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
 	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
@@ -376,13 +383,12 @@ ctags: CTAGS
 CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
 	tags=; \
-	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	test -z "$(CTAGS_ARGS)$$tags$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
 	     $$tags $$unique
@@ -456,6 +462,10 @@ dist-bzip2: distdir
 	tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
 	$(am__remove_distdir)
 
+dist-lzma: distdir
+	tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
+	$(am__remove_distdir)
+
 dist-tarZ: distdir
 	tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
 	$(am__remove_distdir)
@@ -482,6 +492,8 @@ distcheck: dist
 	  GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
 	*.tar.bz2*) \
 	  bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
+	*.tar.lzma*) \
+	  unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
 	*.tar.Z*) \
 	  uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
 	*.shar.gz*) \
@@ -636,18 +648,18 @@ uninstall-am:
 .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
 	all all-am am--refresh check check-am clean clean-generic \
 	clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \
-	dist-gzip dist-hook dist-shar dist-tarZ dist-zip distcheck \
-	distclean distclean-generic distclean-libtool distclean-local \
-	distclean-tags distcleancheck distdir distuninstallcheck dvi \
-	dvi-am html html-am info info-am install install-am \
-	install-data install-data-am install-dvi install-dvi-am \
-	install-exec install-exec-am install-html install-html-am \
-	install-info install-info-am install-man install-pdf \
-	install-pdf-am install-ps install-ps-am install-strip \
-	installcheck installcheck-am installdirs installdirs-am \
-	maintainer-clean maintainer-clean-generic mostlyclean \
-	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-	tags tags-recursive uninstall uninstall-am
+	dist-gzip dist-hook dist-lzma dist-shar dist-tarZ dist-zip \
+	distcheck distclean distclean-generic distclean-libtool \
+	distclean-local distclean-tags distcleancheck distdir \
+	distuninstallcheck dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	installdirs-am maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+	ps ps-am tags tags-recursive uninstall uninstall-am
 
 .PHONY: manpages docs test man2html
 

+ 200 - 107
aclocal.m4

@@ -1,7 +1,7 @@
-# generated automatically by aclocal 1.10 -*- Autoconf -*-
+# generated automatically by aclocal 1.10.1 -*- Autoconf -*-
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006  Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -11,14 +11,17 @@
 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 # PARTICULAR PURPOSE.
 
-m4_if(m4_PACKAGE_VERSION, [2.61],,
-[m4_fatal([this file was generated for autoconf 2.61.
-You have another version of autoconf.  If you want to use that,
-you should regenerate the build system entirely.], [63])])
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(AC_AUTOCONF_VERSION, [2.62],,
+[m4_warning([this file was generated for autoconf 2.62.
+You have another version of autoconf.  It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically `autoreconf'.])])
 
 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
 
-# serial 51 AC_PROG_LIBTOOL
+# serial 52 AC_PROG_LIBTOOL
 
 
 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
@@ -106,7 +109,6 @@ AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
 AC_REQUIRE([AC_OBJEXT])dnl
 AC_REQUIRE([AC_EXEEXT])dnl
 dnl
-
 AC_LIBTOOL_SYS_MAX_CMD_LEN
 AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
 AC_LIBTOOL_OBJDIR
@@ -208,6 +210,8 @@ file_magic*)
   ;;
 esac
 
+_LT_REQUIRED_DARWIN_CHECKS
+
 AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
 enable_win32_dll=yes, enable_win32_dll=no)
@@ -287,9 +291,80 @@ ac_outfile=conftest.$ac_objext
 echo "$lt_simple_link_test_code" >conftest.$ac_ext
 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
 _lt_linker_boilerplate=`cat conftest.err`
-$rm conftest*
+$rm -r conftest*
 ])# _LT_LINKER_BOILERPLATE
 
+# _LT_REQUIRED_DARWIN_CHECKS
+# --------------------------
+# Check for some things on darwin
+AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[
+  case $host_os in
+    rhapsody* | darwin*)
+    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
+    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
+
+    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
+      [lt_cv_apple_cc_single_mod=no
+      if test -z "${LT_MULTI_MODULE}"; then
+   # By default we will add the -single_module flag. You can override
+   # by either setting the environment variable LT_MULTI_MODULE
+   # non-empty at configure time, or by adding -multi_module to the
+   # link flags.
+   echo "int foo(void){return 1;}" > conftest.c
+   $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+     -dynamiclib ${wl}-single_module conftest.c
+   if test -f libconftest.dylib; then
+     lt_cv_apple_cc_single_mod=yes
+     rm -rf libconftest.dylib*
+   fi
+   rm conftest.c
+      fi])
+    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
+      [lt_cv_ld_exported_symbols_list],
+      [lt_cv_ld_exported_symbols_list=no
+      save_LDFLAGS=$LDFLAGS
+      echo "_main" > conftest.sym
+      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
+      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+   [lt_cv_ld_exported_symbols_list=yes],
+   [lt_cv_ld_exported_symbols_list=no])
+   LDFLAGS="$save_LDFLAGS"
+    ])
+    case $host_os in
+    rhapsody* | darwin1.[[0123]])
+      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+    darwin1.*)
+     _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+    darwin*)
+      # if running on 10.5 or later, the deployment target defaults
+      # to the OS version, if on x86, and 10.4, the deployment
+      # target defaults to 10.4. Don't you love it?
+      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+   10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
+     _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+   10.[[012]]*)
+     _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+   10.*)
+     _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+      esac
+    ;;
+  esac
+    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
+      _lt_dar_single_mod='$single_module'
+    fi
+    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
+      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
+    else
+      _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}"
+    fi
+    if test "$DSYMUTIL" != ":"; then
+      _lt_dsymutil="~$DSYMUTIL \$lib || :"
+    else
+      _lt_dsymutil=
+    fi
+    ;;
+  esac
+])
 
 # _LT_AC_SYS_LIBPATH_AIX
 # ----------------------
@@ -614,7 +689,11 @@ sparc*-*solaris*)
     *64-bit*)
       case $lt_cv_prog_gnu_ld in
       yes*) LD="${LD-ld} -m elf64_sparc" ;;
-      *)    LD="${LD-ld} -64" ;;
+      *)
+        if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
+	  LD="${LD-ld} -64"
+	fi
+	;;
       esac
       ;;
     esac
@@ -707,7 +786,7 @@ AC_CACHE_CHECK([$1], [$2],
        $2=yes
      fi
    fi
-   $rm conftest*
+   $rm -r conftest*
    LDFLAGS="$save_LDFLAGS"
 ])
 
@@ -978,7 +1057,7 @@ else
     AC_CHECK_FUNC([shl_load],
 	  [lt_cv_dlopen="shl_load"],
       [AC_CHECK_LIB([dld], [shl_load],
-	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
+	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
 	[AC_CHECK_FUNC([dlopen],
 	      [lt_cv_dlopen="dlopen"],
 	  [AC_CHECK_LIB([dl], [dlopen],
@@ -986,7 +1065,7 @@ else
 	    [AC_CHECK_LIB([svld], [dlopen],
 		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
 	      [AC_CHECK_LIB([dld], [dld_link],
-		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
+		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
 	      ])
 	    ])
 	  ])
@@ -1303,7 +1382,7 @@ aix3*)
   soname_spec='${libname}${release}${shared_ext}$major'
   ;;
 
-aix4* | aix5*)
+aix[[4-9]]*)
   version_type=linux
   need_lib_prefix=no
   need_version=no
@@ -1824,6 +1903,13 @@ esac
 AC_MSG_RESULT([$dynamic_linker])
 test "$dynamic_linker" = no && can_build_shared=no
 
+AC_CACHE_VAL([lt_cv_sys_lib_search_path_spec],
+[lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"])
+sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+AC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec],
+[lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"])
+sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+
 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
 if test "$GCC" = yes; then
   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
@@ -2323,7 +2409,7 @@ lt_cv_deplibs_check_method='unknown'
 # whether `pass_all' will *always* work, you probably want this one.
 
 case $host_os in
-aix4* | aix5*)
+aix[[4-9]]*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
@@ -2759,7 +2845,7 @@ aix3*)
   fi
   ;;
 
-aix4* | aix5*)
+aix[[4-9]]*)
   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
     test "$enable_shared" = yes && enable_static=no
   fi
@@ -2816,6 +2902,7 @@ _LT_AC_TAGVAR(postdep_objects, $1)=
 _LT_AC_TAGVAR(predeps, $1)=
 _LT_AC_TAGVAR(postdeps, $1)=
 _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
+_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
 
 # Source file extension for C++ test sources.
 ac_ext=cpp
@@ -2925,7 +3012,7 @@ case $host_os in
     # FIXME: insert proper C++ library support
     _LT_AC_TAGVAR(ld_shlibs, $1)=no
     ;;
-  aix4* | aix5*)
+  aix[[4-9]]*)
     if test "$host_cpu" = ia64; then
       # On IA64, the linker does run time linking by default, so we don't
       # have to do anything special.
@@ -2938,7 +3025,7 @@ case $host_os in
       # Test if we are trying to use run time linking or normal
       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
       # need to do runtime linking.
-      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
+      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
 	for ld_flag in $LDFLAGS; do
 	  case $ld_flag in
 	  *-brtl*)
@@ -3084,51 +3171,23 @@ case $host_os in
     fi
   ;;
       darwin* | rhapsody*)
-        case $host_os in
-        rhapsody* | darwin1.[[012]])
-         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
-         ;;
-       *) # Darwin 1.3 on
-         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
-           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
-         else
-           case ${MACOSX_DEPLOYMENT_TARGET} in
-             10.[[012]])
-               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
-               ;;
-             10.*)
-               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
-               ;;
-           esac
-         fi
-         ;;
-        esac
       _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
       _LT_AC_TAGVAR(hardcode_direct, $1)=no
       _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-
-    if test "$GXX" = yes ; then
-      lt_int_apple_cc_single_mod=no
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
+      if test "$GXX" = yes ; then
       output_verbose_link_cmd='echo'
-      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
-       lt_int_apple_cc_single_mod=yes
+      _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+      _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+      _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+      if test "$lt_cv_apple_cc_single_mod" != "yes"; then
+        _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
+        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
       fi
-      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
-      else
-          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
-        fi
-        _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
-        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-          else
-            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-          fi
-            _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
       else
       case $cc_basename in
         xlc*)
@@ -3379,7 +3438,7 @@ case $host_os in
 	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
 	;;
-      pgCC*)
+      pgCC* | pgcpp*)
         # Portland Group C++ compiler
 	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
   	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
@@ -3814,7 +3873,8 @@ lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
 # compiler output when linking a shared library.
 # Parse the compiler output and extract the necessary
 # objects, libraries and library flags.
-AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
+AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
 dnl we can't use the lt_simple_compile_test_code here,
 dnl because it contains code intended for an executable,
 dnl not a library.  It's possible we should let each
@@ -3939,6 +3999,11 @@ fi
 
 $rm -f confest.$objext
 
+_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
+if test -n "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
+  _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_AC_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
+fi
+
 # PORTME: override above test on systems where it is broken
 ifelse([$1],[CXX],
 [case $host_os in
@@ -3995,7 +4060,6 @@ solaris*)
   ;;
 esac
 ])
-
 case " $_LT_AC_TAGVAR(postdeps, $1) " in
 *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
 esac
@@ -4080,7 +4144,7 @@ aix3*)
     postinstall_cmds='$RANLIB $lib'
   fi
   ;;
-aix4* | aix5*)
+aix[[4-9]]*)
   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
     test "$enable_shared" = yes && enable_static=no
   fi
@@ -4257,6 +4321,7 @@ if test -f "$ltmain"; then
     _LT_AC_TAGVAR(predeps, $1) \
     _LT_AC_TAGVAR(postdeps, $1) \
     _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
+    _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \
     _LT_AC_TAGVAR(archive_cmds, $1) \
     _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
     _LT_AC_TAGVAR(postinstall_cmds, $1) \
@@ -4319,7 +4384,7 @@ ifelse([$1], [],
 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
 #
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
 # Free Software Foundation, Inc.
 #
 # This file is part of GNU Libtool:
@@ -4556,6 +4621,10 @@ predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
 # shared library.
 postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
 
+# The directories searched by this compiler when creating a shared
+# library
+compiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)
+
 # The library search path used internally by the compiler when linking
 # a shared library.
 compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
@@ -4905,7 +4974,7 @@ EOF
     echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
     cat conftest.$ac_ext >&5
   fi
-  rm -f conftest* conftst*
+  rm -rf conftest* conftst*
 
   # Do not use the global_symbol_pipe unless it works.
   if test "$pipe_works" = yes; then
@@ -4962,7 +5031,8 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
       # built for inclusion in a dll (and should export symbols for example).
       # Although the cygwin gcc ignores -fPIC, still need this for old-style
       # (--disable-auto-import) libraries
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+      m4_if([$1], [GCJ], [],
+	[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
       ;;
     darwin* | rhapsody*)
       # PIC is the default on this platform
@@ -4999,7 +5069,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
     esac
   else
     case $host_os in
-      aix4* | aix5*)
+      aix[[4-9]]*)
 	# All AIX code is PIC.
 	if test "$host_cpu" = ia64; then
 	  # AIX 5 now supports IA64 processor
@@ -5095,7 +5165,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
 	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
 	    ;;
-	  pgCC*)
+	  pgCC* | pgcpp*)
 	    # Portland Group C++ compiler.
 	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
@@ -5246,7 +5316,8 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
       # built for inclusion in a dll (and should export symbols for example).
       # Although the cygwin gcc ignores -fPIC, still need this for old-style
       # (--disable-auto-import) libraries
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+      m4_if([$1], [GCJ], [],
+	[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
       ;;
 
     darwin* | rhapsody*)
@@ -5316,7 +5387,8 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
     mingw* | cygwin* | pw32* | os2*)
       # This hack is so that the source file can tell whether it is being
       # built for inclusion in a dll (and should export symbols for example).
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+      m4_if([$1], [GCJ], [],
+	[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
       ;;
 
     hpux9* | hpux10* | hpux11*)
@@ -5453,7 +5525,7 @@ AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
 #
 if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
   AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
-    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
+    _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1),
     [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
     [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
      "" | " "*) ;;
@@ -5477,7 +5549,7 @@ esac
 #
 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
 AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
-  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
+  _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1),
   $lt_tmp_static_flag,
   [],
   [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
@@ -5493,7 +5565,7 @@ AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
 ifelse([$1],[CXX],[
   _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
   case $host_os in
-  aix4* | aix5*)
+  aix[[4-9]]*)
     # If we're using GNU nm, then we don't want the "-C" option.
     # -C means demangle to AIX nm, but means don't demangle with GNU nm
     if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
@@ -5512,6 +5584,7 @@ ifelse([$1],[CXX],[
     _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
   ;;
   esac
+  _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
 ],[
   runpath_var=
   _LT_AC_TAGVAR(allow_undefined_flag, $1)=
@@ -5542,12 +5615,14 @@ ifelse([$1],[CXX],[
   # it will be wrapped by ` (' and `)$', so one must not match beginning or
   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
   # as well as any symbol that contains `d'.
-  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
+  _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
   # platforms (ab)use it in PIC code, but their linkers get confused if
   # the symbol is explicitly referenced.  Since portable code cannot
   # rely on this symbol name, it's probably fine to never include it in
   # preloaded symbol tables.
+  # Exclude shared library initialization/finalization symbols.
+dnl Note also adjust exclude_expsyms for C++ above.
   extract_expsyms_cmds=
   # Just being paranoid about ensuring that cc_basename is set.
   _LT_CC_BASENAME([$compiler])
@@ -5597,7 +5672,7 @@ ifelse([$1],[CXX],[
 
     # See if GNU ld supports shared libraries.
     case $host_os in
-    aix3* | aix4* | aix5*)
+    aix[[3-9]]*)
       # On AIX/PPC, the GNU linker is very broken
       if test "$host_cpu" != ia64; then
 	_LT_AC_TAGVAR(ld_shlibs, $1)=no
@@ -5816,7 +5891,7 @@ _LT_EOF
       fi
       ;;
 
-    aix4* | aix5*)
+    aix[[4-9]]*)
       if test "$host_cpu" = ia64; then
 	# On IA64, the linker does run time linking by default, so we don't
 	# have to do anything special.
@@ -5836,7 +5911,7 @@ _LT_EOF
 	# Test if we are trying to use run time linking or normal
 	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
 	# need to do runtime linking.
-	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
+	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
 	  for ld_flag in $LDFLAGS; do
   	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
   	    aix_use_runtimelinking=yes
@@ -5969,25 +6044,7 @@ _LT_EOF
       ;;
 
     darwin* | rhapsody*)
-      case $host_os in
-        rhapsody* | darwin1.[[012]])
-         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
-         ;;
-       *) # Darwin 1.3 on
-         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
-           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
-         else
-           case ${MACOSX_DEPLOYMENT_TARGET} in
-             10.[[012]])
-               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
-               ;;
-             10.*)
-               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
-               ;;
-           esac
-         fi
-         ;;
-      esac
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
       _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
       _LT_AC_TAGVAR(hardcode_direct, $1)=no
       _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
@@ -5996,11 +6053,10 @@ _LT_EOF
       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
     if test "$GCC" = yes ; then
     	output_verbose_link_cmd='echo'
-        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
-      _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
-      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-      _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+        _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+        _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+        _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
     else
       case $cc_basename in
         xlc*)
@@ -6581,7 +6637,7 @@ AC_SUBST([SED])
 AC_MSG_RESULT([$SED])
 ])
 
-# Copyright (C) 2002, 2003, 2005, 2006  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2005, 2006, 2007  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -6596,7 +6652,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
 [am__api_version='1.10'
 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.10], [],
+m4_if([$1], [1.10.1], [],
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 ])
 
@@ -6612,8 +6668,10 @@ m4_define([_AM_AUTOCONF_VERSION], [])
 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.10])dnl
-_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)])
+[AM_AUTOMAKE_VERSION([1.10.1])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)])
 
 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
@@ -6885,7 +6943,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
   # each Makefile.in and add a new line on top of each file to say so.
   # Grep'ing the whole file is not good either: AIX grep has a line
   # limit of 2048, but all sed's we know have understand at least 4000.
-  if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
+  if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
     dirpart=`AS_DIRNAME("$mf")`
   else
     continue
@@ -6973,13 +7031,13 @@ AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
 # Do all the work for Automake.                             -*- Autoconf -*-
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006 Free Software Foundation, Inc.
+# 2005, 2006, 2008 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 12
+# serial 13
 
 # This macro actually does too much.  Some checks are only needed if
 # your package does certain things.  But this isn't really a big deal.
@@ -7084,16 +7142,17 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJC],
 # our stamp files there.
 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
 [# Compute $1's index in $config_headers.
+_am_arg=$1
 _am_stamp_count=1
 for _am_header in $config_headers :; do
   case $_am_header in
-    $1 | $1:* )
+    $_am_arg | $_am_arg:* )
       break ;;
     * )
       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
   esac
 done
-echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 #
@@ -7211,6 +7270,40 @@ AC_MSG_RESULT([$_am_result])
 rm -f confinc confmf
 ])
 
+# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 5
+
+# AM_PROG_CC_C_O
+# --------------
+# Like AC_PROG_CC_C_O, but changed for automake.
+AC_DEFUN([AM_PROG_CC_C_O],
+[AC_REQUIRE([AC_PROG_CC_C_O])dnl
+AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([compile])dnl
+# FIXME: we rely on the cache variable name because
+# there is no other way.
+set dummy $CC
+ac_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
+if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
+   # Losing compiler, so override with the script.
+   # FIXME: It is wrong to rewrite CC.
+   # But if we don't then we get into trouble of one sort or another.
+   # A longer-term fix would be to have automake use am__CC in this case,
+   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+   CC="$am_aux_dir/compile $CC"
+fi
+dnl Make sure AC_PROG_CC is never called again, or it will override our
+dnl setting of CC.
+m4_define([AC_PROG_CC],
+          [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
+])
+
 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
@@ -7394,7 +7487,7 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
 # _AM_SUBST_NOTMAKE(VARIABLE)
 # ---------------------------
-# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in.
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
 # This macro is traced by Automake.
 AC_DEFUN([_AM_SUBST_NOTMAKE])
 

File diff suppressed because it is too large
+ 7039 - 5929
configure


+ 109 - 28
configure.ac

@@ -1,5 +1,5 @@
 
-dnl $Id: configure.ac 1954 2008-01-17 06:10:31Z aturner $
+dnl $Id: configure.ac 2029 2008-05-17 17:45:36Z aturner $
 
 AC_INIT(tcpreplay)
 AC_CONFIG_SRCDIR(src/tcpreplay.c)
@@ -8,10 +8,14 @@ AC_CONFIG_AUX_DIR(config)
 AM_MAINTAINER_MODE
 AM_WITH_DMALLOC
 
+dnl People building from SVN need the same version of Autogen as I'm using
+dnl or specify --disable-local-libopts
+MAINTAINER_AUTOGEN_VERSION=5.9.2
+
 dnl Set version info here!
 MAJOR_VERSION=3
-MINOR_VERSION=2
-MICRO_VERSION=4
+MINOR_VERSION=3
+MICRO_VERSION=1
 TCPREPLAY_VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION
 
 dnl Release is only used for the RPM spec file
@@ -47,7 +51,7 @@ AM_INIT_AUTOMAKE(tcpreplay, $TCPREPLAY_VERSION, nodefine)
 dnl Checks for programs.
 AC_PROG_INSTALL
 AC_PROG_LIBTOOL
-AC_PROG_CC
+AM_PROG_CC_C_O
 AC_PROG_CC_STDC
 AC_PROG_CXX
 AC_PROG_CPP
@@ -58,23 +62,43 @@ AC_PROG_SED
 AC_PROG_MAKE_SET
 AC_EXEEXT
 AC_PATH_PROG(PRINTF, printf)
-AC_PATH_PROG(AUTOGEN, autogen)
 AC_PATH_PROG(ECHO, echo)
+AC_PATH_PROG(CUT, cut)
+AC_PATH_PROG(AUTOGEN, autogen)
 
 dnl check autogen version
+AUTOGEN_VERSION=unknown
 if test -n "${AUTOGEN}" ; then
-	AC_MSG_CHECKING(for autogen version >= 5.9)
-	AUTOGEN_VERSION=`${AUTOGEN} -v | ${SED} 's|.*\([[0-9\.]]\{3,\}\)$|\1|'`
-	AUTOGEN_MAJOR=`echo ${AUTOGEN_VERSION} | ${SED} 's|^\([[0-9]]\)\.[[0-9]]|\1|'`
-	AUTOGEN_MINOR=`echo ${AUTOGEN_VERSION} | ${SED} 's|^\([[0-9]]\)\.\([[0-9]]\)|\2|'`
-	if test ${AUTOGEN_MAJOR} -le 5 && test ${AUTOGEN_MINOR} -lt 9 || test ${AUTOGEN_MAJOR} -lt 5 ; then
+	AC_MSG_CHECKING(for autogen version >= 5.9.x)
+	${AUTOGEN} -v >autogen.version
+	AUTOGEN_VERSION=`cat autogen.version | ${SED} 's|.*\([[0-9\.]]\{5,\}\).*|\1|'`
+	AUTOGEN_MAJOR=`echo ${AUTOGEN_VERSION} | ${CUT} -d '.' -f 1`
+	AUTOGEN_MINOR=`echo ${AUTOGEN_VERSION} | ${CUT} -d '.' -f 2`
+	if ( test ${AUTOGEN_MAJOR} -eq 5 && test ${AUTOGEN_MINOR} -lt 9 ) || test ${AUTOGEN_MAJOR} -lt 5 ; then
 		AC_MSG_RESULT(no)
-		AC_MSG_WARN([${AUTOGEN} is too old (${AUTOGEN_VERSION}) for building from SVN.  Please upgrade to 5.9)])
+		AC_MSG_WARN([${AUTOGEN} is too old (${AUTOGEN_VERSION}) for building from SVN.  Please upgrade to 5.9.x)])
 	else
 		AC_MSG_RESULT(yes)
 	fi
+	rm -f autogen.version
+	
+	dnl Compare the installed version with the maintainer version if building from SVN and not using system libopts
+    if test ! -f src/tcpreplay_opts.c && test $enable_local_libopts == yes ; then
+        if test $MAINTAINER_AUTOGEN_VERSION != $AUTOGEN_VERSION ; then
+            AC_MSG_ERROR([Your version of autogen ($AUTOGEN_VERSION) != libopts tear off ($MAINTAINER_AUTOGEN_VERSION)  Either install the correct version or specify --disable-local-libopts])
+        fi
+    fi
+else
+    if test ! -f src/tcpreplay_opts.c ; then
+    	AC_MSG_ERROR([Please install GNU autogen >= 5.9.x if you are building from SVN])
+    fi
+fi
+AC_DEFINE([AUTOGEN_VERSION], [${AUTOGEN_VERSION}], [What version of autogen is installed on this system])
+
+if test $enable_local_libopts == yes ; then
+    AC_MSG_NOTICE([Using included libopts tearoff])
 else
-	AC_MSG_WARN([Please install autogen >= 5.9 if you are building from SVN])
+    AC_MSG_NOTICE([Using system libopts])
 fi
 
 AC_HEADER_STDC
@@ -132,7 +156,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 sys/select.h netinet/in.h poll.h sys/poll.h unistd.h sys/param.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 poll.h sys/poll.h unistd.h sys/param.h])
 
 dnl OpenBSD has special requirements
 AC_CHECK_HEADERS([sys/sysctl.h net/route.h], [], [], [
@@ -185,6 +209,18 @@ AC_ARG_ENABLE(debug,
       fi])
 
 
+AC_ARG_ENABLE(dmalloc,
+    AC_HELP_STRING([--enable-dmalloc], [Enable linking to dmalloc for better memory debugging]),
+    [ if test x$enableval = xyes ; then
+        dmalloc=yes
+        AC_DEFINE([ENABLE_DMALLOC], [1], [Enable dmalloc])
+        AC_DEFINE([DMALLOC_FUNC_CHECK], [1], [Enable dmalloc function arg checking])
+        CFLAGS="${CFLAGS} -I/opt/local/include"
+        DMALLOC_LIB="/opt/local/lib/libdmalloc.a"
+        AC_SUBST(DMALLOC_LIB)
+    fi])
+
+
 AC_ARG_ENABLE(pedantic,
     AC_HELP_STRING([--enable-pedantic], [Enable gcc's -pedantic option]),
     [ if test x$enableval = xyes; then
@@ -453,7 +489,7 @@ AC_ARG_WITH(libpcap,
     AC_HELP_STRING([--with-libpcap=DIR], [Use libpcap in DIR]),
     [trypcapdir=$withval])
 
-	for testdir in $trypcapdir /usr/local /opt/local /usr ; do 
+	for testdir in $trypcapdir /usr/local /opt/local /usr /wpdpack ; do 
     	if test -f "${testdir}/include/pcap.h" -a $foundpcap = no ; then
         	LPCAPINC="${testdir}/include/pcap.h"
 	        LPCAPINCDIR="${testdir}/include"
@@ -729,12 +765,12 @@ AC_MSG_CHECKING(for BPF device sending support)
 AC_TRY_RUN([
 #include <stdio.h>
 #include <stdlib.h>
-#include <net/bpf.h>
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <fcntl.h>
 #include <sys/time.h>
 #include <sys/ioctl.h>
+#include <stdint.h>
 #include <net/bpf.h>
 #include <errno.h>
 
@@ -810,6 +846,7 @@ PCAP_BPF_H_FILE="$LPCAPINCDIR/pcap-bpf.h"
 AC_MSG_CHECKING(for $PCAP_BPF_H_FILE)
 AC_TRY_COMPILE([#include <sys/types.h>
                 #include <sys/time.h>
+                #include <stdint.h>
                 #include "$PCAP_BPF_H_FILE"],
                [ int foo;
                  foo = BPF_MAJOR_VERSION; ],
@@ -829,6 +866,7 @@ AC_MSG_CHECKING(for libpcap bpf header)
 			AC_TRY_COMPILE([
 				#include <sys/types.h>
 				#include <sys/time.h>
+				#include <stdint.h>
 				#include "$testfile"],
 			[
 				int foo;
@@ -850,6 +888,42 @@ dnl restore LIBS & CFLAGS
 LIBS="$OLDLIBS"
 CFLAGS="$OLDCFLAGS"
 
+dnl ##################################################
+dnl # Check for libdnet
+dnl ##################################################
+founddnet=no
+enable_fragroute=no
+trydnetdir=/usr/local
+AC_MSG_CHECKING(for libdnet)
+AC_ARG_WITH(libdnet,
+    AC_HELP_STRING([--with-libdnet=DIR], [Use libdnet in DIR]),
+    [trydnetdir=$withval])
+ 
+	for testdir in $trydnetdir /usr/local /opt/local /usr ; do 
+    	if test -x ${testdir}/bin/dnet-config -a $founddnet = no ; then
+            LDNETINC="`$testdir/bin/dnet-config --cflags`"
+            LDNETLIB="`$testdir/bin/dnet-config --libs`"
+
+        	founddnet=$testdir
+     	fi
+	done
+
+	if test $founddnet = no ; then
+		AC_MSG_RESULT(no)
+		AC_MSG_WARN([libdnet not found, disabling fragroute feature])
+	else
+		AC_MSG_RESULT($founddnet)
+		enable_fragroute=yes
+	    AC_DEFINE([HAVE_LIBDNET], [1], [Do we have libdnet?])
+	fi
+
+AC_SUBST(LDNETINC)
+AC_SUBST(LDNETLIB)
+AM_CONDITIONAL(COMPILE_FRAGROUTE, [test x$founddnet != xno])
+if test x$founddnet != xno ; then
+    AC_DEFINE(ENABLE_FRAGROUTE, [1], [Enable fragroute module])
+fi
+
 
 dnl ##################################################
 dnl # Check for pcapnav
@@ -924,12 +998,12 @@ dnl
 dnl     FORCE_ALIGN (DEFINED)
 dnl
 AC_MSG_CHECKING(for requires strict byte alignment)
-AC_CACHE_VAL(unaligned_fail,
+AC_CACHE_VAL(unaligned_cv_fail,
         [case "$host_cpu" in
 
         # XXX: should also check that they don't do weird things (like on arm)
         alpha*|arm*|hp*|mips*|sparc*|ia64)
-                unaligned_fail=yes
+                unaligned_cv_fail=yes
                 ;;
 
         *)
@@ -963,21 +1037,21 @@ EOF
                     conftest.c $LIBS >/dev/null 2>&1
                 if test ! -x conftest ; then
                         dnl failed to compile for some reason
-                        unaligned_fail=yes
+                        unaligned_cv_fail=yes
                 else
                         ./conftest >conftest.out
                         if test ! -s conftest.out ; then
-                                unaligned_fail=yes
+                                unaligned_cv_fail=yes
                         else
-                                unaligned_fail=no
+                                unaligned_cv_fail=no
                         fi
                 fi
                 rm -f conftest* core core.conftest
                 ;;
         esac])
-    AC_MSG_RESULT($unaligned_fail)
-    if test $unaligned_fail = yes ; then
-            AC_DEFINE([FORCE_ALIGN],[1],[Are we strictly aligned?])
+    AC_MSG_RESULT($unaligned_cv_fail)
+    if test $unaligned_cv_fail = yes ; then
+            AC_DEFINE([FORCE_ALIGN], [1], [Are we strictly aligned?])
     fi
 
 dnl ##################################################
@@ -1031,7 +1105,7 @@ dnl There's a bug in OS X which causes pcap_findalldevs() to make the wifi NIC t
 dnl so under OSX we disable the interface list feature
 disable_pcap_findalldevs=no
 
-
+osx_frameworks=no
 dnl these need to be dynamic based on OS
 case $host in
 	*-*-linux*)
@@ -1058,6 +1132,8 @@ case $host in
 	if test x$libpcap_version_096 = xno ; then
     	disable_pcap_findalldevs=yes
     fi
+    AC_DEFINE([HAVE_ABSOLUTE_TIME], [1], [Have OS X UpTime()/AbsoluteTime high-precision timing])
+    osx_frameworks=yes
 	AC_MSG_RESULT(Apple OS X)
 	;;
 
@@ -1080,6 +1156,7 @@ case $host in
 	;;
 esac])
 
+AM_CONDITIONAL([ENABLE_OSX_FRAMEWORKS], test "$osx_frameworks" == "yes")
 
 AC_ARG_WITH(testnic2,
     AC_HELP_STRING([--with-testnic2=NIC2], [Select an optional 2nd network card to use for testing]),
@@ -1124,6 +1201,7 @@ AC_OUTPUT([Makefile
            src/Makefile
            src/common/Makefile
            src/tcpedit/Makefile
+           src/fragroute/Makefile
            src/defines.h
            test/Makefile
            test/config
@@ -1137,11 +1215,14 @@ AC_MSG_RESULT(
 ##########################################################################
 libpcap:                    ${foundpcap} (${libpcap_version})
 libnet:                     ${foundnet}
-autogen:                    ${AUTOGEN}
+libdnet:                    ${founddnet}
+autogen:                    ${AUTOGEN} (${AUTOGEN_VERSION})
+Use libopts tearoff:        ${enable_local_libopts}
 64bit counter support:      ${use64bit_counters}
 tcpdump binary path:        ${tcpdump_path}
 tcpreplay edit support:     ${tcpreplay_edit}
 tcpbridge support:          ${enable_tcpbridge}
+fragroute support:          ${enable_fragroute}
 
 Supported Packet Injection Methods (*):
 Linux PF_PACKET:            ${have_pf}
@@ -1157,12 +1238,12 @@ pcap_sendpacket:            ${have_pcap_sendpacket}
 case $host in
 	*-apple-darwin*)
 	AC_MSG_WARN([Apple OS X versions prior to 10.5 (Leopard) has a serious problem!
-	Please see: http://tcpreplay.synfin.net/trac/ticket/142 for more details])
+Please see: http://tcpreplay.synfin.net/trac/ticket/142 for more details])
 	;;
 	
 	*-*-cygwin)
-	AC_MSG_WARN([Windows/Cygwin support is still somewhat experimental.  Please report any bugs!
-	http://tcpreplay.synfin.net/trac/newticket])
+	AC_MSG_WARN([Windows/Cygwin support is still somewhat experimental. 
+Please report any bugs!	http://tcpreplay.synfin.net/trac/newticket])
 	;;
 esac
 

+ 30 - 2
docs/CHANGELOG

@@ -1,4 +1,32 @@
-$Id: CHANGELOG 1957 2008-01-17 06:24:18Z aturner $
+$Id: CHANGELOG 2032 2008-05-17 18:25:39Z aturner $
+
+05/17/2008: Version 3.3.1
+    - Fix limitation of PF_PACKET only supporting Ethernet (#123)
+    - Fix (again) /dev/bpf detection in FreeBSD 8.0 (#292)
+    - Document building code from Subversion under Cygwin (#304)
+    - Fix --enable-force-* under Linux (#305)
+    - Fix tcpbridge --unidir assert error (#308)
+
+05/04/2008: Version 3.3.0
+    - Improve tcpreplay timing accuracy between packets (#41)
+    - Add tcprewrite fragroute support (#42)
+    - Fix tcprewrite --efcs option (#277)
+    - Updated Win32/Cygwin documentation (#280)
+    - Add dmalloc support (#282)
+    - Fix tcpprep broken handling of VLAN tagged frames (#290)
+    - Fix tcprewrite crash when cache file has NO_SEND packets (#291)
+    - Fix /dev/bpf detection in FreeBSD 8.0 (#292)
+    - Add tcprewrite --ttl editing option (#294)
+    - Fix autoconf AM_PROG_CC_C_O warning (#295)
+    - Add tcpprep --reverse option to split by matching client addresses (#297)
+    - Update version of autoconf to 1.10.1 (#298)
+    - Improved GNU Autogen detection and warnings (#299)
+    - Track EAGAIN errors separately from ENOBUFS (#301)
+    - Automatically detect Winpcap on Cygwin (#303)
+
+01/23/2008: Version 3.2.5
+    - Fix linker error with --enable-tcpreplay-edit and --enable-dynamic-link (#288)
+    - Fix compile errors with Sun Studio compiler (#286)
 
 01/16/2008: Version 3.2.4
     - Fix crash in tcpreplay when --enable-tcpreplay-edit (#281)
@@ -20,7 +48,7 @@ $Id: CHANGELOG 1957 2008-01-17 06:24:18Z aturner $
     - Remove flowreplay code (#262)
     - Fix DLT rewrite code causing corrupted ethernet protocol type (#268)
     - Try to fix inet_aton() issue under Solaris (#260)
-
+    
 08/26/2007: Version 3.2
     - Return a more useful error message when tcpprep fails (#187)
     - Add Tomahawk test tool client/server detection algorithm (#186)

+ 2 - 2
docs/LICENSE

@@ -1,5 +1,5 @@
-$Id: LICENSE 1762 2007-03-24 20:42:05Z aturner $
-Copyright (c) 2001-2007 Aaron Turner.  aturner at synfin dot net
+$Id: LICENSE 1997 2008-04-27 05:35:10Z aturner $
+Copyright (c) 2001-2008 Aaron Turner.  aturner at synfin dot net
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without

+ 9 - 2
docs/Makefile.in

@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.10 from Makefile.am.
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -57,6 +57,7 @@ CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CUT = @CUT@
 CXX = @CXX@
 CXXCPP = @CXXCPP@
 CXXDEPMODE = @CXXDEPMODE@
@@ -64,6 +65,8 @@ CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DMALLOC_LIB = @DMALLOC_LIB@
+DSYMUTIL = @DSYMUTIL@
 ECHO = @ECHO@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
@@ -79,6 +82,8 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
 LDFLAGS = @LDFLAGS@
+LDNETINC = @LDNETINC@
+LDNETLIB = @LDNETLIB@
 LIBOBJS = @LIBOBJS@
 LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@
 LIBOPTS_DIR = @LIBOPTS_DIR@
@@ -96,6 +101,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
+NMEDIT = @NMEDIT@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -172,6 +178,7 @@ target_cpu = @target_cpu@
 target_os = @target_os@
 target_vendor = @target_vendor@
 tcpdump_path = @tcpdump_path@
+top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 MAKEFLAGS = -s

+ 16 - 10
lib/Makefile.in

@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.10 from Makefile.am.
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -50,7 +50,7 @@ libstrl_a_AR = $(AR) $(ARFLAGS)
 libstrl_a_LIBADD =
 am_libstrl_a_OBJECTS = strlcat.$(OBJEXT) strlcpy.$(OBJEXT)
 libstrl_a_OBJECTS = $(am_libstrl_a_OBJECTS)
-DEFAULT_INCLUDES = -I. -I$(top_builddir)/src@am__isrc@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src
 depcomp = $(SHELL) $(top_srcdir)/config/depcomp
 am__depfiles_maybe = depfiles
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
@@ -81,6 +81,7 @@ CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CUT = @CUT@
 CXX = @CXX@
 CXXCPP = @CXXCPP@
 CXXDEPMODE = @CXXDEPMODE@
@@ -88,6 +89,8 @@ CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DMALLOC_LIB = @DMALLOC_LIB@
+DSYMUTIL = @DSYMUTIL@
 ECHO = @ECHO@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
@@ -103,6 +106,8 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
 LDFLAGS = @LDFLAGS@
+LDNETINC = @LDNETINC@
+LDNETLIB = @LDNETLIB@
 LIBOBJS = @LIBOBJS@
 LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@
 LIBOPTS_DIR = @LIBOPTS_DIR@
@@ -120,6 +125,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
+NMEDIT = @NMEDIT@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -196,6 +202,7 @@ target_cpu = @target_cpu@
 target_os = @target_os@
 target_vendor = @target_vendor@
 tcpdump_path = @tcpdump_path@
+top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 noinst_LIBRARIES = libstrl.a
@@ -285,8 +292,8 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS
 
@@ -298,8 +305,8 @@ TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
 	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
@@ -309,13 +316,12 @@ ctags: CTAGS
 CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
 	tags=; \
-	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	test -z "$(CTAGS_ARGS)$$tags$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
 	     $$tags $$unique

+ 20 - 14
libopts/Makefile.in

@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.10 from Makefile.am.
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -59,7 +59,7 @@ libopts_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
 	$(libopts_la_LDFLAGS) $(LDFLAGS) -o $@
 @INSTALL_LIBOPTS_FALSE@am_libopts_la_rpath =
 @INSTALL_LIBOPTS_TRUE@am_libopts_la_rpath = -rpath $(libdir)
-DEFAULT_INCLUDES = -I. -I$(top_builddir)/src@am__isrc@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src
 depcomp = $(SHELL) $(top_srcdir)/config/depcomp
 am__depfiles_maybe = depfiles
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
@@ -89,6 +89,7 @@ CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CUT = @CUT@
 CXX = @CXX@
 CXXCPP = @CXXCPP@
 CXXDEPMODE = @CXXDEPMODE@
@@ -96,6 +97,8 @@ CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DMALLOC_LIB = @DMALLOC_LIB@
+DSYMUTIL = @DSYMUTIL@
 ECHO = @ECHO@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
@@ -111,6 +114,8 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
 LDFLAGS = @LDFLAGS@
+LDNETINC = @LDNETINC@
+LDNETLIB = @LDNETLIB@
 LIBOBJS = @LIBOBJS@
 LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@
 LIBOPTS_DIR = @LIBOPTS_DIR@
@@ -128,6 +133,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
+NMEDIT = @NMEDIT@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -204,6 +210,7 @@ target_cpu = @target_cpu@
 target_os = @target_os@
 target_vendor = @target_vendor@
 tcpdump_path = @tcpdump_path@
+top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 MAINTAINERCLEANFILES = Makefile.in
@@ -267,8 +274,8 @@ install-libLTLIBRARIES: $(lib_LTLIBRARIES)
 	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
 	  if test -f $$p; then \
 	    f=$(am__strip_dir) \
-	    echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
-	    $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
+	    echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
+	    $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
 	  else :; fi; \
 	done
 
@@ -276,8 +283,8 @@ uninstall-libLTLIBRARIES:
 	@$(NORMAL_UNINSTALL)
 	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
 	  p=$(am__strip_dir) \
-	  echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
-	  $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
+	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
+	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
 	done
 
 clean-libLTLIBRARIES:
@@ -347,8 +354,8 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS
 
@@ -360,8 +367,8 @@ TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
 	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
@@ -371,13 +378,12 @@ ctags: CTAGS
 CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
 	tags=; \
-	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	test -z "$(CTAGS_ARGS)$$tags$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
 	     $$tags $$unique

+ 16 - 10
scripts/Makefile.in

@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.10 from Makefile.am.
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -47,7 +47,7 @@ PROGRAMS = $(noinst_PROGRAMS)
 am_man2html_OBJECTS = man2html.$(OBJEXT)
 man2html_OBJECTS = $(am_man2html_OBJECTS)
 man2html_LDADD = $(LDADD)
-DEFAULT_INCLUDES = -I. -I$(top_builddir)/src@am__isrc@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src
 depcomp = $(SHELL) $(top_srcdir)/config/depcomp
 am__depfiles_maybe = depfiles
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
@@ -77,6 +77,7 @@ CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CUT = @CUT@
 CXX = @CXX@
 CXXCPP = @CXXCPP@
 CXXDEPMODE = @CXXDEPMODE@
@@ -84,6 +85,8 @@ CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DMALLOC_LIB = @DMALLOC_LIB@
+DSYMUTIL = @DSYMUTIL@
 ECHO = @ECHO@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
@@ -99,6 +102,8 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
 LDFLAGS = @LDFLAGS@
+LDNETINC = @LDNETINC@
+LDNETLIB = @LDNETLIB@
 LIBOBJS = @LIBOBJS@
 LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@
 LIBOPTS_DIR = @LIBOPTS_DIR@
@@ -116,6 +121,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
+NMEDIT = @NMEDIT@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -192,6 +198,7 @@ target_cpu = @target_cpu@
 target_os = @target_os@
 target_vendor = @target_vendor@
 tcpdump_path = @tcpdump_path@
+top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 man2html_SOURCES = man2html.c
@@ -282,8 +289,8 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS
 
@@ -295,8 +302,8 @@ TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
 	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
@@ -306,13 +313,12 @@ ctags: CTAGS
 CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
 	tags=; \
-	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	test -z "$(CTAGS_ARGS)$$tags$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
 	     $$tags $$unique

BIN
src/._Makefile.am


BIN
src/._tcpreplay_opts.def


+ 30 - 12
src/Makefile.am

@@ -1,5 +1,13 @@
 # $Id: Makefile.am 1632 2007-02-03 18:46:16Z aturner $
-SUBDIRS = common tcpedit
+if COMPILE_FRAGROUTE
+    LIBFRAGROUTE = ./fragroute/libfragroute.a @LDNETLIB@
+    FRAGROUTE_DIR = fragroute
+else
+    LIBFRAGROUTE = 
+    FRAGROUTE_DIR = 
+endif
+ 
+SUBDIRS = common tcpedit $(FRAGROUTE_DIR)
 
 if SYSTEM_STRLCPY
 LIBSTRL =
@@ -41,14 +49,20 @@ EXTRA_DIST = tcpreplay.1 tcpprep.1 tcprewrite.1 tcpbridge.1 tcpreplay-edit.1
 bin_PROGRAMS = tcpreplay tcpprep tcprewrite tcpbridge
 
 tcpreplay_CFLAGS = $(LIBOPTS_CFLAGS) -I.. $(LNAV_CFLAGS) -DTCPREPLAY
-tcpreplay_LDADD = ./common/libcommon.a $(LIBSTRL) @LNETLIB@ @LPCAPLIB@ $(LIBOPTS_LDADD)
-tcpreplay_SOURCES = send_packets.c signal_handler.c tcpreplay.c
 
 if ENABLE_TCPREPLAY_EDIT
-tcpreplay_LDADD += ./tcpedit/libtcpedit.a
-tcpreplay_SOURCES += tcpreplay_edit_opts.c
+tcpreplay_LDADD = ./tcpedit/libtcpedit.a
+tcpreplay_SOURCES = tcpreplay_edit_opts.c
 else
-tcpreplay_SOURCES += tcpreplay_opts.c
+tcpreplay_SOURCES = tcpreplay_opts.c
+tcpreplay_LDADD = 
+endif
+
+tcpreplay_LDADD += ./common/libcommon.a $(LIBSTRL) @LNETLIB@ @LPCAPLIB@ $(LIBOPTS_LDADD)
+tcpreplay_SOURCES += send_packets.c signal_handler.c tcpreplay.c sleep.c
+
+if ENABLE_OSX_FRAMEWORKS
+tcpreplay_LDFLAGS = -framework CoreServices -framework Carbon
 endif
 
 tcpreplay_OBJECTS: tcpreplay_opts.h
@@ -60,9 +74,10 @@ tcpreplay_edit_opts.c: tcpreplay_opts.def
 	@AUTOGEN@ $(opts_list) -DTCPREPLAY_EDIT -b tcpreplay_edit_opts \
 		tcpreplay_opts.def
 
-tcprewrite_CFLAGS = $(LIBOPTS_CFLAGS) -I.. $(LNAV_CFLAGS) -DTCPREWRITE -DHAVE_CACHEFILE_SUPPORT
+tcprewrite_CFLAGS = $(LIBOPTS_CFLAGS) -I.. @LDNETINC@ $(LNAV_CFLAGS) -DTCPREWRITE -DHAVE_CACHEFILE_SUPPORT
 tcprewrite_LDADD = ./tcpedit/libtcpedit.a ./common/libcommon.a \
-	$(LIBSTRL) @LNETLIB@ @LPCAPLIB@ $(LIBOPTS_LDADD)
+	$(LIBSTRL) @LNETLIB@ @LPCAPLIB@ $(LIBOPTS_LDADD) @DMALLOC_LIB@ \
+	$(LIBFRAGROUTE)
 tcprewrite_SOURCES = tcprewrite_opts.c tcprewrite.c 
 tcprewrite_OBJECTS: tcprewrite_opts.h
 tcprewrite_opts.h: tcprewrite_opts.c
@@ -72,7 +87,7 @@ tcprewrite_opts.c: tcprewrite_opts.def tcpedit/tcpedit_opts.def
 
 tcpprep_CFLAGS = $(LIBOPTS_CFLAGS) -I.. $(LNAV_CFLAGS) -DTCPPREP
 tcpprep_LDADD = ./common/libcommon.a \
-		  $(LIBSTRL) @LNETLIB@ @LPCAPLIB@ $(LIBOPTS_LDADD)
+    $(LIBSTRL) @LNETLIB@ @LPCAPLIB@ $(LIBOPTS_LDADD) @DMALLOC_LIB@
 tcpprep_SOURCES = tcpprep_opts.c tcpprep.c tree.c 
 tcpprep_OBJECTS: tcpprep_opts.h
 tcpprep_opts.h: tcpprep_opts.c
@@ -81,8 +96,11 @@ tcpprep_opts.c: tcpprep_opts.def
 
 tcpbridge_CFLAGS = $(LIBOPTS_CFLAGS) -I.. $(LNAV_CFLAGS) -DTCPBRIDGE
 tcpbridge_LDADD = ./tcpedit/libtcpedit.a ./common/libcommon.a \
-		  $(LIBSTRL) @LNETLIB@ @LPCAPLIB@ $(LIBOPTS_LDADD)
-tcpbridge_SOURCES = tcpbridge_opts.c tcpbridge.c bridge.c send_packets.c 		
+    $(LIBSTRL) @LNETLIB@ @LPCAPLIB@ $(LIBOPTS_LDADD) @DMALLOC_LIB@
+if ENABLE_OSX_FRAMEWORKS
+tcpbridge_LDFLAGS = -framework CoreServices -framework Carbon
+endif
+tcpbridge_SOURCES = tcpbridge_opts.c tcpbridge.c bridge.c send_packets.c sleep.c
 tcpbridge_OBJECTS: tcpbridge_opts.h
 tcpbridge_opts.h: tcpbridge_opts.c
 tcpbridge_opts.c: tcpbridge_opts.def tcpedit/tcpedit_opts.def
@@ -92,7 +110,7 @@ noinst_HEADERS = tcpreplay.h tcpprep.h bridge.h defines.h tree.h \
 		 send_packets.h signal_handler.h common.h tcpreplay_opts.h \
 		 tcpreplay_edit_opts.h tcprewrite.h tcprewrite_opts.h tcpprep_opts.h \
 		 tcpprep_opts.def tcprewrite_opts.def tcpreplay_opts.def \
-		 tcpbridge_opts.def tcpbridge.h tcpbridge_opts.h tcpr.h
+		 tcpbridge_opts.def tcpbridge.h tcpbridge_opts.h tcpr.h sleep.h
 
 
 MOSTLYCLEANFILES = *~ *.o

+ 117 - 54
src/Makefile.in

@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.10 from Makefile.am.
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -37,9 +37,6 @@ target_triplet = @target@
 @ENABLE_TCPREPLAY_EDIT_TRUE@am__append_1 = -DTCPREPLAY_EDIT
 bin_PROGRAMS = tcpreplay$(EXEEXT) tcpprep$(EXEEXT) tcprewrite$(EXEEXT) \
 	tcpbridge$(EXEEXT)
-@ENABLE_TCPREPLAY_EDIT_TRUE@am__append_2 = ./tcpedit/libtcpedit.a
-@ENABLE_TCPREPLAY_EDIT_TRUE@am__append_3 = tcpreplay_edit_opts.c
-@ENABLE_TCPREPLAY_EDIT_FALSE@am__append_4 = tcpreplay_opts.c
 subdir = src
 DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
 	$(srcdir)/Makefile.in $(srcdir)/config.h.in \
@@ -56,7 +53,7 @@ binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
 PROGRAMS = $(bin_PROGRAMS)
 am_tcpbridge_OBJECTS = tcpbridge-tcpbridge_opts.$(OBJEXT) \
 	tcpbridge-tcpbridge.$(OBJEXT) tcpbridge-bridge.$(OBJEXT) \
-	tcpbridge-send_packets.$(OBJEXT)
+	tcpbridge-send_packets.$(OBJEXT) tcpbridge-sleep.$(OBJEXT)
 tcpbridge_OBJECTS = $(am_tcpbridge_OBJECTS)
 @SYSTEM_STRLCPY_FALSE@am__DEPENDENCIES_1 = ../lib/libstrl.a
 am__DEPENDENCIES_2 =
@@ -64,7 +61,7 @@ tcpbridge_DEPENDENCIES = ./tcpedit/libtcpedit.a ./common/libcommon.a \
 	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
 tcpbridge_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
 	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(tcpbridge_CFLAGS) \
-	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+	$(CFLAGS) $(tcpbridge_LDFLAGS) $(LDFLAGS) -o $@
 am_tcpprep_OBJECTS = tcpprep-tcpprep_opts.$(OBJEXT) \
 	tcpprep-tcpprep.$(OBJEXT) tcpprep-tree.$(OBJEXT)
 tcpprep_OBJECTS = $(am_tcpprep_OBJECTS)
@@ -73,25 +70,39 @@ tcpprep_DEPENDENCIES = ./common/libcommon.a $(am__DEPENDENCIES_1) \
 tcpprep_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
 	--mode=link $(CCLD) $(tcpprep_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
 	$(LDFLAGS) -o $@
-am__tcpreplay_SOURCES_DIST = send_packets.c signal_handler.c \
-	tcpreplay.c tcpreplay_edit_opts.c tcpreplay_opts.c
-@ENABLE_TCPREPLAY_EDIT_TRUE@am__objects_1 = tcpreplay-tcpreplay_edit_opts.$(OBJEXT)
-@ENABLE_TCPREPLAY_EDIT_FALSE@am__objects_2 = tcpreplay-tcpreplay_opts.$(OBJEXT)
-am_tcpreplay_OBJECTS = tcpreplay-send_packets.$(OBJEXT) \
-	tcpreplay-signal_handler.$(OBJEXT) \
-	tcpreplay-tcpreplay.$(OBJEXT) $(am__objects_1) \
-	$(am__objects_2)
+am__tcpreplay_SOURCES_DIST = tcpreplay_opts.c send_packets.c \
+	signal_handler.c tcpreplay.c sleep.c tcpreplay_edit_opts.c
+@ENABLE_TCPREPLAY_EDIT_FALSE@am_tcpreplay_OBJECTS = tcpreplay-tcpreplay_opts.$(OBJEXT) \
+@ENABLE_TCPREPLAY_EDIT_FALSE@	tcpreplay-send_packets.$(OBJEXT) \
+@ENABLE_TCPREPLAY_EDIT_FALSE@	tcpreplay-signal_handler.$(OBJEXT) \
+@ENABLE_TCPREPLAY_EDIT_FALSE@	tcpreplay-tcpreplay.$(OBJEXT) \
+@ENABLE_TCPREPLAY_EDIT_FALSE@	tcpreplay-sleep.$(OBJEXT)
+@ENABLE_TCPREPLAY_EDIT_TRUE@am_tcpreplay_OBJECTS = tcpreplay-tcpreplay_edit_opts.$(OBJEXT) \
+@ENABLE_TCPREPLAY_EDIT_TRUE@	tcpreplay-send_packets.$(OBJEXT) \
+@ENABLE_TCPREPLAY_EDIT_TRUE@	tcpreplay-signal_handler.$(OBJEXT) \
+@ENABLE_TCPREPLAY_EDIT_TRUE@	tcpreplay-tcpreplay.$(OBJEXT) \
+@ENABLE_TCPREPLAY_EDIT_TRUE@	tcpreplay-sleep.$(OBJEXT)
 tcpreplay_OBJECTS = $(am_tcpreplay_OBJECTS)
-tcpreplay_DEPENDENCIES = ./common/libcommon.a $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_2) $(am__append_2)
+@ENABLE_TCPREPLAY_EDIT_FALSE@tcpreplay_DEPENDENCIES =  \
+@ENABLE_TCPREPLAY_EDIT_FALSE@	./common/libcommon.a \
+@ENABLE_TCPREPLAY_EDIT_FALSE@	$(am__DEPENDENCIES_1) \
+@ENABLE_TCPREPLAY_EDIT_FALSE@	$(am__DEPENDENCIES_2)
+@ENABLE_TCPREPLAY_EDIT_TRUE@tcpreplay_DEPENDENCIES =  \
+@ENABLE_TCPREPLAY_EDIT_TRUE@	./tcpedit/libtcpedit.a \
+@ENABLE_TCPREPLAY_EDIT_TRUE@	./common/libcommon.a \
+@ENABLE_TCPREPLAY_EDIT_TRUE@	$(am__DEPENDENCIES_1) \
+@ENABLE_TCPREPLAY_EDIT_TRUE@	$(am__DEPENDENCIES_2)
 tcpreplay_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
 	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(tcpreplay_CFLAGS) \
-	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+	$(CFLAGS) $(tcpreplay_LDFLAGS) $(LDFLAGS) -o $@
 am_tcprewrite_OBJECTS = tcprewrite-tcprewrite_opts.$(OBJEXT) \
 	tcprewrite-tcprewrite.$(OBJEXT)
 tcprewrite_OBJECTS = $(am_tcprewrite_OBJECTS)
+@COMPILE_FRAGROUTE_TRUE@am__DEPENDENCIES_3 =  \
+@COMPILE_FRAGROUTE_TRUE@	./fragroute/libfragroute.a
 tcprewrite_DEPENDENCIES = ./tcpedit/libtcpedit.a ./common/libcommon.a \
-	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) \
+	$(am__DEPENDENCIES_3)
 tcprewrite_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
 	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(tcprewrite_CFLAGS) \
 	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
@@ -126,7 +137,7 @@ RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
   distclean-recursive maintainer-clean-recursive
 ETAGS = etags
 CTAGS = ctags
-DIST_SUBDIRS = $(SUBDIRS)
+DIST_SUBDIRS = common tcpedit fragroute
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -141,6 +152,7 @@ CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CUT = @CUT@
 CXX = @CXX@
 CXXCPP = @CXXCPP@
 CXXDEPMODE = @CXXDEPMODE@
@@ -148,6 +160,8 @@ CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DMALLOC_LIB = @DMALLOC_LIB@
+DSYMUTIL = @DSYMUTIL@
 ECHO = @ECHO@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
@@ -163,6 +177,8 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
 LDFLAGS = @LDFLAGS@
+LDNETINC = @LDNETINC@
+LDNETLIB = @LDNETLIB@
 LIBOBJS = @LIBOBJS@
 LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@
 LIBOPTS_DIR = @LIBOPTS_DIR@
@@ -180,6 +196,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
+NMEDIT = @NMEDIT@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -256,11 +273,16 @@ target_cpu = @target_cpu@
 target_os = @target_os@
 target_vendor = @target_vendor@
 tcpdump_path = @tcpdump_path@
+top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+@COMPILE_FRAGROUTE_FALSE@LIBFRAGROUTE = 
 
 # $Id: Makefile.am 1632 2007-02-03 18:46:16Z aturner $
-SUBDIRS = common tcpedit
+@COMPILE_FRAGROUTE_TRUE@LIBFRAGROUTE = ./fragroute/libfragroute.a @LDNETLIB@
+@COMPILE_FRAGROUTE_FALSE@FRAGROUTE_DIR = 
+@COMPILE_FRAGROUTE_TRUE@FRAGROUTE_DIR = fragroute
+SUBDIRS = common tcpedit $(FRAGROUTE_DIR)
 @SYSTEM_STRLCPY_FALSE@LIBSTRL = ../lib/libstrl.a
 @SYSTEM_STRLCPY_TRUE@LIBSTRL = 
 
@@ -270,30 +292,42 @@ opts_list = -L tcpedit $(am__append_1)
 man_MANS = tcpreplay.1 tcpprep.1 tcprewrite.1 tcpbridge.1 tcpreplay-edit.1
 EXTRA_DIST = tcpreplay.1 tcpprep.1 tcprewrite.1 tcpbridge.1 tcpreplay-edit.1
 tcpreplay_CFLAGS = $(LIBOPTS_CFLAGS) -I.. $(LNAV_CFLAGS) -DTCPREPLAY
-tcpreplay_LDADD = ./common/libcommon.a $(LIBSTRL) @LNETLIB@ @LPCAPLIB@ \
-	$(LIBOPTS_LDADD) $(am__append_2)
-tcpreplay_SOURCES = send_packets.c signal_handler.c tcpreplay.c \
-	$(am__append_3) $(am__append_4)
-tcprewrite_CFLAGS = $(LIBOPTS_CFLAGS) -I.. $(LNAV_CFLAGS) -DTCPREWRITE -DHAVE_CACHEFILE_SUPPORT
+@ENABLE_TCPREPLAY_EDIT_FALSE@tcpreplay_LDADD = ./common/libcommon.a \
+@ENABLE_TCPREPLAY_EDIT_FALSE@	$(LIBSTRL) @LNETLIB@ @LPCAPLIB@ \
+@ENABLE_TCPREPLAY_EDIT_FALSE@	$(LIBOPTS_LDADD)
+@ENABLE_TCPREPLAY_EDIT_TRUE@tcpreplay_LDADD = ./tcpedit/libtcpedit.a \
+@ENABLE_TCPREPLAY_EDIT_TRUE@	./common/libcommon.a $(LIBSTRL) \
+@ENABLE_TCPREPLAY_EDIT_TRUE@	@LNETLIB@ @LPCAPLIB@ \
+@ENABLE_TCPREPLAY_EDIT_TRUE@	$(LIBOPTS_LDADD)
+@ENABLE_TCPREPLAY_EDIT_FALSE@tcpreplay_SOURCES = tcpreplay_opts.c \
+@ENABLE_TCPREPLAY_EDIT_FALSE@	send_packets.c signal_handler.c \
+@ENABLE_TCPREPLAY_EDIT_FALSE@	tcpreplay.c sleep.c
+@ENABLE_TCPREPLAY_EDIT_TRUE@tcpreplay_SOURCES = tcpreplay_edit_opts.c \
+@ENABLE_TCPREPLAY_EDIT_TRUE@	send_packets.c signal_handler.c \
+@ENABLE_TCPREPLAY_EDIT_TRUE@	tcpreplay.c sleep.c
+@ENABLE_OSX_FRAMEWORKS_TRUE@tcpreplay_LDFLAGS = -framework CoreServices -framework Carbon
+tcprewrite_CFLAGS = $(LIBOPTS_CFLAGS) -I.. @LDNETINC@ $(LNAV_CFLAGS) -DTCPREWRITE -DHAVE_CACHEFILE_SUPPORT
 tcprewrite_LDADD = ./tcpedit/libtcpedit.a ./common/libcommon.a \
-	$(LIBSTRL) @LNETLIB@ @LPCAPLIB@ $(LIBOPTS_LDADD)
+	$(LIBSTRL) @LNETLIB@ @LPCAPLIB@ $(LIBOPTS_LDADD) @DMALLOC_LIB@ \
+	$(LIBFRAGROUTE)
 
 tcprewrite_SOURCES = tcprewrite_opts.c tcprewrite.c 
 tcpprep_CFLAGS = $(LIBOPTS_CFLAGS) -I.. $(LNAV_CFLAGS) -DTCPPREP
 tcpprep_LDADD = ./common/libcommon.a \
-		  $(LIBSTRL) @LNETLIB@ @LPCAPLIB@ $(LIBOPTS_LDADD)
+    $(LIBSTRL) @LNETLIB@ @LPCAPLIB@ $(LIBOPTS_LDADD) @DMALLOC_LIB@
 
 tcpprep_SOURCES = tcpprep_opts.c tcpprep.c tree.c 
 tcpbridge_CFLAGS = $(LIBOPTS_CFLAGS) -I.. $(LNAV_CFLAGS) -DTCPBRIDGE
 tcpbridge_LDADD = ./tcpedit/libtcpedit.a ./common/libcommon.a \
-		  $(LIBSTRL) @LNETLIB@ @LPCAPLIB@ $(LIBOPTS_LDADD)
+    $(LIBSTRL) @LNETLIB@ @LPCAPLIB@ $(LIBOPTS_LDADD) @DMALLOC_LIB@
 
-tcpbridge_SOURCES = tcpbridge_opts.c tcpbridge.c bridge.c send_packets.c 		
+@ENABLE_OSX_FRAMEWORKS_TRUE@tcpbridge_LDFLAGS = -framework CoreServices -framework Carbon
+tcpbridge_SOURCES = tcpbridge_opts.c tcpbridge.c bridge.c send_packets.c sleep.c
 noinst_HEADERS = tcpreplay.h tcpprep.h bridge.h defines.h tree.h \
 		 send_packets.h signal_handler.h common.h tcpreplay_opts.h \
 		 tcpreplay_edit_opts.h tcprewrite.h tcprewrite_opts.h tcpprep_opts.h \
 		 tcpprep_opts.def tcprewrite_opts.def tcpreplay_opts.def \
-		 tcpbridge_opts.def tcpbridge.h tcpbridge_opts.h tcpr.h
+		 tcpbridge_opts.def tcpbridge.h tcpbridge_opts.h tcpr.h sleep.h
 
 MOSTLYCLEANFILES = *~ *.o
 MAINTAINERCLEANFILES = Makefile.in tcpreplay_opts.h tcpreplay_opts.c \
@@ -365,8 +399,8 @@ install-binPROGRAMS: $(bin_PROGRAMS)
 	     || test -f $$p1 \
 	  ; then \
 	    f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
-	   echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
-	   $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
+	   echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
+	   $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
 	  else :; fi; \
 	done
 
@@ -405,6 +439,7 @@ distclean-compile:
 
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpbridge-bridge.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpbridge-send_packets.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpbridge-sleep.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpbridge-tcpbridge.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpbridge-tcpbridge_opts.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpprep-tcpprep.Po@am__quote@
@@ -412,6 +447,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpprep-tree.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpreplay-send_packets.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpreplay-signal_handler.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpreplay-sleep.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpreplay-tcpreplay.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpreplay-tcpreplay_edit_opts.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpreplay-tcpreplay_opts.Po@am__quote@
@@ -495,6 +531,20 @@ tcpbridge-send_packets.obj: send_packets.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tcpbridge_CFLAGS) $(CFLAGS) -c -o tcpbridge-send_packets.obj `if test -f 'send_packets.c'; then $(CYGPATH_W) 'send_packets.c'; else $(CYGPATH_W) '$(srcdir)/send_packets.c'; fi`
 
+tcpbridge-sleep.o: sleep.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tcpbridge_CFLAGS) $(CFLAGS) -MT tcpbridge-sleep.o -MD -MP -MF $(DEPDIR)/tcpbridge-sleep.Tpo -c -o tcpbridge-sleep.o `test -f 'sleep.c' || echo '$(srcdir)/'`sleep.c
+@am__fastdepCC_TRUE@	mv -f $(DEPDIR)/tcpbridge-sleep.Tpo $(DEPDIR)/tcpbridge-sleep.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='sleep.c' object='tcpbridge-sleep.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tcpbridge_CFLAGS) $(CFLAGS) -c -o tcpbridge-sleep.o `test -f 'sleep.c' || echo '$(srcdir)/'`sleep.c
+
+tcpbridge-sleep.obj: sleep.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tcpbridge_CFLAGS) $(CFLAGS) -MT tcpbridge-sleep.obj -MD -MP -MF $(DEPDIR)/tcpbridge-sleep.Tpo -c -o tcpbridge-sleep.obj `if test -f 'sleep.c'; then $(CYGPATH_W) 'sleep.c'; else $(CYGPATH_W) '$(srcdir)/sleep.c'; fi`
+@am__fastdepCC_TRUE@	mv -f $(DEPDIR)/tcpbridge-sleep.Tpo $(DEPDIR)/tcpbridge-sleep.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='sleep.c' object='tcpbridge-sleep.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tcpbridge_CFLAGS) $(CFLAGS) -c -o tcpbridge-sleep.obj `if test -f 'sleep.c'; then $(CYGPATH_W) 'sleep.c'; else $(CYGPATH_W) '$(srcdir)/sleep.c'; fi`
+
 tcpprep-tcpprep_opts.o: tcpprep_opts.c
 @am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tcpprep_CFLAGS) $(CFLAGS) -MT tcpprep-tcpprep_opts.o -MD -MP -MF $(DEPDIR)/tcpprep-tcpprep_opts.Tpo -c -o tcpprep-tcpprep_opts.o `test -f 'tcpprep_opts.c' || echo '$(srcdir)/'`tcpprep_opts.c
 @am__fastdepCC_TRUE@	mv -f $(DEPDIR)/tcpprep-tcpprep_opts.Tpo $(DEPDIR)/tcpprep-tcpprep_opts.Po
@@ -537,6 +587,20 @@ tcpprep-tree.obj: tree.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tcpprep_CFLAGS) $(CFLAGS) -c -o tcpprep-tree.obj `if test -f 'tree.c'; then $(CYGPATH_W) 'tree.c'; else $(CYGPATH_W) '$(srcdir)/tree.c'; fi`
 
+tcpreplay-tcpreplay_opts.o: tcpreplay_opts.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tcpreplay_CFLAGS) $(CFLAGS) -MT tcpreplay-tcpreplay_opts.o -MD -MP -MF $(DEPDIR)/tcpreplay-tcpreplay_opts.Tpo -c -o tcpreplay-tcpreplay_opts.o `test -f 'tcpreplay_opts.c' || echo '$(srcdir)/'`tcpreplay_opts.c
+@am__fastdepCC_TRUE@	mv -f $(DEPDIR)/tcpreplay-tcpreplay_opts.Tpo $(DEPDIR)/tcpreplay-tcpreplay_opts.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='tcpreplay_opts.c' object='tcpreplay-tcpreplay_opts.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tcpreplay_CFLAGS) $(CFLAGS) -c -o tcpreplay-tcpreplay_opts.o `test -f 'tcpreplay_opts.c' || echo '$(srcdir)/'`tcpreplay_opts.c
+
+tcpreplay-tcpreplay_opts.obj: tcpreplay_opts.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tcpreplay_CFLAGS) $(CFLAGS) -MT tcpreplay-tcpreplay_opts.obj -MD -MP -MF $(DEPDIR)/tcpreplay-tcpreplay_opts.Tpo -c -o tcpreplay-tcpreplay_opts.obj `if test -f 'tcpreplay_opts.c'; then $(CYGPATH_W) 'tcpreplay_opts.c'; else $(CYGPATH_W) '$(srcdir)/tcpreplay_opts.c'; fi`
+@am__fastdepCC_TRUE@	mv -f $(DEPDIR)/tcpreplay-tcpreplay_opts.Tpo $(DEPDIR)/tcpreplay-tcpreplay_opts.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='tcpreplay_opts.c' object='tcpreplay-tcpreplay_opts.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tcpreplay_CFLAGS) $(CFLAGS) -c -o tcpreplay-tcpreplay_opts.obj `if test -f 'tcpreplay_opts.c'; then $(CYGPATH_W) 'tcpreplay_opts.c'; else $(CYGPATH_W) '$(srcdir)/tcpreplay_opts.c'; fi`
+
 tcpreplay-send_packets.o: send_packets.c
 @am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tcpreplay_CFLAGS) $(CFLAGS) -MT tcpreplay-send_packets.o -MD -MP -MF $(DEPDIR)/tcpreplay-send_packets.Tpo -c -o tcpreplay-send_packets.o `test -f 'send_packets.c' || echo '$(srcdir)/'`send_packets.c
 @am__fastdepCC_TRUE@	mv -f $(DEPDIR)/tcpreplay-send_packets.Tpo $(DEPDIR)/tcpreplay-send_packets.Po
@@ -579,6 +643,20 @@ tcpreplay-tcpreplay.obj: tcpreplay.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tcpreplay_CFLAGS) $(CFLAGS) -c -o tcpreplay-tcpreplay.obj `if test -f 'tcpreplay.c'; then $(CYGPATH_W) 'tcpreplay.c'; else $(CYGPATH_W) '$(srcdir)/tcpreplay.c'; fi`
 
+tcpreplay-sleep.o: sleep.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tcpreplay_CFLAGS) $(CFLAGS) -MT tcpreplay-sleep.o -MD -MP -MF $(DEPDIR)/tcpreplay-sleep.Tpo -c -o tcpreplay-sleep.o `test -f 'sleep.c' || echo '$(srcdir)/'`sleep.c
+@am__fastdepCC_TRUE@	mv -f $(DEPDIR)/tcpreplay-sleep.Tpo $(DEPDIR)/tcpreplay-sleep.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='sleep.c' object='tcpreplay-sleep.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tcpreplay_CFLAGS) $(CFLAGS) -c -o tcpreplay-sleep.o `test -f 'sleep.c' || echo '$(srcdir)/'`sleep.c
+
+tcpreplay-sleep.obj: sleep.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tcpreplay_CFLAGS) $(CFLAGS) -MT tcpreplay-sleep.obj -MD -MP -MF $(DEPDIR)/tcpreplay-sleep.Tpo -c -o tcpreplay-sleep.obj `if test -f 'sleep.c'; then $(CYGPATH_W) 'sleep.c'; else $(CYGPATH_W) '$(srcdir)/sleep.c'; fi`
+@am__fastdepCC_TRUE@	mv -f $(DEPDIR)/tcpreplay-sleep.Tpo $(DEPDIR)/tcpreplay-sleep.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='sleep.c' object='tcpreplay-sleep.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tcpreplay_CFLAGS) $(CFLAGS) -c -o tcpreplay-sleep.obj `if test -f 'sleep.c'; then $(CYGPATH_W) 'sleep.c'; else $(CYGPATH_W) '$(srcdir)/sleep.c'; fi`
+
 tcpreplay-tcpreplay_edit_opts.o: tcpreplay_edit_opts.c
 @am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tcpreplay_CFLAGS) $(CFLAGS) -MT tcpreplay-tcpreplay_edit_opts.o -MD -MP -MF $(DEPDIR)/tcpreplay-tcpreplay_edit_opts.Tpo -c -o tcpreplay-tcpreplay_edit_opts.o `test -f 'tcpreplay_edit_opts.c' || echo '$(srcdir)/'`tcpreplay_edit_opts.c
 @am__fastdepCC_TRUE@	mv -f $(DEPDIR)/tcpreplay-tcpreplay_edit_opts.Tpo $(DEPDIR)/tcpreplay-tcpreplay_edit_opts.Po
@@ -593,20 +671,6 @@ tcpreplay-tcpreplay_edit_opts.obj: tcpreplay_edit_opts.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tcpreplay_CFLAGS) $(CFLAGS) -c -o tcpreplay-tcpreplay_edit_opts.obj `if test -f 'tcpreplay_edit_opts.c'; then $(CYGPATH_W) 'tcpreplay_edit_opts.c'; else $(CYGPATH_W) '$(srcdir)/tcpreplay_edit_opts.c'; fi`
 
-tcpreplay-tcpreplay_opts.o: tcpreplay_opts.c
-@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tcpreplay_CFLAGS) $(CFLAGS) -MT tcpreplay-tcpreplay_opts.o -MD -MP -MF $(DEPDIR)/tcpreplay-tcpreplay_opts.Tpo -c -o tcpreplay-tcpreplay_opts.o `test -f 'tcpreplay_opts.c' || echo '$(srcdir)/'`tcpreplay_opts.c
-@am__fastdepCC_TRUE@	mv -f $(DEPDIR)/tcpreplay-tcpreplay_opts.Tpo $(DEPDIR)/tcpreplay-tcpreplay_opts.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='tcpreplay_opts.c' object='tcpreplay-tcpreplay_opts.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tcpreplay_CFLAGS) $(CFLAGS) -c -o tcpreplay-tcpreplay_opts.o `test -f 'tcpreplay_opts.c' || echo '$(srcdir)/'`tcpreplay_opts.c
-
-tcpreplay-tcpreplay_opts.obj: tcpreplay_opts.c
-@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tcpreplay_CFLAGS) $(CFLAGS) -MT tcpreplay-tcpreplay_opts.obj -MD -MP -MF $(DEPDIR)/tcpreplay-tcpreplay_opts.Tpo -c -o tcpreplay-tcpreplay_opts.obj `if test -f 'tcpreplay_opts.c'; then $(CYGPATH_W) 'tcpreplay_opts.c'; else $(CYGPATH_W) '$(srcdir)/tcpreplay_opts.c'; fi`
-@am__fastdepCC_TRUE@	mv -f $(DEPDIR)/tcpreplay-tcpreplay_opts.Tpo $(DEPDIR)/tcpreplay-tcpreplay_opts.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='tcpreplay_opts.c' object='tcpreplay-tcpreplay_opts.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tcpreplay_CFLAGS) $(CFLAGS) -c -o tcpreplay-tcpreplay_opts.obj `if test -f 'tcpreplay_opts.c'; then $(CYGPATH_W) 'tcpreplay_opts.c'; else $(CYGPATH_W) '$(srcdir)/tcpreplay_opts.c'; fi`
-
 tcprewrite-tcprewrite_opts.o: tcprewrite_opts.c
 @am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tcprewrite_CFLAGS) $(CFLAGS) -MT tcprewrite-tcprewrite_opts.o -MD -MP -MF $(DEPDIR)/tcprewrite-tcprewrite_opts.Tpo -c -o tcprewrite-tcprewrite_opts.o `test -f 'tcprewrite_opts.c' || echo '$(srcdir)/'`tcprewrite_opts.c
 @am__fastdepCC_TRUE@	mv -f $(DEPDIR)/tcprewrite-tcprewrite_opts.Tpo $(DEPDIR)/tcprewrite-tcprewrite_opts.Po
@@ -761,8 +825,8 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS
 
@@ -787,8 +851,8 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
 	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
@@ -798,13 +862,12 @@ ctags: CTAGS
 CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
 	tags=; \
-	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	test -z "$(CTAGS_ARGS)$$tags$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
 	     $$tags $$unique

+ 1 - 0
src/common.h

@@ -15,6 +15,7 @@
 #include "common/services.h"
 #include "common/utils.h"
 #include "common/xX.h"
+#include "common/rdtsc.h"
 #include "common/tcpdump.h"
 #include "common/timer.h"
 #include "common/abort.h"

BIN
src/common/._sendpacket.c


+ 2 - 2
src/common/Makefile.am

@@ -14,7 +14,7 @@ svn_version.c:
 libcommon_a_SOURCES = cidr.c err.c list.c cache.c services.c get.c \
 		      fakepcap.c fakepcapnav.c fakepoll.c xX.c utils.c \
 		      timer.c svn_version.c abort.c sendpacket.c \
-			  dlt_names.c mac.c interface.c
+			  dlt_names.c mac.c interface.c rdtsc.c
 
 if ENABLE_TCPDUMP
 libcommon_a_SOURCES += tcpdump.c
@@ -27,7 +27,7 @@ libcommon_a_LIBADD = ../../lib/libstrl.a
 noinst_HEADERS = cidr.h err.h list.h cache.h services.h get.h \
 		 fakepcap.h fakepcapnav.h fakepoll.h xX.h utils.h \
 		 tcpdump.h timer.h abort.h pcap_dlt.h sendpacket.h \
-		 dlt_names.h mac.h interface.h
+		 dlt_names.h mac.h interface.h rdtsc.h
 
 MOSTLYCLEANFILES = *~
 

+ 21 - 14
src/common/Makefile.in

@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.10 from Makefile.am.
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -52,7 +52,7 @@ libcommon_a_DEPENDENCIES = ../../lib/libstrl.a
 am__libcommon_a_SOURCES_DIST = cidr.c err.c list.c cache.c services.c \
 	get.c fakepcap.c fakepcapnav.c fakepoll.c xX.c utils.c timer.c \
 	svn_version.c abort.c sendpacket.c dlt_names.c mac.c \
-	interface.c tcpdump.c
+	interface.c rdtsc.c tcpdump.c
 @ENABLE_TCPDUMP_TRUE@am__objects_1 = tcpdump.$(OBJEXT)
 am_libcommon_a_OBJECTS = cidr.$(OBJEXT) err.$(OBJEXT) list.$(OBJEXT) \
 	cache.$(OBJEXT) services.$(OBJEXT) get.$(OBJEXT) \
@@ -60,9 +60,9 @@ am_libcommon_a_OBJECTS = cidr.$(OBJEXT) err.$(OBJEXT) list.$(OBJEXT) \
 	xX.$(OBJEXT) utils.$(OBJEXT) timer.$(OBJEXT) \
 	svn_version.$(OBJEXT) abort.$(OBJEXT) sendpacket.$(OBJEXT) \
 	dlt_names.$(OBJEXT) mac.$(OBJEXT) interface.$(OBJEXT) \
-	$(am__objects_1)
+	rdtsc.$(OBJEXT) $(am__objects_1)
 libcommon_a_OBJECTS = $(am_libcommon_a_OBJECTS)
-DEFAULT_INCLUDES = -I. -I$(top_builddir)/src@am__isrc@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src
 depcomp = $(SHELL) $(top_srcdir)/config/depcomp
 am__depfiles_maybe = depfiles
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
@@ -93,6 +93,7 @@ CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CUT = @CUT@
 CXX = @CXX@
 CXXCPP = @CXXCPP@
 CXXDEPMODE = @CXXDEPMODE@
@@ -100,6 +101,8 @@ CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DMALLOC_LIB = @DMALLOC_LIB@
+DSYMUTIL = @DSYMUTIL@
 ECHO = @ECHO@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
@@ -115,6 +118,8 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
 LDFLAGS = @LDFLAGS@
+LDNETINC = @LDNETINC@
+LDNETLIB = @LDNETLIB@
 LIBOBJS = @LIBOBJS@
 LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@
 LIBOPTS_DIR = @LIBOPTS_DIR@
@@ -132,6 +137,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
+NMEDIT = @NMEDIT@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -208,6 +214,7 @@ target_cpu = @target_cpu@
 target_os = @target_os@
 target_vendor = @target_vendor@
 tcpdump_path = @tcpdump_path@
+top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 
@@ -217,13 +224,13 @@ BUILT_SOURCES = svn_version.c
 libcommon_a_SOURCES = cidr.c err.c list.c cache.c services.c get.c \
 	fakepcap.c fakepcapnav.c fakepoll.c xX.c utils.c timer.c \
 	svn_version.c abort.c sendpacket.c dlt_names.c mac.c \
-	interface.c $(am__append_1)
+	interface.c rdtsc.c $(am__append_1)
 AM_CFLAGS = -I.. -I../.. $(LNAV_CFLAGS)
 libcommon_a_LIBADD = ../../lib/libstrl.a
 noinst_HEADERS = cidr.h err.h list.h cache.h services.h get.h \
 		 fakepcap.h fakepcapnav.h fakepoll.h xX.h utils.h \
 		 tcpdump.h timer.h abort.h pcap_dlt.h sendpacket.h \
-		 dlt_names.h mac.h interface.h
+		 dlt_names.h mac.h interface.h rdtsc.h
 
 MOSTLYCLEANFILES = *~
 MAINTAINERCLEANFILES = Makefile.in svn_version.c
@@ -287,6 +294,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/interface.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mac.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rdtsc.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sendpacket.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/services.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/svn_version.Po@am__quote@
@@ -327,8 +335,8 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS
 
@@ -340,8 +348,8 @@ TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
 	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
@@ -351,13 +359,12 @@ ctags: CTAGS
 CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
 	tags=; \
-	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	test -z "$(CTAGS_ARGS)$$tags$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
 	     $$tags $$unique

+ 1 - 1
src/common/cache.c

@@ -1,4 +1,4 @@
-/* $Id: cache.c 1921 2007-10-25 18:18:50Z aturner $ */
+/* $Id: cache.c 1907 2007-10-05 23:24:38Z aturner $ */
 
 /*
  * Copyright (c) 2001-2005 Aaron Turner.

+ 5 - 1
src/common/err.h

@@ -1,4 +1,4 @@
-/* $Id: err.h 1817 2007-04-17 06:50:44Z aturner $ */
+/* $Id: err.h 1963 2008-01-23 18:21:40Z aturner $ */
 
 /*
  * err.h
@@ -58,6 +58,10 @@
  * notice() - Informational only via stderr, format string, one or more variables
  */
 
+/* gcc accepts __FUNCTION__, but C99 says use __func__.  Necessary for SunPro compiler */
+#if !defined(__GNUC__) && !defined(__FUNCTION__)
+#  define __FUNCTION__ __func__
+#endif
 
 #define dbg(x, y) _our_verbose_dbg(x, y, __FUNCTION__, __LINE__, __FILE__)
 void _our_verbose_dbg(int dbg_level, const char *string, const char *, 

+ 12 - 12
src/common/get.c

@@ -1,4 +1,4 @@
-/* $Id: get.c 1897 2007-08-25 04:57:38Z aturner $ */
+/* $Id: get.c 1991 2008-04-26 22:22:05Z aturner $ */
 
 /*
  * Copyright (c) 2001-2005 Aaron Turner.
@@ -110,9 +110,9 @@ get_l2protocol(const u_char *pktdata, const int datalen, const int datalink)
         switch (ether_type) {
         case ETHERTYPE_VLAN: /* 802.1q */
             vlan_hdr = (vlan_hdr_t *)pktdata;
-            return vlan_hdr->vlan_len;
+            return ntohs(vlan_hdr->vlan_len);
         default:
-            return ether_type; /* yes, return it in nbo */
+            return ether_type; /* yes, return it in host byte order */
         }
         break;
 
@@ -155,15 +155,15 @@ get_l2len(const u_char *pktdata, const int datalen, const int datalink)
         break;
 
     case DLT_EN10MB:
-        eth_hdr = (eth_hdr_t *)pktdata;
-        ether_type = ntohs(eth_hdr->ether_type);
-        switch (ether_type) {
-        case ETHERTYPE_VLAN:            /* 802.1q */
-            return TCPR_802_1Q_H;
-            break;
-        default:              /* ethernet */
-            return TCPR_ETH_H;
-            break;
+        eth_hdr = (struct tcpr_ethernet_hdr *)pktdata;
+        switch (ntohs(eth_hdr->ether_type)) {
+            case ETHERTYPE_VLAN:
+                return 18;
+                break;
+        
+            default:
+                return 14;
+                break;
         }
         break;
         

+ 1 - 1
src/common/interface.c

@@ -1,4 +1,4 @@
-/* $Id: interface.c 1928 2007-10-26 17:21:35Z aturner $ */
+/* $Id: interface.c 1927 2007-10-26 17:19:58Z aturner $ */
 
 /*
  * Copyright (c) 2007 Aaron Turner.

+ 79 - 0
src/common/rdtsc.c

@@ -0,0 +1,79 @@
+/* $Id:$ */
+
+/*
+ * Copyright (c) 2008 Aaron Turner.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the names of the copyright owners nor the names of its
+ *    contributors may be used to endorse or promote products derived from
+ *    this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+ * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "defines.h"
+#include "common.h"
+
+#include <sys/types.h>
+#include <errno.h>
+#include <string.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+/*
+ * returns the # of clicks/usec
+ */
+u_int64_t
+rdtsc_calibrate(u_int32_t mhz)
+{
+    static u_int64_t x = 0;
+    u_int64_t v = 0;
+    struct timeval start, end, diff;
+    u_int64_t x1, x2;
+    u_int16_t n;
+    
+    if (x != 0) {
+        return x;
+    } else if (mhz > 0 && x == 0) {
+        x = (u_int64_t)mhz;
+        notice("Using user specification of %llu Mhz", x);
+    } else {
+        /* haven't calculated clicks/usec yet */
+        for (n=0; n<16; ++n) {
+            gettimeofday(&start, 0);
+            x1 = rdtsc();
+
+            usleep(100000);
+
+            x2 = rdtsc();
+            gettimeofday(&end, 0);
+
+            timersub(&end, &start, &diff);
+
+            v = (x2 - x1)/(diff.tv_sec * 1000000 + diff.tv_usec);
+            x = x ? (x + v)/2 : v;
+        }
+        notice("Using guessimate of %llu Mhz", x);
+    }
+    return x;
+}

+ 125 - 0
src/common/rdtsc.h

@@ -0,0 +1,125 @@
+/* $Id:$ */
+
+/*
+ * Copyright (c) 2008 Aaron Turner.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the names of the copyright owners nor the names of its
+ *    contributors may be used to endorse or promote products derived from
+ *    this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+ * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+/*
+ * Read TimeStamp Counter (RDTSC)
+ * http://www-unix.mcs.anl.gov/~kazutomo/rdtsc.html
+ * I'm not really sure what the license is, but I'll assume Kazutomo Yoshii is 
+ * cool with me using it since he published it on his website.
+ * Should also check out: http://www.fftw.org/cycle.h
+ */
+
+#ifndef __RDTSC_H__
+#define __RDTSC_H__
+
+
+u_int64_t rdtsc_calibrate(u_int32_t mhz);
+
+#if defined(__i386__)
+#define HAVE_RDTSC 1
+
+static inline u_int64_t 
+rdtsc(void)
+{
+    u_int64_t x;
+    __asm__ volatile (".byte 0x0f, 0x31" : "=A" (x));
+    return x;
+}
+
+#elif defined(__x86_64__)
+#define HAVE_RDTSC 1
+
+static inline u_int64_t 
+rdtsc(void)
+{
+    unsigned hi, lo;
+    __asm__ __volatile__ ("rdtsc" : "=a"(lo), "=d"(hi));
+    return ( (u_int64_t)lo)|( ((u_int64_t)hi)<<32 );
+}
+
+#elif defined(__powerpc__)
+#define HAVE_RDTSC 1
+
+static inline u_int64_t 
+rdtsc(void)
+{
+    u_int64_t result=0;
+    u_int32_t upper, lower,tmp;
+    __asm__ volatile(
+        "0:                  \n"
+        "\tmftbu   %0           \n"
+        "\tmftb    %1           \n"
+        "\tmftbu   %2           \n"
+        "\tcmpw    %2,%0        \n"
+        "\tbne     0b         \n"
+        : "=r"(upper),"=r"(lower),"=r"(tmp)
+        );
+    result = upper;
+    result = result<<32;
+    result = result|lower;
+
+    return(result);
+}
+
+#else
+
+/* do not HAVE_RDTSC for your platform */
+
+#endif
+
+/* only define rdtsc_sleep() if we have rdtsc() */
+#ifdef HAVE_RDTSC
+/*
+ * sleeps for sleep time, using the rdtsc counter for accuracy
+ * you need to call rdtsc_calibrate() BEFORE this or you'll sleep for 
+ * an additional .1 sec the very first time you call it.
+ */
+static inline void
+rdtsc_sleep(const struct timespec sleep)
+{
+    u_int64_t sleep_until;
+    u_int64_t now = 0;
+    static u_int64_t clicks_per_usec = 0;
+
+    sleep_until = rdtsc();
+    clicks_per_usec = clicks_per_usec > 0 ? clicks_per_usec : rdtsc_calibrate(0);
+    
+    sleep_until += clicks_per_usec * TIMESPEC_TO_MICROSEC(&sleep);
+    
+    while (now < sleep_until)
+        now = rdtsc();
+}
+#endif
+
+#endif /* __RDTSC_H__ */
+

+ 131 - 53
src/common/sendpacket.c

@@ -1,4 +1,4 @@
-/* $Id: sendpacket.c 1935 2007-11-01 16:46:28Z aturner $ */
+/* $Id: sendpacket.c 2024 2008-05-06 19:39:35Z aturner $ */
 
 /*
  * Copyright (c) 2006 Aaron Turner.
@@ -70,23 +70,43 @@
 #include "sendpacket.h"
 
 
-/* Allow users to force the injection method */
+/* Allow users to force the injection method, default is linux PF_PACKET */
+#define INJECT_METHOD "PF_PACKET send()"
+
 #ifdef FORCE_INJECT_LIBNET
+#undef HAVE_PF_PACKET
 #undef HAVE_PCAP_INJECT
 #undef HAVE_PCAP_SENDPACKET
 #undef HAVE_BPF
-#elif defined FORCE_INJECT_BPF
+#undef INJECT_METHOD
+#define INJECT_METHOD "libnet send()"
+#endif
+
+#ifdef FORCE_INJECT_BPF
 #undef HAVE_LIBNET
 #undef HAVE_PCAP_INJECT
 #undef HAVE_PCAP_SENDPACKET
-#elif defined FORCE_INJECT_PCAP_INJECT
+#undef HAVE_PF_PACKET
+#undef INJECT_METHOD
+#define INJECT_METHOD "bpf send()"
+#endif
+
+#ifdef FORCE_INJECT_PCAP_INJECT
 #undef HAVE_LIBNET
 #undef HAVE_PCAP_SENDPACKET
 #undef HAVE_BPF
-#elif defined FORCE_INJECT_PCAP_SENDPACKET
+#undef HAVE_PF_PACKET
+#undef INJECT_METHOD
+#define INJECT_METHOD "pcap_inject()"
+#endif
+
+#ifdef FORCE_INJECT_PCAP_SENDPACKET
 #undef HAVE_LIBNET
 #undef HAVE_PCAP_INJECT
 #undef HAVE_BPF
+#undef HAVE_PF_PACKET
+#undef INJECT_METHOD
+#define INJECT_METHOD "pcap_sendpacket()"
 #endif
 
 
@@ -171,6 +191,10 @@ extern volatile int didsig;
  * Note: it is theoretically possible to get a return code >0 and < len
  * which for most people would be considered an error (the packet wasn't fully sent)
  * so you may want to test for recode != len too.
+ *
+ * Most socket API's have two interesting errors: ENOBUFS & EAGAIN.  ENOBUFS
+ * is usually due to the kernel buffers being full.  EAGAIN happens when you
+ * try to send traffic faster then the PHY allows.
  */
 int
 sendpacket(sendpacket_t *sp, const u_char *data, size_t len)
@@ -188,36 +212,67 @@ TRY_SEND_AGAIN:
 
 #if def