Makefile.in 49 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162
  1. # Makefile.in generated by automake 1.15 from Makefile.am.
  2. # @configure_input@
  3. # Copyright (C) 1994-2014 Free Software Foundation, Inc.
  4. # This Makefile.in is free software; the Free Software Foundation
  5. # gives unlimited permission to copy and/or distribute it,
  6. # with or without modifications, as long as this notice is preserved.
  7. # This program is distributed in the hope that it will be useful,
  8. # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
  9. # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  10. # PARTICULAR PURPOSE.
  11. @SET_MAKE@
  12. VPATH = @srcdir@
  13. am__is_gnu_make = { \
  14. if test -z '$(MAKELEVEL)'; then \
  15. false; \
  16. elif test -n '$(MAKE_HOST)'; then \
  17. true; \
  18. elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
  19. true; \
  20. else \
  21. false; \
  22. fi; \
  23. }
  24. am__make_running_with_option = \
  25. case $${target_option-} in \
  26. ?) ;; \
  27. *) echo "am__make_running_with_option: internal error: invalid" \
  28. "target option '$${target_option-}' specified" >&2; \
  29. exit 1;; \
  30. esac; \
  31. has_opt=no; \
  32. sane_makeflags=$$MAKEFLAGS; \
  33. if $(am__is_gnu_make); then \
  34. sane_makeflags=$$MFLAGS; \
  35. else \
  36. case $$MAKEFLAGS in \
  37. *\\[\ \ ]*) \
  38. bs=\\; \
  39. sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
  40. | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
  41. esac; \
  42. fi; \
  43. skip_next=no; \
  44. strip_trailopt () \
  45. { \
  46. flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
  47. }; \
  48. for flg in $$sane_makeflags; do \
  49. test $$skip_next = yes && { skip_next=no; continue; }; \
  50. case $$flg in \
  51. *=*|--*) continue;; \
  52. -*I) strip_trailopt 'I'; skip_next=yes;; \
  53. -*I?*) strip_trailopt 'I';; \
  54. -*O) strip_trailopt 'O'; skip_next=yes;; \
  55. -*O?*) strip_trailopt 'O';; \
  56. -*l) strip_trailopt 'l'; skip_next=yes;; \
  57. -*l?*) strip_trailopt 'l';; \
  58. -[dEDm]) skip_next=yes;; \
  59. -[JT]) skip_next=yes;; \
  60. esac; \
  61. case $$flg in \
  62. *$$target_option*) has_opt=yes; break;; \
  63. esac; \
  64. done; \
  65. test $$has_opt = yes
  66. am__make_dryrun = (target_option=n; $(am__make_running_with_option))
  67. am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
  68. pkgdatadir = $(datadir)/@PACKAGE@
  69. pkgincludedir = $(includedir)/@PACKAGE@
  70. pkglibdir = $(libdir)/@PACKAGE@
  71. pkglibexecdir = $(libexecdir)/@PACKAGE@
  72. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
  73. install_sh_DATA = $(install_sh) -c -m 644
  74. install_sh_PROGRAM = $(install_sh) -c
  75. install_sh_SCRIPT = $(install_sh) -c
  76. INSTALL_HEADER = $(INSTALL_DATA)
  77. transform = $(program_transform_name)
  78. NORMAL_INSTALL = :
  79. PRE_INSTALL = :
  80. POST_INSTALL = :
  81. NORMAL_UNINSTALL = :
  82. PRE_UNINSTALL = :
  83. POST_UNINSTALL = :
  84. build_triplet = @build@
  85. host_triplet = @host@
  86. target_triplet = @target@
  87. subdir = test
  88. ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
  89. am__aclocal_m4_deps = $(top_srcdir)/m4/libopts.m4 \
  90. $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
  91. $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
  92. $(top_srcdir)/m4/lt~obsolete.m4 \
  93. $(top_srcdir)/m4/stdnoreturn.m4 $(top_srcdir)/acinclude.m4 \
  94. $(top_srcdir)/configure.ac
  95. am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
  96. $(ACLOCAL_M4)
  97. DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
  98. mkinstalldirs = $(install_sh) -d
  99. CONFIG_HEADER = $(top_builddir)/src/config.h
  100. CONFIG_CLEAN_FILES = config
  101. CONFIG_CLEAN_VPATH_FILES =
  102. AM_V_P = $(am__v_P_@AM_V@)
  103. am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
  104. am__v_P_0 = false
  105. am__v_P_1 = :
  106. AM_V_GEN = $(am__v_GEN_@AM_V@)
  107. am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
  108. am__v_GEN_0 = @echo " GEN " $@;
  109. am__v_GEN_1 =
  110. AM_V_at = $(am__v_at_@AM_V@)
  111. am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
  112. am__v_at_0 = @
  113. am__v_at_1 =
  114. SOURCES =
  115. DIST_SOURCES =
  116. am__can_run_installinfo = \
  117. case $$AM_UPDATE_INFO_DIR in \
  118. n|no|NO) false;; \
  119. *) (install-info --version) >/dev/null 2>&1;; \
  120. esac
  121. am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
  122. am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.in
  123. DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
  124. ACLOCAL = @ACLOCAL@
  125. AMTAR = @AMTAR@
  126. AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
  127. AR = @AR@
  128. AUTOCONF = @AUTOCONF@
  129. AUTOGEN = @AUTOGEN@
  130. AUTOHEADER = @AUTOHEADER@
  131. AUTOMAKE = @AUTOMAKE@
  132. AWK = @AWK@
  133. CC = @CC@
  134. CCDEPMODE = @CCDEPMODE@
  135. CFLAGS = @CFLAGS@
  136. CPP = @CPP@
  137. CPPFLAGS = @CPPFLAGS@
  138. CROSS_ARCH = @CROSS_ARCH@
  139. CROSS_LD = @CROSS_LD@
  140. CUT = @CUT@
  141. CXX = @CXX@
  142. CXXCPP = @CXXCPP@
  143. CXXDEPMODE = @CXXDEPMODE@
  144. CXXFLAGS = @CXXFLAGS@
  145. CYGPATH_W = @CYGPATH_W@
  146. DEFS = @DEFS@
  147. DEPDIR = @DEPDIR@
  148. DLLTOOL = @DLLTOOL@
  149. DMALLOC_LIB = @DMALLOC_LIB@
  150. DSYMUTIL = @DSYMUTIL@
  151. DUMPBIN = @DUMPBIN@
  152. ECHO = @ECHO@
  153. ECHO_C = @ECHO_C@
  154. ECHO_N = @ECHO_N@
  155. ECHO_T = @ECHO_T@
  156. EGREP = @EGREP@
  157. EXEEXT = @EXEEXT@
  158. FGREP = @FGREP@
  159. GREP = @GREP@
  160. GROFF = @GROFF@
  161. INSTALL = @INSTALL@
  162. INSTALL_DATA = @INSTALL_DATA@
  163. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  164. INSTALL_SCRIPT = @INSTALL_SCRIPT@
  165. INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
  166. LD = @LD@
  167. LDFLAGS = @LDFLAGS@
  168. LDNETINC = @LDNETINC@
  169. LDNETLIB = @LDNETLIB@
  170. LIBOBJS = @LIBOBJS@
  171. LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@
  172. LIBOPTS_DIR = @LIBOPTS_DIR@
  173. LIBOPTS_LDADD = @LIBOPTS_LDADD@
  174. LIBS = @LIBS@
  175. LIBTOOL = @LIBTOOL@
  176. LIPO = @LIPO@
  177. LNAVLIB = @LNAVLIB@
  178. LNAV_CFLAGS = @LNAV_CFLAGS@
  179. LN_S = @LN_S@
  180. LPCAPINC = @LPCAPINC@
  181. LPCAPLIB = @LPCAPLIB@
  182. LTLIBOBJS = @LTLIBOBJS@
  183. LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
  184. MACOSX_SDK_PATH = @MACOSX_SDK_PATH@
  185. MAINT = @MAINT@
  186. MAKEINFO = @MAKEINFO@
  187. MANIFEST_TOOL = @MANIFEST_TOOL@
  188. MKDIR_P = @MKDIR_P@
  189. NETMAPFLAGS = @NETMAPFLAGS@
  190. NETMAPINC = @NETMAPINC@
  191. NETMAPINCDIR = @NETMAPINCDIR@
  192. NETMAPUSERINC = @NETMAPUSERINC@
  193. NM = @NM@
  194. NMEDIT = @NMEDIT@
  195. OBJDUMP = @OBJDUMP@
  196. OBJEXT = @OBJEXT@
  197. OTOOL = @OTOOL@
  198. OTOOL64 = @OTOOL64@
  199. PACKAGE = @PACKAGE@
  200. PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
  201. PACKAGE_NAME = @PACKAGE_NAME@
  202. PACKAGE_STRING = @PACKAGE_STRING@
  203. PACKAGE_TARNAME = @PACKAGE_TARNAME@
  204. PACKAGE_URL = @PACKAGE_URL@
  205. PACKAGE_VERSION = @PACKAGE_VERSION@
  206. PATH_SEPARATOR = @PATH_SEPARATOR@
  207. PCAP_BPF_H_FILE = @PCAP_BPF_H_FILE@
  208. PCAP_CONFIG = @PCAP_CONFIG@
  209. POSIX_SHELL = @POSIX_SHELL@
  210. PRINTF = @PRINTF@
  211. RANLIB = @RANLIB@
  212. SED = @SED@
  213. SET_MAKE = @SET_MAKE@
  214. SHELL = @SHELL@
  215. STDNORETURN_H = @STDNORETURN_H@
  216. STRIP = @STRIP@
  217. TCPREPLAY_RELEASE = @TCPREPLAY_RELEASE@
  218. TCPREPLAY_VERSION = @TCPREPLAY_VERSION@
  219. VERSION = @VERSION@
  220. abs_builddir = @abs_builddir@
  221. abs_srcdir = @abs_srcdir@
  222. abs_top_builddir = @abs_top_builddir@
  223. abs_top_srcdir = @abs_top_srcdir@
  224. ac_ct_AR = @ac_ct_AR@
  225. ac_ct_CC = @ac_ct_CC@
  226. ac_ct_CXX = @ac_ct_CXX@
  227. ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
  228. am__include = @am__include@
  229. am__leading_dot = @am__leading_dot@
  230. am__quote = @am__quote@
  231. am__tar = @am__tar@
  232. am__untar = @am__untar@
  233. bindir = @bindir@
  234. build = @build@
  235. build_alias = @build_alias@
  236. build_asan = @build_asan@
  237. build_cpu = @build_cpu@
  238. build_os = @build_os@
  239. build_vendor = @build_vendor@
  240. builddir = @builddir@
  241. datadir = @datadir@
  242. datarootdir = @datarootdir@
  243. debug_flag = @debug_flag@
  244. debug_run_time_flag = @debug_run_time_flag@
  245. depmod = @depmod@
  246. docdir = @docdir@
  247. dvidir = @dvidir@
  248. exec_prefix = @exec_prefix@
  249. extra_debug_flag = @extra_debug_flag@
  250. host = @host@
  251. host_alias = @host_alias@
  252. host_cpu = @host_cpu@
  253. host_os = @host_os@
  254. host_vendor = @host_vendor@
  255. htmldir = @htmldir@
  256. includedir = @includedir@
  257. infodir = @infodir@
  258. insmod = @insmod@
  259. install_sh = @install_sh@
  260. libdir = @libdir@
  261. libexecdir = @libexecdir@
  262. localedir = @localedir@
  263. localstatedir = @localstatedir@
  264. mandir = @mandir@
  265. mkdir_p = @mkdir_p@
  266. nic1 = @nic1@
  267. nic2 = @nic2@
  268. oldincludedir = @oldincludedir@
  269. pcncfg = @pcncfg@
  270. pdfdir = @pdfdir@
  271. prefix = @prefix@
  272. program_transform_name = @program_transform_name@
  273. psdir = @psdir@
  274. rmmod = @rmmod@
  275. sbindir = @sbindir@
  276. sharedstatedir = @sharedstatedir@
  277. srcdir = @srcdir@
  278. sysconfdir = @sysconfdir@
  279. target = @target@
  280. target_alias = @target_alias@
  281. target_cpu = @target_cpu@
  282. target_os = @target_os@
  283. target_vendor = @target_vendor@
  284. tcpdump_path = @tcpdump_path@
  285. timestamp_trace_flag = @timestamp_trace_flag@
  286. top_build_prefix = @top_build_prefix@
  287. top_builddir = @top_builddir@
  288. top_srcdir = @top_srcdir@
  289. # $Id$
  290. MAKEFLAGS = -s -k
  291. HOST = @host@
  292. TARGET = @target@
  293. BUILD = @build@
  294. ENABLE_DEBUG = @debug_run_time_flag@
  295. TCPPREP = ../src/tcpprep --no-arg-comment
  296. TCPREPLAY = ../src/tcpreplay
  297. TCPREWRITE = ../src/tcprewrite
  298. TCPBRIDGE = ../src/tcpbridge
  299. TEST_PCAP = $(srcdir)/test.pcap
  300. EXTRA_DIST = test.pcap test.auto_bridge test.auto_client test.auto_router \
  301. test.auto_server test.auto_first test.cidr test.comment test.port test.mac \
  302. test.cidr_reverse test.mac_reverse test.regex_reverse \
  303. test.include_packets test.exclude_packets test.include_source \
  304. test.include_dest test.prep_config \
  305. test.primary test.regex test.secondary \
  306. test.rewrite_seed test.rewrite_portmap test.rewrite_endpoint \
  307. test.rewrite_pnat test.rewrite_pad test.rewrite_trunc \
  308. test.rewrite_mac test.rewrite_layer2 test.rewrite_config \
  309. test.rewrite_skip test.rewrite_dltuser test.rewrite_dlthdlc \
  310. test.rewrite_vlan802.1ad test.rewrite_vlandel test.rewrite_efcs test.rewrite_1ttl \
  311. test.rewrite_2ttl test.rewrite_3ttl test.rewrite_enet_subsmac \
  312. test.rewrite_mtutrunc test.rewrite_mac_seed test.rewrite_range_portmap \
  313. test.rewrite_mac_seed_keep test.rewrite_l7fuzzing test.rewrite_sequence test.rewrite_fixcsum \
  314. test.rewrite_fixlen_pad test.rewrite_fixlen_trunc test.rewrite_fixlen_del \
  315. test2.rewrite_seed test2.rewrite_portmap test2.rewrite_endpoint \
  316. test2.rewrite_pnat test2.rewrite_pad test2.rewrite_trunc \
  317. test2.rewrite_mac test2.rewrite_layer2 test2.rewrite_config \
  318. test2.rewrite_skip test2.rewrite_dltuser test2.rewrite_dlthdlc \
  319. test2.rewrite_vlan802.1ad test2.rewrite_vlandel test2.rewrite_efcs test2.rewrite_1ttl \
  320. test2.rewrite_mtutrunc test2.rewrite_enet_subsmac \
  321. test2.rewrite_2ttl test2.rewrite_3ttl test.rewrite_tos test2.rewrite_tos \
  322. test2.rewrite_enet_subsmac test2.rewrite_mac_seed \
  323. test2.rewrite_range_portmap test2.rewrite_mac_seed_keep \
  324. test2.rewrite_l7fuzzing test2.rewrite_sequence test2.rewrite_fixcsum \
  325. test2.rewrite_fixlen_pad test2.rewrite_fixlen_trunc test2.rewrite_fixlen_del
  326. @WORDS_BIGENDIAN_FALSE@STANDARD_REWRITE = standard_littleendian
  327. @WORDS_BIGENDIAN_TRUE@STANDARD_REWRITE = standard_bigendian
  328. @WORDS_BIGENDIAN_FALSE@REWRITE_WARN = "little"
  329. @WORDS_BIGENDIAN_TRUE@REWRITE_WARN = "big"
  330. all: all-am
  331. .SUFFIXES:
  332. $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
  333. @for dep in $?; do \
  334. case '$(am__configure_deps)' in \
  335. *$$dep*) \
  336. ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
  337. && { if test -f $@; then exit 0; else break; fi; }; \
  338. exit 1;; \
  339. esac; \
  340. done; \
  341. echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/Makefile'; \
  342. $(am__cd) $(top_srcdir) && \
  343. $(AUTOMAKE) --foreign test/Makefile
  344. Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
  345. @case '$?' in \
  346. *config.status*) \
  347. cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
  348. *) \
  349. echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
  350. cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
  351. esac;
  352. $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
  353. cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
  354. $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
  355. cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
  356. $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
  357. cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
  358. $(am__aclocal_m4_deps):
  359. config: $(top_builddir)/config.status $(srcdir)/config.in
  360. cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
  361. mostlyclean-libtool:
  362. -rm -f *.lo
  363. clean-libtool:
  364. -rm -rf .libs _libs
  365. tags TAGS:
  366. ctags CTAGS:
  367. cscope cscopelist:
  368. distdir: $(DISTFILES)
  369. @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
  370. topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
  371. list='$(DISTFILES)'; \
  372. dist_files=`for file in $$list; do echo $$file; done | \
  373. sed -e "s|^$$srcdirstrip/||;t" \
  374. -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
  375. case $$dist_files in \
  376. */*) $(MKDIR_P) `echo "$$dist_files" | \
  377. sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
  378. sort -u` ;; \
  379. esac; \
  380. for file in $$dist_files; do \
  381. if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
  382. if test -d $$d/$$file; then \
  383. dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
  384. if test -d "$(distdir)/$$file"; then \
  385. find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
  386. fi; \
  387. if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
  388. cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
  389. find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
  390. fi; \
  391. cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
  392. else \
  393. test -f "$(distdir)/$$file" \
  394. || cp -p $$d/$$file "$(distdir)/$$file" \
  395. || exit 1; \
  396. fi; \
  397. done
  398. check-am: all-am
  399. check: check-am
  400. all-am: Makefile
  401. installdirs:
  402. install: install-am
  403. install-exec: install-exec-am
  404. install-data: install-data-am
  405. uninstall: uninstall-am
  406. install-am: all-am
  407. @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
  408. installcheck: installcheck-am
  409. install-strip:
  410. if test -z '$(STRIP)'; then \
  411. $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
  412. install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
  413. install; \
  414. else \
  415. $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
  416. install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
  417. "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
  418. fi
  419. mostlyclean-generic:
  420. clean-generic:
  421. distclean-generic:
  422. -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
  423. -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
  424. maintainer-clean-generic:
  425. @echo "This command is intended for maintainers to use"
  426. @echo "it deletes files that may require special tools to rebuild."
  427. clean-am: clean-generic clean-libtool mostlyclean-am
  428. distclean-am: clean-am distclean-generic
  429. dvi: dvi-am
  430. dvi-am:
  431. html: html-am
  432. html-am:
  433. info: info-am
  434. info-am:
  435. install-data-am:
  436. install-dvi: install-dvi-am
  437. install-dvi-am:
  438. install-exec-am:
  439. install-html: install-html-am
  440. install-html-am:
  441. install-info: install-info-am
  442. install-info-am:
  443. install-man:
  444. install-pdf: install-pdf-am
  445. install-pdf-am:
  446. install-ps: install-ps-am
  447. install-ps-am:
  448. installcheck-am:
  449. maintainer-clean-am: distclean-am maintainer-clean-generic
  450. mostlyclean: mostlyclean-am
  451. mostlyclean-am: mostlyclean-generic mostlyclean-libtool
  452. pdf: pdf-am
  453. pdf-am:
  454. ps: ps-am
  455. ps-am:
  456. uninstall-am:
  457. .MAKE: install-am install-strip
  458. .PHONY: all all-am check check-am clean clean-generic clean-libtool \
  459. cscopelist-am ctags-am distclean distclean-generic \
  460. distclean-libtool distdir dvi dvi-am html html-am info info-am \
  461. install install-am install-data install-data-am install-dvi \
  462. install-dvi-am install-exec install-exec-am install-html \
  463. install-html-am install-info install-info-am install-man \
  464. install-pdf install-pdf-am install-ps install-ps-am \
  465. install-strip installcheck installcheck-am installdirs \
  466. maintainer-clean maintainer-clean-generic mostlyclean \
  467. mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
  468. tags-am uninstall uninstall-am
  469. .PRECIOUS: Makefile
  470. test: all
  471. all: clearlog check tcpprep tcpreplay tcprewrite
  472. clearlog:
  473. -rm test.log
  474. check:
  475. $(PRINTF) "%s\n" "NOTICE: Tests must be run as root"
  476. $(PRINTF) "%s\n" "Sending traffic on '$(nic1)' and '$(nic2)'"
  477. standard: standard_prep $(STANDARD_REWRITE)
  478. $(PRINTF) "Warning: only creating %s endian standard test files\n" $(REWRITE_WARN)
  479. standard_prep:
  480. $(TCPPREP) -i $(TEST_PCAP) -o test.auto_router -a router
  481. $(TCPPREP) -i $(TEST_PCAP) -o test.auto_bridge -a bridge
  482. $(TCPPREP) -i $(TEST_PCAP) -o test.auto_client -a client
  483. $(TCPPREP) -i $(TEST_PCAP) -o test.auto_server -a server
  484. $(TCPPREP) -i $(TEST_PCAP) -o test.auto_first -a first
  485. $(TCPPREP) --load-opts config -o test.prep_config
  486. $(TCPPREP) -i $(TEST_PCAP) -o test.port -p
  487. $(TCPPREP) -i $(TEST_PCAP) -o test.mac -e 00:1f:f3:3c:e1:13
  488. $(TCPPREP) -i $(TEST_PCAP) -o test.cidr -c '96.17.211.0/24'
  489. $(TCPPREP) -i $(TEST_PCAP) -o test.regex -r '96.17.211.*'
  490. $(TCPPREP) -i $(TEST_PCAP) -o test.comment -C "This is a comment" -p
  491. $(TCPPREP) -i $(TEST_PCAP) -o test.mac_reverse -e 00:1f:f3:3c:e1:13 --reverse
  492. $(TCPPREP) -i $(TEST_PCAP) -o test.cidr_reverse -c '96.17.211.0/24' --reverse
  493. $(TCPPREP) -i $(TEST_PCAP) -o test.regex_reverse -r '96.17.211.*' --reverse
  494. $(TCPPREP) -i $(TEST_PCAP) -o test.exclude_packets -c '96.17.211.0/24' --exclude 'P:61-65,88-91'
  495. $(TCPPREP) -i $(TEST_PCAP) -o test.include_packets -c '96.17.211.0/24' --include 'P:61-65,88-91'
  496. $(TCPPREP) -i $(TEST_PCAP) -o test.include_source -c '96.17.211.0/24' --include 'S:96.0.0.0/8'
  497. $(TCPPREP) -i $(TEST_PCAP) -o test.include_dest -c '96.17.211.0/24' --include 'D:96.0.0.0/8'
  498. standard_bigendian:
  499. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_seed -s 55
  500. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_tos --tos=50
  501. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_portmap -r 80:8080
  502. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_range_portmap -r 1-100:49148
  503. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_sequence --tcp-sequence 42
  504. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_endpoint \
  505. -e 10.10.0.1:10.10.0.2 -c test.auto_router
  506. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_pnat \
  507. -N 96.17.211.0/24:172.16.0.0/24
  508. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_pad -F pad
  509. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_trunc -F trunc
  510. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_mac \
  511. --enet-dmac=00:12:13:14:15:16,00:22:33:44:55:66 \
  512. --enet-smac=00:22:33:44:55:66,00:12:13:14:15:16 -c $(srcdir)/test.auto_router
  513. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_enet_subsmac \
  514. --enet-subsmac=00:1f:f3:3c:e1:13,00:22:33:44:55:66 \
  515. --enet-subsmac=f8:1e:df:e5:84:3a,00:66:55:44:33:22
  516. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_mac_seed --enet-mac-seed=42
  517. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_mac_seed_keep --enet-mac-seed=42 \
  518. --enet-mac-seed-keep-bytes=3
  519. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_layer2 \
  520. --dlt=user --user-dlink=00,50,da,5d,46,55,0,7,eb,30,a4,c3,08,0
  521. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_config --enet-vlan=add --enet-vlan-tag=45 \
  522. --enet-vlan-cfi=1 --enet-vlan-pri=5
  523. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_skip \
  524. --skipbroadcast --skipl2broadcast --skip-soft-errors --seed 55 \
  525. --enet-dmac=00:12:13:14:15:16,00:22:33:44:55:66 \
  526. --enet-smac=00:22:33:44:55:66,00:12:13:14:15:16 -c $(srcdir)/test.auto_router
  527. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_dltuser --dlt=user \
  528. --user-dlink=0x0f,0x00,0x08,0x00 --user-dlt=104
  529. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_dlthdlc --dlt=hdlc \
  530. --hdlc-control=0 --hdlc-address=0x0F
  531. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_vlan802.1ad \
  532. --enet-vlan=add --enet-vlan-tag=42 --enet-vlan-cfi=1 \
  533. --enet-vlan-pri=2 --enet-vlan-proto=802.1ad
  534. $(TCPREWRITE) -i $(srcdir)/test.rewrite_config -o test.rewrite_vlandel \
  535. --enet-vlan=del
  536. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_efcs --efcs
  537. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_1ttl --ttl=58
  538. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_2ttl --ttl=+58
  539. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_3ttl --ttl=-58
  540. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_mtutrunc --mtu-trunc --mtu=300
  541. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_l7fuzzing \
  542. --fuzz-seed=42 --fuzz-factor=2
  543. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_fixcsum --fixcsum
  544. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_fixlen_pad --fixlen=pad
  545. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_fixlen_trunc --fixlen=trunc
  546. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_fixlen_del --fixlen=del
  547. standard_littleendian:
  548. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_seed -s 55
  549. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_tos --tos=50
  550. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_portmap -r 80:8080
  551. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_range_portmap -r 1-100:49148
  552. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_sequence --tcp-sequence 42
  553. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_endpoint \
  554. -e 10.10.0.1:10.10.0.2 -c test.auto_router
  555. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_pnat \
  556. -N 96.17.211.0/24:172.16.0.0/24
  557. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_pad -F pad
  558. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_trunc -F trunc
  559. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_mac \
  560. --enet-dmac=00:12:13:14:15:16,00:22:33:44:55:66 \
  561. --enet-smac=00:22:33:44:55:66,00:12:13:14:15:16 -c $(srcdir)/test.auto_router
  562. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_enet_subsmac \
  563. --enet-subsmac=00:1f:f3:3c:e1:13,00:22:33:44:55:66 \
  564. --enet-subsmac=f8:1e:df:e5:84:3a,00:66:55:44:33:22
  565. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_mac_seed --enet-mac-seed=42
  566. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_mac_seed_keep --enet-mac-seed=42 \
  567. --enet-mac-seed-keep-bytes=3
  568. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_layer2 \
  569. --dlt=user --user-dlink=00,50,da,5d,46,55,0,7,eb,30,a4,c3,08,0
  570. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_config --enet-vlan=add --enet-vlan-tag=45 \
  571. --enet-vlan-cfi=1 --enet-vlan-pri=5
  572. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_skip \
  573. --skipbroadcast --skipl2broadcast --skip-soft-errors --seed 55 \
  574. --enet-dmac=00:12:13:14:15:16,00:22:33:44:55:66 \
  575. --enet-smac=00:22:33:44:55:66,00:12:13:14:15:16 -c $(srcdir)/test.auto_router
  576. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_dltuser --dlt=user \
  577. --user-dlink=0x0f,0x00,0x08,0x00 --user-dlt=104
  578. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_dlthdlc --dlt=hdlc \
  579. --hdlc-control=0 --hdlc-address=0x0F
  580. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_vlan802.1ad \
  581. --enet-vlan=add --enet-vlan-tag=42 --enet-vlan-cfi=1 \
  582. --enet-vlan-pri=2 --enet-vlan-proto=802.1ad
  583. $(TCPREWRITE) -i $(srcdir)/test.rewrite_config -o test2.rewrite_vlandel \
  584. --enet-vlan=del
  585. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_efcs --efcs
  586. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_1ttl --ttl=58
  587. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_2ttl --ttl=+58
  588. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_3ttl --ttl=-58
  589. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_mtutrunc --mtu-trunc --mtu=300
  590. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_l7fuzzing \
  591. --fuzz-seed=42 --fuzz-factor=2
  592. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_fixcsum --fixcsum
  593. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_fixlen_pad --fixlen=pad
  594. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_fixlen_trunc --fixlen=trunc
  595. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_fixlen_del --fixlen=del
  596. tcpprep: auto_router auto_bridge auto_client auto_server auto_first cidr regex \
  597. port mac comment print_info print_comment prep_config \
  598. mac_reverse cidr_reverse regex_reverse exclude_packets \
  599. include_packets include_source include_dest
  600. tcprewrite: rewrite_portmap rewrite_range_portmap rewrite_endpoint \
  601. rewrite_pnat rewrite_trunc rewrite_pad rewrite_seed rewrite_mac \
  602. rewrite_layer2 rewrite_config rewrite_skip rewrite_dltuser rewrite_dlthdlc \
  603. rewrite_vlan802.1ad rewrite_vlandel rewrite_efcs rewrite_1ttl rewrite_2ttl rewrite_3ttl \
  604. rewrite_tos rewrite_mtutrunc rewrite_enet_subsmac rewrite_mac_seed \
  605. rewrite_mac_seed_keep rewrite_l7fuzzing rewrite_sequence rewrite_fixcsum \
  606. rewrite_fixlen_pad rewrite_fixlen_trunc rewrite_fixlen_del
  607. tcpreplay: replay_basic replay_cache replay_pps replay_rate replay_top \
  608. replay_config replay_multi replay_pps_multi replay_precache \
  609. replay_stats replay_dualfile replay_maxsleep
  610. prep_config:
  611. $(PRINTF) "%s" "[tcpprep] Config mode test: "
  612. $(PRINTF) "%s\n" "*** [tcpprep] Config mode test: " >> test.log
  613. $(TCPPREP) $(ENABLE_DEBUG) --load-opts=config -o test.$@1 >> test.log 2>&1
  614. diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  615. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  616. auto_router:
  617. $(PRINTF) "%s" "[tcpprep] Auto/Router mode test: "
  618. $(PRINTF) "%s\n" "*** [tcpprep] Auto/Router mode test: " >> test.log
  619. $(TCPPREP) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -a router >> test.log 2>&1
  620. diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  621. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  622. auto_bridge:
  623. $(PRINTF) "%s" "[tcpprep] Auto/Bridge mode test: "
  624. $(PRINTF) "%s\n" "*** [tcpprep] Auto/Bridge mode test: " >> test.log
  625. $(TCPPREP) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -a bridge >> test.log 2>&1
  626. diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  627. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  628. auto_client:
  629. $(PRINTF) "%s" "[tcpprep] Auto/Client mode test: "
  630. $(PRINTF) "%s\n" "*** [tcpprep] Auto/Client mode test: " >> test.log
  631. $(TCPPREP) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -a client >> test.log 2>&1
  632. diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  633. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  634. auto_server:
  635. $(PRINTF) "%s" "[tcpprep] Auto/Server mode test: "
  636. $(PRINTF) "%s\n" "*** [tcpprep] Auto/Server mode test: " >> test.log
  637. $(TCPPREP) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -a server >> test.log 2>&1
  638. diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  639. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  640. auto_first:
  641. $(PRINTF) "%s" "[tcpprep] Auto/First mode test: "
  642. $(PRINTF) "%s\n" "*** [tcpprep] Auto/First mode test: " >> test.log
  643. $(TCPPREP) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -a first >> test.log 2>&1
  644. diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  645. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  646. regex:
  647. $(PRINTF) "%s" "[tcpprep] Regex mode test: "
  648. $(PRINTF) "%s\n" "*** [tcpprep] Regex mode test: " >> test.log
  649. $(TCPPREP) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -r '96.17.211.*' >> test.log 2>&1
  650. diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  651. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  652. cidr:
  653. $(PRINTF) "%s" "[tcpprep] CIDR mode test: "
  654. $(PRINTF) "%s\n" "*** [tcpprep] CIDR mode test: " >> test.log
  655. $(TCPPREP) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -c '96.17.211.0/24' >> test.log 2>&1
  656. diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  657. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  658. port:
  659. $(PRINTF) "%s" "[tcpprep] Port mode test: "
  660. $(PRINTF) "%s\n" "*** [tcpprep] Port mode test: " >> test.log
  661. $(TCPPREP) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -p >> test.log 2>&1
  662. diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  663. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  664. mac:
  665. $(PRINTF) "%s" "[tcpprep] MAC mode test: "
  666. $(PRINTF) "%s\n" "*** [tcpprep] MAC mode test: " >> test.log
  667. $(TCPPREP) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -e 00:1f:f3:3c:e1:13 >> test.log 2>&1
  668. diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  669. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  670. comment:
  671. $(PRINTF) "%s" "[tcpprep] Comment mode test: "
  672. $(PRINTF) "%s\n" "*** [tcpprep] Comment mode test: " >> test.log
  673. $(TCPPREP) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -C "This is a comment" -p >> test.log 2>&1
  674. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  675. print_comment:
  676. $(PRINTF) "%s" "[tcpprep] Print comment mode test: "
  677. $(PRINTF) "%s\n" "*** [tcpprep] Print comment mode test: " >> test.log
  678. $(TCPPREP) $(ENABLE_DEBUG) -P $(srcdir)/test.comment >$(srcdir)/test.$@1 >> test.log 2>&1
  679. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  680. print_info:
  681. $(PRINTF) "%s" "[tcpprep] Print info mode test: "
  682. $(PRINTF) "%s\n" "*** [tcpprep] Print info mode test: " >> test.log
  683. $(TCPPREP) $(ENABLE_DEBUG) -I $(srcdir)/test.comment >$(srcdir)/test.$@1 >> test.log 2>&1
  684. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  685. regex_reverse:
  686. $(PRINTF) "%s" "[tcpprep] Regex reverse mode test: "
  687. $(PRINTF) "%s\n" "*** [tcpprep] Regex reverse mode test: " >> test.log
  688. $(TCPPREP) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -r '96.17.211.*' --reverse >> test.log 2>&1
  689. diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  690. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  691. cidr_reverse:
  692. $(PRINTF) "%s" "[tcpprep] CIDR reverse mode test: "
  693. $(PRINTF) "%s\n" "*** [tcpprep] CIDR reverse mode test: " >> test.log
  694. $(TCPPREP) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -c '96.17.211.0/24' --reverse >> test.log 2>&1
  695. diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  696. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  697. mac_reverse:
  698. $(PRINTF) "%s" "[tcpprep] MAC reverse mode test: "
  699. $(PRINTF) "%s\n" "*** [tcpprep] MAC reverse mode test: " >> test.log
  700. $(TCPPREP) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -e 00:1f:f3:3c:e1:13 --reverse >> test.log 2>&1
  701. diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  702. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  703. exclude_packets:
  704. $(PRINTF) "%s" "[tcpprep] exclude packets test: "
  705. $(PRINTF) "%s\n" "*** [tcpprep] exclude packets test: " >> test.log
  706. $(TCPPREP) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -c '96.17.211.0/24' --exclude 'P:61-65,88-91' >> test.log 2>&1
  707. diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  708. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  709. include_packets:
  710. $(PRINTF) "%s" "[tcpprep] include packets test: "
  711. $(PRINTF) "%s\n" "*** [tcpprep] include packets test: " >> test.log
  712. $(TCPPREP) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -c '96.17.211.0/24' --include 'P:61-65,88-91' >> test.log 2>&1
  713. diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  714. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  715. include_source:
  716. $(PRINTF) "%s" "[tcpprep] include source test: "
  717. $(PRINTF) "%s\n" "*** [tcpprep] include source test: " >> test.log
  718. $(TCPPREP) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -c '96.17.211.0/24' --include 'S:96.0.0.0/8' >> test.log 2>&1
  719. diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  720. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  721. include_dest:
  722. $(PRINTF) "%s" "[tcpprep] include destination test: "
  723. $(PRINTF) "%s\n" "*** [tcpprep] include destination test: " >> test.log
  724. $(TCPPREP) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -c '96.17.211.0/24' --include 'D:96.0.0.0/8' >> test.log 2>&1
  725. diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  726. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  727. replay_basic:
  728. $(PRINTF) "%s" "[tcpreplay] Basic test: "
  729. $(PRINTF) "%s\n" "*** [tcpreplay] Basic test: " >> test.log
  730. $(TCPREPLAY) $(ENABLE_DEBUG) -i $(nic1) -t $(TEST_PCAP) >> test.log 2>&1
  731. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  732. replay_cache:
  733. $(PRINTF) "%s" "[tcpreplay] Cache test: "
  734. $(PRINTF) "%s\n" "*** [tcpreplay] Cache test: " >> test.log
  735. $(TCPREPLAY) $(ENABLE_DEBUG) -c $(srcdir)/test.cidr -i $(nic1) -I $(nic2) -t $(TEST_PCAP) >> test.log 2>&1
  736. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  737. replay_accurate:
  738. $(PRINTF) "%s" "[tcpreplay] Accurate test: "
  739. $(PRINTF) "%s\n" "*** [tcpreplay] Accurate test: " >> test.log
  740. $(TCPREPLAY) $(ENABLE_DEBUG) -a -i $(nic1) $(TEST_PCAP) >> test.log 2>&1
  741. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  742. replay_stats:
  743. $(PRINTF) "%s" "[tcpreplay] Statistics test: "
  744. $(PRINTF) "%s\n" "*** [tcpreplay] Statistics test: " >> test.log
  745. $(TCPREPLAY) $(ENABLE_DEBUG) --stats=1 -i $(nic1) $(TEST_PCAP) >> test.log 2>&1
  746. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  747. rewrite_portmap:
  748. $(PRINTF) "%s" "[tcprewrite] Portmap test: "
  749. $(PRINTF) "%s\n" "*** [tcprewrite] Portmap test: " >> test.log
  750. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -r 80:8080 >> test.log 2>&1
  751. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  752. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  753. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  754. rewrite_range_portmap:
  755. $(PRINTF) "%s" "[tcprewrite] Portmap range test: "
  756. $(PRINTF) "%s\n" "*** [tcprewrite] Portmap range test: " >> test.log
  757. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -r 1-100:49148 >> test.log 2>&1
  758. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  759. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  760. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  761. rewrite_sequence:
  762. $(PRINTF) "%s" "[tcprewrite] TCP sequence test: "
  763. $(PRINTF) "%s\n" "*** [tcprewrite] TCP sequence test: " >> test.log
  764. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 --tcp-sequence 42 >> test.log 2>&1
  765. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  766. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  767. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  768. rewrite_endpoint:
  769. $(PRINTF) "%s" "[tcprewrite] Endpoint test: "
  770. $(PRINTF) "%s\n" "*** [tcprewrite] Endpoint test: " >> test.log
  771. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -e 10.10.0.1:10.10.0.2 \
  772. -c $(srcdir)/test.auto_router >> test.log 2>&1
  773. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  774. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  775. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  776. rewrite_pnat:
  777. $(PRINTF) "%s" "[tcprewrite] Pseudo NAT test: "
  778. $(PRINTF) "%s\n" "*** [tcprewrite] Pseudo NAT test: " >> test.log
  779. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 \
  780. -N 96.17.211.0/24:172.16.0.0/24 >> test.log 2>&1
  781. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  782. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  783. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  784. rewrite_mac:
  785. $(PRINTF) "%s" "[tcprewrite] Src/Dst MAC test: "
  786. $(PRINTF) "%s\n" "*** [tcprewrite] Src/Dst MAC test: " >> test.log
  787. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 \
  788. --enet-dmac=00:12:13:14:15:16,00:22:33:44:55:66 \
  789. --enet-smac=00:22:33:44:55:66,00:12:13:14:15:16 -c $(srcdir)/test.auto_router >> test.log 2>&1
  790. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  791. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  792. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  793. rewrite_enet_subsmac:
  794. $(PRINTF) "%s" "[tcprewrite] Substitute Src/Dst MAC test: "
  795. $(PRINTF) "%s\n" "*** [tcprewrite] Substitute Src/Dst MAC test: " >> test.log
  796. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 \
  797. --enet-subsmac=00:1f:f3:3c:e1:13,00:22:33:44:55:66 \
  798. --enet-subsmac=f8:1e:df:e5:84:3a,00:66:55:44:33:22 >> test.log 2>&1
  799. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  800. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  801. if [ $? ] ; then $(PRINTF) "\t%s\n" "FAILED"; else $(PRINTF) "\t%s\n" "OK"; fi
  802. rewrite_mac_seed:
  803. $(PRINTF) "%s" "[tcprewrite] Seeded MAC test: "
  804. $(PRINTF) "%s\n" "*** [tcprewrite] Seeded MAC test: " >> test.log
  805. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 \
  806. --enet-mac-seed=42 >> test.log 2>&1
  807. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  808. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  809. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  810. rewrite_mac_seed_keep:
  811. $(PRINTF) "%s" "[tcprewrite] Seeded Keep MAC test: "
  812. $(PRINTF) "%s\n" "*** [tcprewrite] Seeded Keep MAC test: " >> test.log
  813. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 \
  814. --enet-mac-seed=42 --enet-mac-seed-keep-bytes=3 >> test.log 2>&1
  815. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  816. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  817. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  818. rewrite_trunc:
  819. $(PRINTF) "%s" "[tcprewrite] Truncate test: "
  820. $(PRINTF) "%s\n" "*** [tcprewrite] Truncate test: " >> test.log
  821. $(TCPREWRITE) $(ENABLE_DEBUG) -F trunc -i $(TEST_PCAP) -o test.$@1 >> test.log 2>&1
  822. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  823. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  824. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  825. rewrite_pad:
  826. $(PRINTF) "%s" "[tcprewrite] Pad test: "
  827. $(PRINTF) "%s\n" "*** [tcprewrite] Pad test: " >> test.log
  828. $(TCPREWRITE) $(ENABLE_DEBUG) -F pad -i $(TEST_PCAP) -o test.$@1 >> test.log 2>&1
  829. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  830. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  831. if [ $? ] ; then $(PRINTF) "\t\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t\t%s\n" "OK"; fi
  832. rewrite_seed:
  833. $(PRINTF) "%s" "[tcprewrite] Seed IP test: "
  834. $(PRINTF) "%s\n" "*** [tcprewrite] Seed IP test: " >> test.log
  835. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -s 55 >> test.log 2>&1
  836. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  837. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  838. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  839. rewrite_layer2:
  840. $(PRINTF) "%s" "[tcprewrite] Layer2 test: "
  841. $(PRINTF) "%s\n" "*** [tcprewrite] Layer2 test: " >> test.log
  842. $(TCPREWRITE) $(ENABLE_DEBUG) --dlt=user --user-dlink=00,50,da,5d,46,55,0,7,eb,30,a4,c3,08,0 \
  843. -i $(TEST_PCAP) -o test.$@1 >> test.log 2>&1
  844. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  845. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  846. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  847. rewrite_config:
  848. $(PRINTF) "%s" "[tcprewrite] Config/VLAN Add test: "
  849. $(PRINTF) "%s\n" "*** [tcprewrite] Config/VLAN Add test: " >> test.log
  850. $(TCPREWRITE) $(ENABLE_DEBUG) --load-opts config >> test.log 2>&1
  851. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  852. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  853. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  854. rewrite_skip:
  855. $(PRINTF) "%s" "[tcprewrite] Skip bcast test: "
  856. $(PRINTF) "%s\n" "*** [tcprewrite] Skip bcast test: " >> test.log
  857. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 \
  858. --skipbroadcast --skipl2broadcast --skip-soft-errors --seed 55 \
  859. --enet-dmac=00:12:13:14:15:16,00:22:33:44:55:66 \
  860. --enet-smac=00:22:33:44:55:66,00:12:13:14:15:16 -c $(srcdir)/test.auto_router >> test.log 2>&1
  861. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  862. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  863. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  864. rewrite_dltuser:
  865. $(PRINTF) "%s" "[tcprewrite] DLT User test: "
  866. $(PRINTF) "%s\n" "*** [tcprewrite] DLT User test: " >> test.log
  867. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 --dlt=user \
  868. --user-dlink=0x0f,0x00,0x08,0x00 --user-dlt=104 >> test.log 2>&1
  869. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  870. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  871. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  872. rewrite_dlthdlc:
  873. $(PRINTF) "%s" "[tcprewrite] DLT Cisco HDLC test: "
  874. $(PRINTF) "%s\n" "*** [tcprewrite] DLT Cisco HDLC test: " >> test.log
  875. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 --dlt=hdlc \
  876. --hdlc-control=0 --hdlc-address=0x0F >> test.log 2>&1
  877. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  878. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  879. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  880. rewrite_vlan802.1ad:
  881. $(PRINTF) "%s" "[tcprewrite] VLAN 802.1ad test: "
  882. $(PRINTF) "%s\n" "*** [tcprewrite] VLAN 802.1ad test: " >> test.log
  883. $(TCPREWRITE) -i $(TEST_PCAP) -o test.$@1 \
  884. --enet-vlan=add --enet-vlan-tag=42 --enet-vlan-cfi=1 \
  885. --enet-vlan-pri=2 --enet-vlan-proto=802.1ad
  886. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  887. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  888. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  889. rewrite_vlandel:
  890. $(PRINTF) "%s" "[tcprewrite] VLAN Delete test: "
  891. $(PRINTF) "%s\n" "*** [tcprewrite] VLAN Delete test: " >> test.log
  892. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(srcdir)/test.rewrite_config -o test.$@1 \
  893. --enet-vlan=del >> test.log 2>&1
  894. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  895. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  896. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  897. rewrite_efcs:
  898. $(PRINTF) "%s" "[tcprewrite] Remove EFCS: "
  899. $(PRINTF) "%s\n" "*** [tcprewrite] Remove EFCS: " >> test.log
  900. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 --efcs >> test.log 2>&1
  901. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  902. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  903. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  904. rewrite_1ttl:
  905. $(PRINTF) "%s" "[tcprewrite] Force TTL: "
  906. $(PRINTF) "%s\n" "*** [tcprewrite] Force TTL: " >> test.log
  907. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 --ttl=58 >> test.log 2>&1
  908. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  909. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  910. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  911. rewrite_2ttl:
  912. $(PRINTF) "%s" "[tcprewrite] Increase TTL: "
  913. $(PRINTF) "%s\n" "*** [tcprewrite] Increase TTL: " >> test.log
  914. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 --ttl=+58 >> test.log 2>&1
  915. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  916. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  917. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  918. rewrite_3ttl:
  919. $(PRINTF) "%s" "[tcprewrite] Reduce TTL: "
  920. $(PRINTF) "%s\n" "*** [tcprewrite] Reduce TTL: " >> test.log
  921. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 --ttl=-58 >> test.log 2>&1
  922. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  923. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  924. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  925. rewrite_tos:
  926. $(PRINTF) "%s" "[tcprewrite] TOS test: "
  927. $(PRINTF) "%s\n" "*** [tcprewrite] TOS test: " >> test.log
  928. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 --tos=50 >> test.log 2>&1
  929. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  930. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  931. if [ $? ] ; then $(PRINTF) "\t\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t\t%s\n" "OK"; fi
  932. rewrite_mtutrunc:
  933. $(PRINTF) "%s" "[tcprewrite] MTU Truncate test: "
  934. $(PRINTF) "%s\n" "*** [tcprewrite] MTU Truncate test: " >> test.log
  935. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 --mtu-trunc --mtu=300 >> test.log 2>&1
  936. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  937. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  938. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  939. rewrite_l7fuzzing:
  940. $(PRINTF) "%s" "[tcprewrite] L7 fuzzing test: "
  941. $(PRINTF) "%s\n" "*** [tcprewrite] L7 fuzzing test: " >> test.log
  942. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 --fuzz-seed=42 --fuzz-factor=2 >> test.log 2>&1
  943. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  944. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  945. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  946. rewrite_fixcsum:
  947. $(PRINTF) "%s" "[tcprewrite] Fix checksum test: "
  948. $(PRINTF) "%s\n" "*** [tcprewrite] Fix checksum test: " >> test.log
  949. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 --fixcsum >> test.log 2>&1
  950. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  951. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  952. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  953. rewrite_fixlen_pad:
  954. $(PRINTF) "%s" "[tcprewrite] Fix length and pad test: "
  955. $(PRINTF) "%s\n" "*** [tcprewrite] Fix length and pad test: " >> test.log
  956. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 --fixlen=pad >> test.log 2>&1
  957. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  958. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  959. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  960. rewrite_fixlen_trunc:
  961. $(PRINTF) "%s" "[tcprewrite] Fix length and truncate test: "
  962. $(PRINTF) "%s\n" "*** [tcprewrite] Fix length and truncate test: " >> test.log
  963. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 --fixlen=trunc >> test.log 2>&1
  964. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  965. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  966. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t%s\n" "OK"; fi
  967. rewrite_fixlen_del:
  968. $(PRINTF) "%s" "[tcprewrite] Fix length and delete test: "
  969. $(PRINTF) "%s\n" "*** [tcprewrite] Fix length and delete test: " >> test.log
  970. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 --fixlen=del >> test.log 2>&1
  971. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  972. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  973. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t%s\n" "OK"; fi
  974. replay_pps:
  975. $(PRINTF) "%s" "[tcpreplay] Packets/sec test: "
  976. $(PRINTF) "%s\n" "*** [tcpreplay] Packets/sec test: " >> test.log
  977. $(TCPREPLAY) $(ENABLE_DEBUG) -i $(nic1) -p 25 $(TEST_PCAP) >> test.log 2>&1
  978. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  979. replay_rate:
  980. $(PRINTF) "%s" "[tcpreplay] Mbps test: "
  981. $(PRINTF) "%s\n" "*** [tcpreplay] Mbps test: " >> test.log
  982. $(TCPREPLAY) $(ENABLE_DEBUG) -i $(nic1) -M 25.0 $(TEST_PCAP) >> test.log 2>&1
  983. if [ $? ] ; then $(PRINTF) "\t\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t\t%s\n" "OK"; fi
  984. replay_multi:
  985. $(PRINTF) "%s" "[tcpreplay] Multiplier test: "
  986. $(PRINTF) "%s\n" "*** [tcpreplay] Multiplier test: " >> test.log
  987. $(TCPREPLAY) $(ENABLE_DEBUG) -i $(nic1) -x 25.0 $(TEST_PCAP) >> test.log 2>&1
  988. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  989. replay_pps_multi:
  990. $(PRINTF) "%s" "[tcpreplay] Packets/sec Multiplier test: "
  991. $(PRINTF) "%s\n" "*** [tcpreplay] Packets/sec Multiplier test: " >> test.log
  992. $(TCPREPLAY) $(ENABLE_DEBUG) -i $(nic1) -p 100 --pps-multi=5 $(TEST_PCAP) >> test.log 2>&1
  993. if [ $? ] ; then $(PRINTF) "\t%s\n" "FAILED"; else $(PRINTF) "\t%s\n" "OK"; fi
  994. replay_top:
  995. $(PRINTF) "%s" "[tcpreplay] Topspeed test: "
  996. $(PRINTF) "%s\n" "*** [tcpreplay] Topspeed test: " >> test.log
  997. $(TCPREPLAY) $(ENABLE_DEBUG) -i $(nic1) -t $(TEST_PCAP) >> test.log 2>&1
  998. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  999. replay_precache:
  1000. $(PRINTF) "%s" "[tcpreplay] Precache test: "
  1001. $(PRINTF) "%s\n" "*** [tcpreplay] Precache test: " >> test.log
  1002. $(TCPREPLAY) $(ENABLE_DEBUG) -i $(nic1) --preload-pcap $(TEST_PCAP) >> test.log 2>&1
  1003. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  1004. datadump_mode:
  1005. $(PRINTF) "%s" "[tcpreplay] Data dump test: "
  1006. $(PRINTF) "%s\n" "*** [tcpreplay] Data dump mode test: " >> test.log
  1007. $(TCPREPLAY) $(ENABLE_DEBUG) -D -i $(nic1) -I $(nic2) -w primary.data -W secondary.data -c $(srcdir)/test.cidr -R $(TEST_PCAP) >> test.log 2>&1
  1008. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  1009. replay_config:
  1010. $(PRINTF) "%s" "[tcpreplay] Config file/VLAN add test: "
  1011. $(PRINTF) "%s\n" "*** [tcpreplay] Config file/VLAN add test: " >> test.log
  1012. $(TCPREPLAY) $(ENABLE_DEBUG) --load-opts=config $(TEST_PCAP) >> test.log 2>&1
  1013. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  1014. replay_dualfile:
  1015. $(PRINTF) "%s" "[tcpreplay] Dual file test: "
  1016. $(PRINTF) "%s\n" "*** [tcpreplay] Dual file test: " >> test.log
  1017. $(TCPREPLAY) $(ENABLE_DEBUG) -i $(nic1) -I $(nic2) --dualfile $(TEST_PCAP) $(TEST_PCAP) >> test.log 2>&1
  1018. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  1019. replay_maxsleep:
  1020. $(PRINTF) "%s" "[tcpreplay] Maximum sleep test: "
  1021. $(PRINTF) "%s\n" "*** [tcpreplay] Maximum sleep test: " >> test.log
  1022. $(TCPREPLAY) $(ENABLE_DEBUG) -i $(nic1) --maxsleep=20 $(TEST_PCAP) $(TEST_PCAP) >> test.log 2>&1
  1023. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  1024. clean:
  1025. rm -f *1 test.log core* *~ primary.data secondary.data
  1026. distclean: clean
  1027. rm -f Makefile Makefile.in config
  1028. maintainer-clean: distclean
  1029. # Tell versions [3.59,3.63) of GNU make to not export all variables.
  1030. # Otherwise a system limit (for SysV at least) may be exceeded.
  1031. .NOEXPORT: