diff --git a/Makefile.in b/Makefile.in index f02746344..ee1704c6b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -215,6 +215,7 @@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ debug_flag = @debug_flag@ +depmod = @depmod@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ @@ -229,6 +230,7 @@ infodir = @infodir@ install_sh = @install_sh@ kerneldir = @kerneldir@ kernelext = @kernelext@ +kerneluname = @kerneluname@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ @@ -236,6 +238,7 @@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ +moduledir = @moduledir@ nic1 = @nic1@ nic2 = @nic2@ oldincludedir = @oldincludedir@ diff --git a/acinclude.m4 b/acinclude.m4 index 51d8659f1..0e4d3f9ff 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -41,9 +41,10 @@ AC_DEFUN([AC_PATH_KERNEL_SOURCE_SEARCH], fi if test x${no_kernel} != xyes; then - if test -f ${kerneldir}/Makefile; then + if test -f ${kerneldir}/Makefile -a -f ${kerneldir}/.config; then version=$( sed -n '/^VERSION/s/.*=\ *//p' ${kerneldir}/Makefile ) patchlevel=$( sed -n -e '/^PATCHLEVEL/s/.*=\ *//p' ${kerneldir}/Makefile ) + kerneluname=$( sed -n '/Linux kernel version/s/.*:\ *//p' ${kerneldir}/.config ) if test "${version}" -eq 2; then if test "${patchlevel}" -lt 5; then kernelext=o @@ -54,9 +55,11 @@ AC_DEFUN([AC_PATH_KERNEL_SOURCE_SEARCH], no_kernel=yes fi fi + ac_cv_have_kernel="no_kernel=${no_kernel} \ kerneldir=\"${kerneldir}\" \ kernelext=\"${kernelext}\"" + ] ) diff --git a/configure b/configure index 6f5c61e19..6d2767a45 100755 --- a/configure +++ b/configure @@ -769,6 +769,10 @@ COMPILE_FRAGROUTE_FALSE COMPILE_FRAGROUTE_TRUE LDNETLIB LDNETINC +SANDBOXED_FALSE +SANDBOXED_TRUE +kerneluname +moduledir KERNEL_DIR kernelext kerneldir @@ -793,6 +797,7 @@ WORDS_BIGENDIAN_TRUE SYSTEM_STRLCPY_FALSE SYSTEM_STRLCPY_TRUE LIBOBJS +depmod GROFF AUTOGEN CUT @@ -948,6 +953,8 @@ enable_dynamic_link with_libpcap with_netmap with_kernel +with_moduledir +enable_sandboxed with_libdnet with_pcapnav_config with_tcpdump @@ -1621,6 +1628,7 @@ Optional Features: Force using libpcap's pcap_sendpacket() for sending packets --enable-dynamic-link Dynamically link libraries + --enable-sandboxed Don't install anything to the kernel module directories --enable-local-libopts Use the supplied libopts tearoff code --enable-libopts-install Install libopts with client installation @@ -1637,6 +1645,7 @@ Optional Packages: --with-libpcap=DIR Use libpcap in DIR --with-netmap=DIR Use netmap in DIR --with-kernel=DIR Use Linux kernel sources in DIR + --with-moduledir=DIR kernel modules in DIR (/lib/modules/${kerneluname}/misc) --with-libdnet=DIR Use libdnet in DIR --with-pcapnav-config=FILE Use given pcapnav-config @@ -5184,13 +5193,13 @@ if test "${lt_cv_nm_interface+set}" = set; then : else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:5187: $ac_compile\"" >&5) + (eval echo "\"\$as_me:5196: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:5190: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:5199: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:5193: output\"" >&5) + (eval echo "\"\$as_me:5202: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -6396,7 +6405,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 6399 "configure"' > conftest.$ac_ext + echo '#line 6408 "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -7922,11 +7931,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7925: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7934: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7929: \$? = $ac_status" >&5 + echo "$as_me:7938: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8261,11 +8270,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8264: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8273: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8268: \$? = $ac_status" >&5 + echo "$as_me:8277: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8366,11 +8375,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8369: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8378: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8373: \$? = $ac_status" >&5 + echo "$as_me:8382: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8421,11 +8430,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8424: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8433: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8428: \$? = $ac_status" >&5 + echo "$as_me:8437: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -10805,7 +10814,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10808 "configure" +#line 10817 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10901,7 +10910,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10904 "configure" +#line 10913 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -14206,11 +14215,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14209: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14218: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:14213: \$? = $ac_status" >&5 + echo "$as_me:14222: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -14305,11 +14314,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14308: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14317: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:14312: \$? = $ac_status" >&5 + echo "$as_me:14321: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -14357,11 +14366,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14360: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14369: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:14364: \$? = $ac_status" >&5 + echo "$as_me:14373: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -15797,6 +15806,48 @@ $as_echo "no" >&6; } fi +# Extract the first word of "depmod", so it can be a program name with args. +set dummy depmod; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_depmod+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $depmod in + [\\/]* | ?:[\\/]*) + ac_cv_path_depmod="$depmod" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/sbin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_depmod="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_depmod" && ac_cv_path_depmod="/sbin/depmod" + ;; +esac +fi +depmod=$ac_cv_path_depmod +if test -n "$depmod"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $depmod" >&5 +$as_echo "$depmod" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + AUTOGEN_VERSION="unknown - man pages will not be built" if test -n "${AUTOGEN}" ; then @@ -19716,9 +19767,10 @@ if test "${with_kernel+set}" = set; then : fi if test x${no_kernel} != xyes; then - if test -f ${kerneldir}/Makefile; then + if test -f ${kerneldir}/Makefile -a -f ${kerneldir}/.config; then version=$( sed -n '/^VERSION/s/.*=\ *//p' ${kerneldir}/Makefile ) patchlevel=$( sed -n -e '/^PATCHLEVEL/s/.*=\ *//p' ${kerneldir}/Makefile ) + kerneluname=$( sed -n '/Linux kernel version/s/.*:\ *//p' ${kerneldir}/.config ) if test "${version}" -eq 2; then if test "${patchlevel}" -lt 5; then kernelext=o @@ -19729,11 +19781,13 @@ if test "${with_kernel+set}" = set; then : no_kernel=yes fi fi + ac_cv_have_kernel="no_kernel=${no_kernel} \ kerneldir=\"${kerneldir}\" \ kernelext=\"${kernelext}\"" + else ac_kerneldir="" if test "${ac_cv_have_kernel+set}" = set; then : @@ -19772,9 +19826,10 @@ else fi if test x${no_kernel} != xyes; then - if test -f ${kerneldir}/Makefile; then + if test -f ${kerneldir}/Makefile -a -f ${kerneldir}/.config; then version=$( sed -n '/^VERSION/s/.*=\ *//p' ${kerneldir}/Makefile ) patchlevel=$( sed -n -e '/^PATCHLEVEL/s/.*=\ *//p' ${kerneldir}/Makefile ) + kerneluname=$( sed -n '/Linux kernel version/s/.*:\ *//p' ${kerneldir}/.config ) if test "${version}" -eq 2; then if test "${patchlevel}" -lt 5; then kernelext=o @@ -19785,11 +19840,13 @@ else no_kernel=yes fi fi + ac_cv_have_kernel="no_kernel=${no_kernel} \ kerneldir=\"${kerneldir}\" \ kernelext=\"${kernelext}\"" + fi @@ -19817,6 +19874,38 @@ $as_echo "#define HAVE_QUICK_TX 1" >>confdefs.h fi + +if test x${kerneluname} = x ; then + kerneluname=`uname -r` +fi +default_moduledir=/lib/modules/${kerneluname}/misc + +# Check whether --with-moduledir was given. +if test "${with_moduledir+set}" = set; then : + withval=$with_moduledir; moduledir=${withval} +else + moduledir=${default_moduledir} +fi + + + + +# Check whether --enable-sandboxed was given. +if test "${enable_sandboxed+set}" = set; then : + enableval=$enable_sandboxed; enable_sandboxed="${enableval}" +else + enable_sandboxed="no" +fi + + if test x$enable_sandboxed = xyes; then + SANDBOXED_TRUE= + SANDBOXED_FALSE='#' +else + SANDBOXED_TRUE='#' + SANDBOXED_FALSE= +fi + + founddnet=no have_libdnet=no libdnet_version= @@ -22073,7 +22162,7 @@ $as_echo "#define NO_OPTIONAL_OPT_ARGS 1" >>confdefs.h -ac_config_files="$ac_config_files Makefile doxygen.cfg lib/Makefile docs/Makefile kernel/Makefile kernel/linux/Makefile kernel/linux/example/Makefile kernel/linux/quick_tx/Makefile src/Makefile src/tcpedit/Makefile src/fragroute/Makefile src/defines.h test/Makefile test/config scripts/Makefile" +ac_config_files="$ac_config_files Makefile doxygen.cfg lib/Makefile docs/Makefile kernel/Makefile kernel/linux/Makefile kernel/linux/example/Makefile kernel/linux/quick_tx/Makefile src/Makefile src/tcpedit/Makefile src/fragroute/Makefile src/common/Makefile src/defines.h test/Makefile test/config scripts/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -22221,6 +22310,10 @@ if test -z "${COMPILE_NETMAP_TRUE}" && test -z "${COMPILE_NETMAP_FALSE}"; then as_fn_error "conditional \"COMPILE_NETMAP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${SANDBOXED_TRUE}" && test -z "${SANDBOXED_FALSE}"; then + as_fn_error "conditional \"SANDBOXED\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${COMPILE_FRAGROUTE_TRUE}" && test -z "${COMPILE_FRAGROUTE_FALSE}"; then as_fn_error "conditional \"COMPILE_FRAGROUTE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -23204,6 +23297,7 @@ do "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "src/tcpedit/Makefile") CONFIG_FILES="$CONFIG_FILES src/tcpedit/Makefile" ;; "src/fragroute/Makefile") CONFIG_FILES="$CONFIG_FILES src/fragroute/Makefile" ;; + "src/common/Makefile") CONFIG_FILES="$CONFIG_FILES src/common/Makefile" ;; "src/defines.h") CONFIG_FILES="$CONFIG_FILES src/defines.h" ;; "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;; "test/config") CONFIG_FILES="$CONFIG_FILES test/config" ;; diff --git a/configure.ac b/configure.ac index 7f80399b5..642b87b04 100644 --- a/configure.ac +++ b/configure.ac @@ -71,6 +71,7 @@ AC_PATH_PROG(ECHO, echo) AC_PATH_PROG(CUT, cut) AC_PATH_PROG(AUTOGEN, autogen) AC_PATH_PROG(GROFF, groff) +AC_PATH_PROG(depmod, depmod, /sbin/depmod, $PATH:/sbin) dnl check autogen version AUTOGEN_VERSION="unknown - man pages will not be built" @@ -1101,6 +1102,26 @@ if test x${no_kernel} != xyes; then fi AC_SUBST(KERNEL_DIR) +dnl * Set destination directory for kernel modules + +if test x${kerneluname} = x ; then + kerneluname=`uname -r` +fi +default_moduledir=/lib/modules/${kerneluname}/misc +AC_ARG_WITH(moduledir, +[ --with-moduledir=DIR kernel modules in DIR (/lib/modules/${kerneluname}/misc)], +moduledir=${withval}, +moduledir=${default_moduledir}) +AC_SUBST(moduledir) +AC_SUBST(kerneluname) + +dnl * Allow kernel sandbox mode (prevent depmod execution) +AC_ARG_ENABLE(sandboxed, +[ --enable-sandboxed Don't install anything to the kernel module directories], +[ enable_sandboxed="${enableval}" ], +[ enable_sandboxed="no"]) +AM_CONDITIONAL(SANDBOXED, test x$enable_sandboxed = xyes) + dnl ################################################## dnl # Check for libdnet, but only if not Cygwin! dnl ################################################## @@ -1532,6 +1553,7 @@ AC_OUTPUT([Makefile src/Makefile src/tcpedit/Makefile src/fragroute/Makefile + src/common/Makefile src/defines.h test/Makefile test/config diff --git a/docs/Makefile.in b/docs/Makefile.in index d3bf82f06..c41593e18 100644 --- a/docs/Makefile.in +++ b/docs/Makefile.in @@ -159,6 +159,7 @@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ debug_flag = @debug_flag@ +depmod = @depmod@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ @@ -173,6 +174,7 @@ infodir = @infodir@ install_sh = @install_sh@ kerneldir = @kerneldir@ kernelext = @kernelext@ +kerneluname = @kerneluname@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ @@ -180,6 +182,7 @@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ +moduledir = @moduledir@ nic1 = @nic1@ nic2 = @nic2@ oldincludedir = @oldincludedir@ diff --git a/kernel/Makefile.in b/kernel/Makefile.in index f589ccc57..6ed9954eb 100644 --- a/kernel/Makefile.in +++ b/kernel/Makefile.in @@ -201,6 +201,7 @@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ debug_flag = @debug_flag@ +depmod = @depmod@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ @@ -215,6 +216,7 @@ infodir = @infodir@ install_sh = @install_sh@ kerneldir = @kerneldir@ kernelext = @kernelext@ +kerneluname = @kerneluname@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ @@ -222,6 +224,7 @@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ +moduledir = @moduledir@ nic1 = @nic1@ nic2 = @nic2@ oldincludedir = @oldincludedir@ diff --git a/kernel/linux/Makefile.in b/kernel/linux/Makefile.in index 4867bd30e..b587ab1cc 100644 --- a/kernel/linux/Makefile.in +++ b/kernel/linux/Makefile.in @@ -201,6 +201,7 @@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ debug_flag = @debug_flag@ +depmod = @depmod@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ @@ -215,6 +216,7 @@ infodir = @infodir@ install_sh = @install_sh@ kerneldir = @kerneldir@ kernelext = @kernelext@ +kerneluname = @kerneluname@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ @@ -222,6 +224,7 @@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ +moduledir = @moduledir@ nic1 = @nic1@ nic2 = @nic2@ oldincludedir = @oldincludedir@ diff --git a/kernel/linux/example/Makefile.am b/kernel/linux/example/Makefile.am index 7a5c27985..6334f22bf 100644 --- a/kernel/linux/example/Makefile.am +++ b/kernel/linux/example/Makefile.am @@ -4,4 +4,6 @@ bin_PROGRAMS = pcapsend pcapsend_SOURCES = pcapsend.c ../include/linux/quick_tx.h pcapsend_CFLAGS = -I../include -MOSTLYCLEANFILES = *~ *.o *.Po pcapsend \ No newline at end of file +MOSTLYCLEANFILES = *~ *.o *.Po pcapsend + +MAINTAINERCLEANFILES = Makefile.in \ No newline at end of file diff --git a/kernel/linux/example/Makefile.in b/kernel/linux/example/Makefile.in index 33bb8cad3..65d348d32 100644 --- a/kernel/linux/example/Makefile.in +++ b/kernel/linux/example/Makefile.in @@ -186,6 +186,7 @@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ debug_flag = @debug_flag@ +depmod = @depmod@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ @@ -200,6 +201,7 @@ infodir = @infodir@ install_sh = @install_sh@ kerneldir = @kerneldir@ kernelext = @kernelext@ +kerneluname = @kerneluname@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ @@ -207,6 +209,7 @@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ +moduledir = @moduledir@ nic1 = @nic1@ nic2 = @nic2@ oldincludedir = @oldincludedir@ @@ -232,6 +235,7 @@ top_srcdir = @top_srcdir@ pcapsend_SOURCES = pcapsend.c ../include/linux/quick_tx.h pcapsend_CFLAGS = -I../include MOSTLYCLEANFILES = *~ *.o *.Po pcapsend +MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: @@ -477,6 +481,7 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am diff --git a/kernel/linux/include/linux/quick_tx.h b/kernel/linux/include/linux/quick_tx.h index 7a67c80d4..2b0a71186 100644 --- a/kernel/linux/include/linux/quick_tx.h +++ b/kernel/linux/include/linux/quick_tx.h @@ -525,7 +525,7 @@ static inline int __check_error_flags(struct quick_tx_shared_data* data) { return 0; } -static inline void __wake_up_module(struct quick_tx* dev) { +static inline void quick_tx_wakeup(struct quick_tx* dev) { dev->data->consumer_wait_lookup_flag = 1; wmb(); ioctl(dev->fd, QTX_START_TX); @@ -586,7 +586,7 @@ static inline int quick_tx_send_packet(struct quick_tx* dev, const void* buffer, /* Find the next suitable location for this packet */ while (!__get_write_offset_and_inc(dev, full_length, &entry->block_offset, &entry->mem_block_index)) { /* need to wake up kernel to process older skb's */ - __wake_up_module(dev); + quick_tx_wakeup(dev); /* poll for DMA block space */ __poll_for_dma(dev); @@ -609,7 +609,7 @@ static inline int quick_tx_send_packet(struct quick_tx* dev, const void* buffer, static int qtx_s = 0; if (qtx_s % (MEM_BLOCK_TABLE_SIZE >> 4) == 0) { - __wake_up_module(dev); + quick_tx_wakeup(dev); } qtx_s++; @@ -627,7 +627,7 @@ static inline int quick_tx_send_packet(struct quick_tx* dev, const void* buffer, if (__check_error_flags(dev->data) < 0) return -1; - __wake_up_module(dev); + quick_tx_wakeup(dev); __poll_for_lookup(dev); num_lookup_sleeps++; @@ -637,7 +637,7 @@ static inline int quick_tx_send_packet(struct quick_tx* dev, const void* buffer, static inline void quick_tx_wait_for_tx_complete(struct quick_tx* dev) { - __wake_up_module(dev); + quick_tx_wakeup(dev); __poll_for_done_tx(dev); } diff --git a/kernel/linux/quick_tx/Makefile.common b/kernel/linux/quick_tx/Makefile.common index 461904c3e..53b1f14e6 100644 --- a/kernel/linux/quick_tx/Makefile.common +++ b/kernel/linux/quick_tx/Makefile.common @@ -1,9 +1,19 @@ # Makefile.common -moduledir = @moduledir@ + +# where the kernel sources are located KERNEL_LOCATION=@kerneldir@ -KBUILD_VERBOSE = 0 + MOD_DEVDIR = $(PWD) +# some magic for using linux kernel settings +# when compiling module(s) +KBUILD_VERBOSE = 1 +QTX_EXTRA_CFLAGS = -DEXPORT_SYMTAB $(DEFS) \ + $(DEFAULT_INCLUDES) -I$(MOD_DEVDIR) -I$(MOD_DEVDIR)/$(builddir) \ + -I$(MOD_DEVDIR)/$(top_srcdir) -I$(MOD_DEVDIR)/$(top_builddir) \ + -I$(KERNEL_LOCATION)/include/ +export QTX_EXTRA_CFLAGS KERNEL_LOCATION module_DATA + export module_DATA export module_OBJECTS @@ -16,6 +26,32 @@ $(module_DATA): $(automake_dummy_SOURCES) KBUILD_VERBOSE=$(KBUILD_VERBOSE) mv Makefile.automake Makefile +install-moduleDATA: $(module_DATA) + $(mkinstalldirs) $(DESTDIR)$(moduledir) + @list='$(module_DATA:.o=.@kernelext@)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(moduledir)/$$f"; \ + $(INSTALL_DATA) $$d$$p $(DESTDIR)$(moduledir)/$$f; \ + done + +uninstall-moduleDATA: + @list='$(module_DATA:.o=.@kernelext@)'; for p in $$list; do \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " rm -f $(DESTDIR)$(moduledir)/$$f"; \ + rm -f $(DESTDIR)$(moduledir)/$$f; \ + done + + +if SANDBOXED +else +install-data-local: install-moduleDATA + -@depmod@ -a @kerneluname@ + +uninstall-local: uninstall-moduleDATA + -@depmod@ -a @kerneluname@ +endif + MOSTLYCLEANFILES = $(module_DATA) .$(module_DATA).flags $(module_DATA:.o=.mod.c) $(module_DATA:.o=.@kernelext@) *~ MAINTAINERCLEANFILES = Makefile.in \ No newline at end of file diff --git a/kernel/linux/quick_tx/Makefile.in b/kernel/linux/quick_tx/Makefile.in index 616427bd2..33c80d2c8 100644 --- a/kernel/linux/quick_tx/Makefile.in +++ b/kernel/linux/quick_tx/Makefile.in @@ -17,6 +17,8 @@ # kernel/linux/quick_tx/Makefile.am +# Makefile.common + VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ @@ -208,6 +210,7 @@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ debug_flag = @debug_flag@ +depmod = @depmod@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ @@ -222,6 +225,7 @@ infodir = @infodir@ install_sh = @install_sh@ kerneldir = @kerneldir@ kernelext = @kernelext@ +kerneluname = @kerneluname@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ @@ -229,6 +233,7 @@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ +moduledir = @moduledir@ nic1 = @nic1@ nic2 = @nic2@ oldincludedir = @oldincludedir@ @@ -266,11 +271,18 @@ module_OBJECTS = quick_tx_main.o \ quick_tx_worker_virtio_net.o -# Makefile.common -moduledir = @moduledir@ +# where the kernel sources are located KERNEL_LOCATION = @kerneldir@ -KBUILD_VERBOSE = 0 MOD_DEVDIR = $(PWD) + +# some magic for using linux kernel settings +# when compiling module(s) +KBUILD_VERBOSE = 1 +QTX_EXTRA_CFLAGS = -DEXPORT_SYMTAB $(DEFS) \ + $(DEFAULT_INCLUDES) -I$(MOD_DEVDIR) -I$(MOD_DEVDIR)/$(builddir) \ + -I$(MOD_DEVDIR)/$(top_srcdir) -I$(MOD_DEVDIR)/$(top_builddir) \ + -I$(KERNEL_LOCATION)/include/ + MOSTLYCLEANFILES = $(module_DATA) .$(module_DATA).flags $(module_DATA:.o=.mod.c) $(module_DATA:.o=.@kernelext@) *~ MAINTAINERCLEANFILES = Makefile.in all: all-am @@ -349,26 +361,6 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -install-moduleDATA: $(module_DATA) - @$(NORMAL_INSTALL) - test -z "$(moduledir)" || $(MKDIR_P) "$(DESTDIR)$(moduledir)" - @list='$(module_DATA)'; test -n "$(moduledir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(moduledir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(moduledir)" || exit $$?; \ - done - -uninstall-moduleDATA: - @$(NORMAL_UNINSTALL) - @list='$(module_DATA)'; test -n "$(moduledir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(moduledir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(moduledir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ @@ -486,6 +478,8 @@ maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +@SANDBOXED_TRUE@uninstall-local: +@SANDBOXED_TRUE@install-data-local: clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am @@ -508,7 +502,7 @@ info: info-am info-am: -install-data-am: install-moduleDATA +install-data-am: install-data-local install-moduleDATA install-dvi: install-dvi-am @@ -554,7 +548,7 @@ ps: ps-am ps-am: -uninstall-am: uninstall-moduleDATA +uninstall-am: uninstall-local uninstall-moduleDATA .MAKE: install-am install-strip @@ -562,16 +556,17 @@ uninstall-am: uninstall-moduleDATA clean-libtool ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir 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-moduleDATA \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am \ - uninstall-moduleDATA - + install-data install-data-am install-data-local install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-moduleDATA install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-local uninstall-moduleDATA + +export QTX_EXTRA_CFLAGS KERNEL_LOCATION module_DATA export module_DATA export module_OBJECTS @@ -585,6 +580,28 @@ $(module_DATA): $(automake_dummy_SOURCES) KBUILD_VERBOSE=$(KBUILD_VERBOSE) mv Makefile.automake Makefile +install-moduleDATA: $(module_DATA) + $(mkinstalldirs) $(DESTDIR)$(moduledir) + @list='$(module_DATA:.o=.@kernelext@)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(moduledir)/$$f"; \ + $(INSTALL_DATA) $$d$$p $(DESTDIR)$(moduledir)/$$f; \ + done + +uninstall-moduleDATA: + @list='$(module_DATA:.o=.@kernelext@)'; for p in $$list; do \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " rm -f $(DESTDIR)$(moduledir)/$$f"; \ + rm -f $(DESTDIR)$(moduledir)/$$f; \ + done + +@SANDBOXED_FALSE@install-data-local: install-moduleDATA +@SANDBOXED_FALSE@ -@depmod@ -a @kerneluname@ + +@SANDBOXED_FALSE@uninstall-local: uninstall-moduleDATA +@SANDBOXED_FALSE@ -@depmod@ -a @kerneluname@ + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/lib/Makefile.in b/lib/Makefile.in index 88f1bc3f3..e7d3ba4d9 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -186,6 +186,7 @@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ debug_flag = @debug_flag@ +depmod = @depmod@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ @@ -200,6 +201,7 @@ infodir = @infodir@ install_sh = @install_sh@ kerneldir = @kerneldir@ kernelext = @kernelext@ +kerneluname = @kerneluname@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ @@ -207,6 +209,7 @@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ +moduledir = @moduledir@ nic1 = @nic1@ nic2 = @nic2@ oldincludedir = @oldincludedir@ diff --git a/libopts/Makefile.in b/libopts/Makefile.in index 39076eef0..525349f9b 100644 --- a/libopts/Makefile.in +++ b/libopts/Makefile.in @@ -206,6 +206,7 @@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ debug_flag = @debug_flag@ +depmod = @depmod@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ @@ -220,6 +221,7 @@ infodir = @infodir@ install_sh = @install_sh@ kerneldir = @kerneldir@ kernelext = @kernelext@ +kerneluname = @kerneluname@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ @@ -227,6 +229,7 @@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ +moduledir = @moduledir@ nic1 = @nic1@ nic2 = @nic2@ oldincludedir = @oldincludedir@ diff --git a/scripts/Makefile.in b/scripts/Makefile.in index 99344282a..e96039cc6 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -159,6 +159,7 @@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ debug_flag = @debug_flag@ +depmod = @depmod@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ @@ -173,6 +174,7 @@ infodir = @infodir@ install_sh = @install_sh@ kerneldir = @kerneldir@ kernelext = @kernelext@ +kerneluname = @kerneluname@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ @@ -180,6 +182,7 @@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ +moduledir = @moduledir@ nic1 = @nic1@ nic2 = @nic2@ oldincludedir = @oldincludedir@ diff --git a/src/Makefile.am b/src/Makefile.am index 06cb0d429..20cfab5cc 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -145,7 +145,7 @@ MOSTLYCLEANFILES = *~ *.o MAINTAINERCLEANFILES = Makefile.in tcpreplay_opts.h tcpreplay_opts.c tcpliveplay_opts.c \ tcprewrite_opts.c tcprewrite_opts.h tcpprep_opts.c tcpliveplay_opts.h tcpcapinfo_opts.h \ - tcpprep_opts.h tcpprep.1 tcpreplay.1 tcprewrite.1 tcpliveplay.1 tcpcapinfo.1 \ + tcpcapinfo_opts.c tcpprep_opts.h tcpprep.1 tcpreplay.1 tcprewrite.1 tcpliveplay.1 tcpcapinfo.1 \ tcpbridge.1 tcpbridge_opts.h tcpbridge_opts.c \ tcpreplay_edit_opts.c tcpreplay_edit_opts.h \ tcpreplay-edit.1 diff --git a/src/Makefile.in b/src/Makefile.in index 72f8a1caf..8fea147c2 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -329,6 +329,7 @@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ debug_flag = @debug_flag@ +depmod = @depmod@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ @@ -343,6 +344,7 @@ infodir = @infodir@ install_sh = @install_sh@ kerneldir = @kerneldir@ kernelext = @kernelext@ +kerneluname = @kerneluname@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ @@ -350,6 +352,7 @@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ +moduledir = @moduledir@ nic1 = @nic1@ nic2 = @nic2@ oldincludedir = @oldincludedir@ @@ -433,7 +436,7 @@ noinst_HEADERS = tcpreplay.h tcpprep.h bridge.h defines.h tree.h tcpliveplay.h \ MOSTLYCLEANFILES = *~ *.o MAINTAINERCLEANFILES = Makefile.in tcpreplay_opts.h tcpreplay_opts.c tcpliveplay_opts.c \ tcprewrite_opts.c tcprewrite_opts.h tcpprep_opts.c tcpliveplay_opts.h tcpcapinfo_opts.h \ - tcpprep_opts.h tcpprep.1 tcpreplay.1 tcprewrite.1 tcpliveplay.1 tcpcapinfo.1 \ + tcpcapinfo_opts.c tcpprep_opts.h tcpprep.1 tcpreplay.1 tcprewrite.1 tcpliveplay.1 tcpcapinfo.1 \ tcpbridge.1 tcpbridge_opts.h tcpbridge_opts.c \ tcpreplay_edit_opts.c tcpreplay_edit_opts.h \ tcpreplay-edit.1 diff --git a/src/common/Makefile.in b/src/common/Makefile.in index e3d1458f1..06660c1e4 100644 --- a/src/common/Makefile.in +++ b/src/common/Makefile.in @@ -199,6 +199,7 @@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ debug_flag = @debug_flag@ +depmod = @depmod@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ @@ -213,6 +214,7 @@ infodir = @infodir@ install_sh = @install_sh@ kerneldir = @kerneldir@ kernelext = @kernelext@ +kerneluname = @kerneluname@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ @@ -220,6 +222,7 @@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ +moduledir = @moduledir@ nic1 = @nic1@ nic2 = @nic2@ oldincludedir = @oldincludedir@ diff --git a/src/fragroute/Makefile.in b/src/fragroute/Makefile.in index e2f0e24d1..511ce3451 100644 --- a/src/fragroute/Makefile.in +++ b/src/fragroute/Makefile.in @@ -204,6 +204,7 @@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ debug_flag = @debug_flag@ +depmod = @depmod@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ @@ -218,6 +219,7 @@ infodir = @infodir@ install_sh = @install_sh@ kerneldir = @kerneldir@ kernelext = @kernelext@ +kerneluname = @kerneluname@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ @@ -225,6 +227,7 @@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ +moduledir = @moduledir@ nic1 = @nic1@ nic2 = @nic2@ oldincludedir = @oldincludedir@ diff --git a/src/send_packets.c b/src/send_packets.c index 995b26401..832c0dac4 100644 --- a/src/send_packets.c +++ b/src/send_packets.c @@ -573,20 +573,17 @@ send_packets(tcpreplay_t *ctx, pcap_t *pcap, int idx) &ctx->stats.end_time, &start_us, &skip_length); #ifdef HAVE_QUICK_TX - if (options->quick_tx && (ctx->first_time || timesisset(&ctx->nap))) - ioctl(sp->handle.fd, QTX_START_TX, NULL); /* flush TX buffer */ + if (options->quick_tx && timesisset(&ctx->nap)) + quick_tx_wakeup(sp->qtx_dev); /* flush TX buffer */ #endif #ifdef HAVE_NETMAP - if (options->quick_tx && (ctx->first_time || timesisset(&ctx->nap))) + if (options->quick_tx && timesisset(&ctx->nap)) ioctl(sp->handle.fd, NIOCTXSYNC, NULL); /* flush TX buffer */ #endif if (timesisset(&ctx->nap)) tcpr_sleep(ctx, &ctx->nap, options->accurate); - - if (ctx->first_time) - ctx->first_time = 0; } SEND_NOW: @@ -631,6 +628,19 @@ send_packets(tcpreplay_t *ctx, pcap_t *pcap, int idx) } } } + + if (ctx->first_time) { +#ifdef HAVE_QUICK_TX + if (options->quick_tx) + quick_tx_wakeup(sp->qtx_dev); /* flush TX buffer */ +#endif + +#ifdef HAVE_NETMAP + if (options->quick_tx) + ioctl(sp->handle.fd, NIOCTXSYNC, NULL); /* flush TX buffer */ +#endif + ctx->first_time = 0; + } } /* while */ #ifdef HAVE_QUICK_TX @@ -811,12 +821,12 @@ send_dual_packets(tcpreplay_t *ctx, pcap_t *pcap1, int cache_file_idx1, pcap_t * &ctx->stats.end_time, &start_us, &skip_length); #ifdef HAVE_QUICK_TX - if (options->quick_tx && (ctx->first_time || timesisset(&ctx->nap))) - ioctl(sp->handle.fd, QTX_START_TX, NULL); /* flush TX buffer */ + if (options->quick_tx && timesisset(&ctx->nap)) + quick_tx_wakeup(sp->qtx_dev); /* flush TX buffer */ #endif #ifdef HAVE_NETMAP - if (options->quick_tx && (ctx->first_time || timesisset(&ctx->nap))) + if (options->quick_tx && timesisset(&ctx->nap)) ioctl(sp->handle.fd, NIOCTXSYNC, NULL); /* flush TX buffer */ #endif @@ -873,6 +883,19 @@ send_dual_packets(tcpreplay_t *ctx, pcap_t *pcap1, int cache_file_idx1, pcap_t * } else { pktdata1 = get_next_packet(ctx, pcap1, &pkthdr1, cache_file_idx1, prev_packet1); } + + if (ctx->first_time) { +#ifdef HAVE_QUICK_TX + if (options->quick_tx) + quick_tx_wakeup(sp->qtx_dev); /* flush TX buffer */ +#endif + +#ifdef HAVE_NETMAP + if (options->quick_tx) + ioctl(sp->handle.fd, NIOCTXSYNC, NULL); /* flush TX buffer */ +#endif + ctx->first_time = 0; + } } /* while */ #ifdef QTX_START_TX diff --git a/src/tcpedit/Makefile.in b/src/tcpedit/Makefile.in index 7ad392674..3e6e9857b 100644 --- a/src/tcpedit/Makefile.in +++ b/src/tcpedit/Makefile.in @@ -297,6 +297,7 @@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ debug_flag = @debug_flag@ +depmod = @depmod@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ @@ -311,6 +312,7 @@ infodir = @infodir@ install_sh = @install_sh@ kerneldir = @kerneldir@ kernelext = @kernelext@ +kerneluname = @kerneluname@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ @@ -318,6 +320,7 @@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ +moduledir = @moduledir@ nic1 = @nic1@ nic2 = @nic2@ oldincludedir = @oldincludedir@ diff --git a/src/tcpreplay_opts.def b/src/tcpreplay_opts.def index b07e6a2c7..b65804ac7 100644 --- a/src/tcpreplay_opts.def +++ b/src/tcpreplay_opts.def @@ -535,7 +535,7 @@ flag = { doc = <<- EOText This feature will detect detect the presence of the Quick TX module on Linux systems. If detected, tcpreplay packets will bypass the network stack and -will be written to the network driver via the Quick TX module This will allow +will be written to the network driver via the Quick TX module. This will allow you to achieve full line rates on commodity network adapters, similar to rates achieved by commercial network traffic generators. diff --git a/test/Makefile.in b/test/Makefile.in index 80884cf98..6e59df5ea 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -160,6 +160,7 @@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ debug_flag = @debug_flag@ +depmod = @depmod@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ @@ -174,6 +175,7 @@ infodir = @infodir@ install_sh = @install_sh@ kerneldir = @kerneldir@ kernelext = @kernelext@ +kerneluname = @kerneluname@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ @@ -181,6 +183,7 @@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ +moduledir = @moduledir@ nic1 = @nic1@ nic2 = @nic2@ oldincludedir = @oldincludedir@