Makefile.in 54 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249
  1. # Makefile.in generated by automake 1.16.3 from Makefile.am.
  2. # @configure_input@
  3. # Copyright (C) 1994-2020 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_tsan = @build_tsan@
  240. build_vendor = @build_vendor@
  241. builddir = @builddir@
  242. datadir = @datadir@
  243. datarootdir = @datarootdir@
  244. debug_flag = @debug_flag@
  245. debug_run_time_flag = @debug_run_time_flag@
  246. depmod = @depmod@
  247. docdir = @docdir@
  248. dvidir = @dvidir@
  249. exec_prefix = @exec_prefix@
  250. extra_debug_flag = @extra_debug_flag@
  251. host = @host@
  252. host_alias = @host_alias@
  253. host_cpu = @host_cpu@
  254. host_os = @host_os@
  255. host_vendor = @host_vendor@
  256. htmldir = @htmldir@
  257. includedir = @includedir@
  258. infodir = @infodir@
  259. insmod = @insmod@
  260. install_sh = @install_sh@
  261. libdir = @libdir@
  262. libexecdir = @libexecdir@
  263. localedir = @localedir@
  264. localstatedir = @localstatedir@
  265. mandir = @mandir@
  266. mkdir_p = @mkdir_p@
  267. nic1 = @nic1@
  268. nic2 = @nic2@
  269. oldincludedir = @oldincludedir@
  270. pcncfg = @pcncfg@
  271. pdfdir = @pdfdir@
  272. prefix = @prefix@
  273. program_transform_name = @program_transform_name@
  274. psdir = @psdir@
  275. rmmod = @rmmod@
  276. runstatedir = @runstatedir@
  277. sbindir = @sbindir@
  278. sharedstatedir = @sharedstatedir@
  279. srcdir = @srcdir@
  280. sysconfdir = @sysconfdir@
  281. target = @target@
  282. target_alias = @target_alias@
  283. target_cpu = @target_cpu@
  284. target_os = @target_os@
  285. target_vendor = @target_vendor@
  286. tcpdump_path = @tcpdump_path@
  287. timestamp_trace_flag = @timestamp_trace_flag@
  288. top_build_prefix = @top_build_prefix@
  289. top_builddir = @top_builddir@
  290. top_srcdir = @top_srcdir@
  291. # $Id$
  292. MAKEFLAGS = -s -k
  293. HOST = @host@
  294. TARGET = @target@
  295. BUILD = @build@
  296. ENABLE_DEBUG = @debug_run_time_flag@
  297. TCPPREP = ../src/tcpprep --no-arg-comment
  298. TCPREPLAY = ../src/tcpreplay
  299. TCPREWRITE = ../src/tcprewrite
  300. TCPBRIDGE = ../src/tcpbridge
  301. TEST_PCAP = $(srcdir)/test.pcap
  302. EXTRA_DIST = test.pcap test.auto_bridge test.auto_client test.auto_router \
  303. test.auto_server test.auto_first test.cidr test.comment test.port test.mac \
  304. test.cidr_reverse test.mac_reverse test.regex_reverse \
  305. test.include_packets test.exclude_packets test.include_source \
  306. test.include_dest test.prep_config \
  307. test.primary test.regex test.secondary \
  308. test.rewrite_seed test.rewrite_portmap test.rewrite_endpoint \
  309. test.rewrite_pnat test.rewrite_pad test.rewrite_trunc \
  310. test.rewrite_mac test.rewrite_layer2 test.rewrite_config \
  311. test.rewrite_skip test.rewrite_dltuser test.rewrite_dlthdlc \
  312. test.rewrite_vlan802.1ad test.rewrite_vlandel test.rewrite_efcs \
  313. test.rewrite_1ttl test.rewrite_2ttl test.rewrite_3ttl \
  314. test.rewrite_1ttl-hdrfix test.rewrite_2ttl-hdrfix test.rewrite_3ttl-hdrfix \
  315. test.rewrite_enet_subsmac \
  316. test.rewrite_mtutrunc test.rewrite_mac_seed test.rewrite_range_portmap \
  317. test.rewrite_mac_seed_keep test.rewrite_l7fuzzing test.rewrite_sequence test.rewrite_fixcsum \
  318. test.rewrite_fixlen_pad test.rewrite_fixlen_trunc test.rewrite_fixlen_del \
  319. test.replay_unique_ip test.replay_include test.replay_exclude \
  320. test2.rewrite_seed test2.rewrite_portmap test2.rewrite_endpoint \
  321. test2.rewrite_pnat test2.rewrite_pad test2.rewrite_trunc \
  322. test2.rewrite_mac test2.rewrite_layer2 test2.rewrite_config \
  323. test2.rewrite_skip test2.rewrite_dltuser test2.rewrite_dlthdlc \
  324. test2.rewrite_vlan802.1ad test2.rewrite_vlandel test2.rewrite_efcs \
  325. test2.rewrite_1ttl test2.rewrite_2ttl test2.rewrite_3ttl \
  326. test2.rewrite_1ttl-hdrfix test2.rewrite_2ttl-hdrfix test2.rewrite_3ttl-hdrfix \
  327. test2.rewrite_mtutrunc test2.rewrite_enet_subsmac \
  328. test.rewrite_tos test2.rewrite_tos \
  329. test2.rewrite_enet_subsmac test2.rewrite_mac_seed \
  330. test2.rewrite_range_portmap test2.rewrite_mac_seed_keep \
  331. test2.rewrite_l7fuzzing test2.rewrite_sequence test2.rewrite_fixcsum \
  332. test2.rewrite_fixlen_pad test2.rewrite_fixlen_trunc test2.rewrite_fixlen_del \
  333. test2.replay_unique_ip test2.replay_include test2.replay_exclude
  334. @WORDS_BIGENDIAN_FALSE@STANDARD_REWRITE = standard_littleendian
  335. @WORDS_BIGENDIAN_TRUE@STANDARD_REWRITE = standard_bigendian
  336. @WORDS_BIGENDIAN_FALSE@REWRITE_WARN = "little"
  337. @WORDS_BIGENDIAN_TRUE@REWRITE_WARN = "big"
  338. all: all-am
  339. .SUFFIXES:
  340. $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
  341. @for dep in $?; do \
  342. case '$(am__configure_deps)' in \
  343. *$$dep*) \
  344. ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
  345. && { if test -f $@; then exit 0; else break; fi; }; \
  346. exit 1;; \
  347. esac; \
  348. done; \
  349. echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/Makefile'; \
  350. $(am__cd) $(top_srcdir) && \
  351. $(AUTOMAKE) --foreign test/Makefile
  352. Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
  353. @case '$?' in \
  354. *config.status*) \
  355. cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
  356. *) \
  357. echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
  358. cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
  359. esac;
  360. $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
  361. cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
  362. $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
  363. cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
  364. $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
  365. cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
  366. $(am__aclocal_m4_deps):
  367. config: $(top_builddir)/config.status $(srcdir)/config.in
  368. cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
  369. mostlyclean-libtool:
  370. -rm -f *.lo
  371. clean-libtool:
  372. -rm -rf .libs _libs
  373. tags TAGS:
  374. ctags CTAGS:
  375. cscope cscopelist:
  376. distdir: $(BUILT_SOURCES)
  377. $(MAKE) $(AM_MAKEFLAGS) distdir-am
  378. distdir-am: $(DISTFILES)
  379. @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
  380. topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
  381. list='$(DISTFILES)'; \
  382. dist_files=`for file in $$list; do echo $$file; done | \
  383. sed -e "s|^$$srcdirstrip/||;t" \
  384. -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
  385. case $$dist_files in \
  386. */*) $(MKDIR_P) `echo "$$dist_files" | \
  387. sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
  388. sort -u` ;; \
  389. esac; \
  390. for file in $$dist_files; do \
  391. if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
  392. if test -d $$d/$$file; then \
  393. dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
  394. if test -d "$(distdir)/$$file"; then \
  395. find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
  396. fi; \
  397. if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
  398. cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
  399. find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
  400. fi; \
  401. cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
  402. else \
  403. test -f "$(distdir)/$$file" \
  404. || cp -p $$d/$$file "$(distdir)/$$file" \
  405. || exit 1; \
  406. fi; \
  407. done
  408. check-am: all-am
  409. check: check-am
  410. all-am: Makefile
  411. installdirs:
  412. install: install-am
  413. install-exec: install-exec-am
  414. install-data: install-data-am
  415. uninstall: uninstall-am
  416. install-am: all-am
  417. @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
  418. installcheck: installcheck-am
  419. install-strip:
  420. if test -z '$(STRIP)'; then \
  421. $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
  422. install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
  423. install; \
  424. else \
  425. $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
  426. install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
  427. "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
  428. fi
  429. mostlyclean-generic:
  430. clean-generic:
  431. distclean-generic:
  432. -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
  433. -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
  434. maintainer-clean-generic:
  435. @echo "This command is intended for maintainers to use"
  436. @echo "it deletes files that may require special tools to rebuild."
  437. clean-am: clean-generic clean-libtool mostlyclean-am
  438. distclean-am: clean-am distclean-generic
  439. dvi: dvi-am
  440. dvi-am:
  441. html: html-am
  442. html-am:
  443. info: info-am
  444. info-am:
  445. install-data-am:
  446. install-dvi: install-dvi-am
  447. install-dvi-am:
  448. install-exec-am:
  449. install-html: install-html-am
  450. install-html-am:
  451. install-info: install-info-am
  452. install-info-am:
  453. install-man:
  454. install-pdf: install-pdf-am
  455. install-pdf-am:
  456. install-ps: install-ps-am
  457. install-ps-am:
  458. installcheck-am:
  459. maintainer-clean-am: distclean-am maintainer-clean-generic
  460. mostlyclean: mostlyclean-am
  461. mostlyclean-am: mostlyclean-generic mostlyclean-libtool
  462. pdf: pdf-am
  463. pdf-am:
  464. ps: ps-am
  465. ps-am:
  466. uninstall-am:
  467. .MAKE: install-am install-strip
  468. .PHONY: all all-am check check-am clean clean-generic clean-libtool \
  469. cscopelist-am ctags-am distclean distclean-generic \
  470. distclean-libtool distdir dvi dvi-am html html-am info info-am \
  471. install install-am install-data install-data-am install-dvi \
  472. install-dvi-am install-exec install-exec-am install-html \
  473. install-html-am install-info install-info-am install-man \
  474. install-pdf install-pdf-am install-ps install-ps-am \
  475. install-strip installcheck installcheck-am installdirs \
  476. maintainer-clean maintainer-clean-generic mostlyclean \
  477. mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
  478. tags-am uninstall uninstall-am
  479. .PRECIOUS: Makefile
  480. test: all
  481. all: clearlog check tcpprep tcpreplay tcprewrite
  482. clearlog:
  483. -rm test.log
  484. check:
  485. $(PRINTF) "%s\n" "NOTICE: Tests must be run as root"
  486. $(PRINTF) "%s\n" "Sending traffic on '$(nic1)' and '$(nic2)'"
  487. standard: standard_prep $(STANDARD_REWRITE)
  488. $(PRINTF) "Warning: only creating %s endian standard test files\n" $(REWRITE_WARN)
  489. standard_prep:
  490. $(TCPPREP) -i $(TEST_PCAP) -o test.auto_router -a router
  491. $(TCPPREP) -i $(TEST_PCAP) -o test.auto_bridge -a bridge
  492. $(TCPPREP) -i $(TEST_PCAP) -o test.auto_client -a client
  493. $(TCPPREP) -i $(TEST_PCAP) -o test.auto_server -a server
  494. $(TCPPREP) -i $(TEST_PCAP) -o test.auto_first -a first
  495. $(TCPPREP) --load-opts config -o test.prep_config
  496. $(TCPPREP) -i $(TEST_PCAP) -o test.port -p
  497. $(TCPPREP) -i $(TEST_PCAP) -o test.mac -e 00:1f:f3:3c:e1:13
  498. $(TCPPREP) -i $(TEST_PCAP) -o test.cidr -c '96.17.211.0/24'
  499. $(TCPPREP) -i $(TEST_PCAP) -o test.regex -r '96.17.211.*'
  500. $(TCPPREP) -i $(TEST_PCAP) -o test.comment -C "This is a comment" -p
  501. $(TCPPREP) -i $(TEST_PCAP) -o test.mac_reverse -e 00:1f:f3:3c:e1:13 --reverse
  502. $(TCPPREP) -i $(TEST_PCAP) -o test.cidr_reverse -c '96.17.211.0/24' --reverse
  503. $(TCPPREP) -i $(TEST_PCAP) -o test.regex_reverse -r '96.17.211.*' --reverse
  504. $(TCPPREP) -i $(TEST_PCAP) -o test.exclude_packets -c '96.17.211.0/24' --exclude 'P:61-65,88-91'
  505. $(TCPPREP) -i $(TEST_PCAP) -o test.include_packets -c '96.17.211.0/24' --include 'P:61-65,88-91'
  506. $(TCPPREP) -i $(TEST_PCAP) -o test.include_source -c '96.17.211.0/24' --include 'S:96.0.0.0/8'
  507. $(TCPPREP) -i $(TEST_PCAP) -o test.include_dest -c '96.17.211.0/24' --include 'D:96.0.0.0/8'
  508. standard_bigendian:
  509. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_seed -s 55
  510. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_tos --tos=50
  511. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_portmap -r 80:8080
  512. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_range_portmap -r 1-100:49148
  513. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_sequence --tcp-sequence 42
  514. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_endpoint \
  515. -e 10.10.0.1:10.10.0.2 -c test.auto_router
  516. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_pnat \
  517. -N 96.17.211.0/24:172.16.0.0/24
  518. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_pad -F pad
  519. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_trunc -F trunc
  520. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_mac \
  521. --enet-dmac=00:12:13:14:15:16,00:22:33:44:55:66 \
  522. --enet-smac=00:22:33:44:55:66,00:12:13:14:15:16 -c $(srcdir)/test.auto_router
  523. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_enet_subsmac \
  524. --enet-subsmac=00:1f:f3:3c:e1:13,00:22:33:44:55:66 \
  525. --enet-subsmac=f8:1e:df:e5:84:3a,00:66:55:44:33:22
  526. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_mac_seed --enet-mac-seed=42
  527. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_mac_seed_keep --enet-mac-seed=42 \
  528. --enet-mac-seed-keep-bytes=3
  529. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_layer2 \
  530. --dlt=user --user-dlink=00,50,da,5d,46,55,0,7,eb,30,a4,c3,08,0
  531. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_config --enet-vlan=add --enet-vlan-tag=45 \
  532. --enet-vlan-cfi=1 --enet-vlan-pri=5
  533. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_skip \
  534. --skipbroadcast --skipl2broadcast --skip-soft-errors --seed 55 \
  535. --enet-dmac=00:12:13:14:15:16,00:22:33:44:55:66 \
  536. --enet-smac=00:22:33:44:55:66,00:12:13:14:15:16 -c $(srcdir)/test.auto_router
  537. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_dltuser --dlt=user \
  538. --user-dlink=0x0f,0x00,0x08,0x00 --user-dlt=104
  539. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_dlthdlc --dlt=hdlc \
  540. --hdlc-control=0 --hdlc-address=0x0F
  541. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_vlan802.1ad \
  542. --enet-vlan=add --enet-vlan-tag=42 --enet-vlan-cfi=1 \
  543. --enet-vlan-pri=2 --enet-vlan-proto=802.1ad
  544. $(TCPREWRITE) -i $(srcdir)/test.rewrite_config -o test.rewrite_vlandel \
  545. --enet-vlan=del
  546. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_efcs --efcs
  547. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_1ttl --ttl=58
  548. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_2ttl --ttl=+58
  549. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_3ttl --ttl=-58
  550. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_1ttl-hdrfix --ttl=59 --fixhdrlen
  551. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_2ttl-hdrfix --ttl=+59 --fixhdrlen
  552. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_3ttl-hdrfix --ttl=-59 --fixhdrlen
  553. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_mtutrunc --mtu-trunc --mtu=300
  554. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_l7fuzzing \
  555. --fuzz-seed=42 --fuzz-factor=2
  556. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_fixcsum --fixcsum
  557. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_fixlen_pad --fixlen=pad
  558. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_fixlen_trunc --fixlen=trunc
  559. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_fixlen_del --fixlen=del
  560. $(TCPREPLAY) -w test.replay_include -t --include=7,11,20-23,174- $(TEST_PCAP)
  561. $(TCPREPLAY) -w test.replay_exclude -t --exclude=23-,11-20,2,3 $(TEST_PCAP)
  562. $(TCPREPLAY) -w test.replay_unique_ip -t --unique-ip --loop=2 $(TEST_PCAP)
  563. standard_littleendian:
  564. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_seed -s 55
  565. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_tos --tos=50
  566. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_portmap -r 80:8080
  567. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_range_portmap -r 1-100:49148
  568. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_sequence --tcp-sequence 42
  569. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_endpoint \
  570. -e 10.10.0.1:10.10.0.2 -c test.auto_router
  571. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_pnat \
  572. -N 96.17.211.0/24:172.16.0.0/24
  573. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_pad -F pad
  574. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_trunc -F trunc
  575. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_mac \
  576. --enet-dmac=00:12:13:14:15:16,00:22:33:44:55:66 \
  577. --enet-smac=00:22:33:44:55:66,00:12:13:14:15:16 -c $(srcdir)/test.auto_router
  578. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_enet_subsmac \
  579. --enet-subsmac=00:1f:f3:3c:e1:13,00:22:33:44:55:66 \
  580. --enet-subsmac=f8:1e:df:e5:84:3a,00:66:55:44:33:22
  581. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_mac_seed --enet-mac-seed=42
  582. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_mac_seed_keep --enet-mac-seed=42 \
  583. --enet-mac-seed-keep-bytes=3
  584. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_layer2 \
  585. --dlt=user --user-dlink=00,50,da,5d,46,55,0,7,eb,30,a4,c3,08,0
  586. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_config --enet-vlan=add --enet-vlan-tag=45 \
  587. --enet-vlan-cfi=1 --enet-vlan-pri=5
  588. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_skip \
  589. --skipbroadcast --skipl2broadcast --skip-soft-errors --seed 55 \
  590. --enet-dmac=00:12:13:14:15:16,00:22:33:44:55:66 \
  591. --enet-smac=00:22:33:44:55:66,00:12:13:14:15:16 -c $(srcdir)/test.auto_router
  592. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_dltuser --dlt=user \
  593. --user-dlink=0x0f,0x00,0x08,0x00 --user-dlt=104
  594. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_dlthdlc --dlt=hdlc \
  595. --hdlc-control=0 --hdlc-address=0x0F
  596. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_vlan802.1ad \
  597. --enet-vlan=add --enet-vlan-tag=42 --enet-vlan-cfi=1 \
  598. --enet-vlan-pri=2 --enet-vlan-proto=802.1ad
  599. $(TCPREWRITE) -i $(srcdir)/test.rewrite_config -o test2.rewrite_vlandel \
  600. --enet-vlan=del
  601. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_efcs --efcs
  602. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_1ttl --ttl=58
  603. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_2ttl --ttl=+58
  604. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_3ttl --ttl=-58
  605. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_1ttl-hdrfix --ttl=59 --fixhdrlen
  606. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_2ttl-hdrfix --ttl=+59 --fixhdrlen
  607. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_3ttl-hdrfix --ttl=-59 --fixhdrlen
  608. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_mtutrunc --mtu-trunc --mtu=300
  609. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_l7fuzzing \
  610. --fuzz-seed=42 --fuzz-factor=2
  611. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_fixcsum --fixcsum
  612. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_fixlen_pad --fixlen=pad
  613. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_fixlen_trunc --fixlen=trunc
  614. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_fixlen_del --fixlen=del
  615. $(TCPREPLAY) -w test2.replay_include -t --include=7,11,20-23,174- $(TEST_PCAP)
  616. $(TCPREPLAY) -w test2.replay_exclude -t --exclude=23-,11-20,2,3 $(TEST_PCAP)
  617. $(TCPREPLAY) -w test2.replay_unique_ip -t --unique-ip --loop=2 $(TEST_PCAP)
  618. tcpprep: auto_router auto_bridge auto_client auto_server auto_first cidr regex \
  619. port mac comment print_info print_comment prep_config \
  620. mac_reverse cidr_reverse regex_reverse exclude_packets \
  621. include_packets include_source include_dest
  622. tcprewrite: rewrite_portmap rewrite_range_portmap rewrite_endpoint \
  623. rewrite_pnat rewrite_trunc rewrite_pad rewrite_seed rewrite_mac \
  624. rewrite_layer2 rewrite_config rewrite_skip rewrite_dltuser rewrite_dlthdlc \
  625. rewrite_vlan802.1ad rewrite_vlandel rewrite_efcs \
  626. rewrite_1ttl rewrite_2ttl rewrite_3ttl rewrite_1ttl-hdrfix rewrite_2ttl-hdrfix rewrite_3ttl-hdrfix \
  627. rewrite_tos rewrite_mtutrunc rewrite_enet_subsmac rewrite_mac_seed \
  628. rewrite_mac_seed_keep rewrite_l7fuzzing rewrite_sequence rewrite_fixcsum \
  629. rewrite_fixlen_pad rewrite_fixlen_trunc rewrite_fixlen_del
  630. tcpreplay: replay_basic replay_nano_timer replay_cache replay_pps replay_rate replay_top \
  631. replay_config replay_multi replay_pps_multi replay_precache \
  632. replay_stats replay_dualfile replay_maxsleep replay_include replay_exclude replay_unique_ip
  633. prep_config:
  634. $(PRINTF) "%s" "[tcpprep] Config mode test: "
  635. $(PRINTF) "%s\n" "*** [tcpprep] Config mode test: " >> test.log
  636. $(TCPPREP) $(ENABLE_DEBUG) --load-opts=config -o test.$@1 >> test.log 2>&1
  637. diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  638. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  639. auto_router:
  640. $(PRINTF) "%s" "[tcpprep] Auto/Router mode test: "
  641. $(PRINTF) "%s\n" "*** [tcpprep] Auto/Router mode test: " >> test.log
  642. $(TCPPREP) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -a router >> test.log 2>&1
  643. diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  644. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  645. auto_bridge:
  646. $(PRINTF) "%s" "[tcpprep] Auto/Bridge mode test: "
  647. $(PRINTF) "%s\n" "*** [tcpprep] Auto/Bridge mode test: " >> test.log
  648. $(TCPPREP) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -a bridge >> test.log 2>&1
  649. diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  650. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  651. auto_client:
  652. $(PRINTF) "%s" "[tcpprep] Auto/Client mode test: "
  653. $(PRINTF) "%s\n" "*** [tcpprep] Auto/Client mode test: " >> test.log
  654. $(TCPPREP) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -a client >> test.log 2>&1
  655. diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  656. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  657. auto_server:
  658. $(PRINTF) "%s" "[tcpprep] Auto/Server mode test: "
  659. $(PRINTF) "%s\n" "*** [tcpprep] Auto/Server mode test: " >> test.log
  660. $(TCPPREP) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -a server >> test.log 2>&1
  661. diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  662. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  663. auto_first:
  664. $(PRINTF) "%s" "[tcpprep] Auto/First mode test: "
  665. $(PRINTF) "%s\n" "*** [tcpprep] Auto/First mode test: " >> test.log
  666. $(TCPPREP) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -a first >> test.log 2>&1
  667. diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  668. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  669. regex:
  670. $(PRINTF) "%s" "[tcpprep] Regex mode test: "
  671. $(PRINTF) "%s\n" "*** [tcpprep] Regex mode test: " >> test.log
  672. $(TCPPREP) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -r '96.17.211.*' >> test.log 2>&1
  673. diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  674. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  675. cidr:
  676. $(PRINTF) "%s" "[tcpprep] CIDR mode test: "
  677. $(PRINTF) "%s\n" "*** [tcpprep] CIDR mode test: " >> test.log
  678. $(TCPPREP) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -c '96.17.211.0/24' >> test.log 2>&1
  679. diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  680. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  681. port:
  682. $(PRINTF) "%s" "[tcpprep] Port mode test: "
  683. $(PRINTF) "%s\n" "*** [tcpprep] Port mode test: " >> test.log
  684. $(TCPPREP) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -p >> test.log 2>&1
  685. diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  686. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  687. mac:
  688. $(PRINTF) "%s" "[tcpprep] MAC mode test: "
  689. $(PRINTF) "%s\n" "*** [tcpprep] MAC mode test: " >> test.log
  690. $(TCPPREP) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -e 00:1f:f3:3c:e1:13 >> test.log 2>&1
  691. diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  692. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  693. comment:
  694. $(PRINTF) "%s" "[tcpprep] Comment mode test: "
  695. $(PRINTF) "%s\n" "*** [tcpprep] Comment mode test: " >> test.log
  696. $(TCPPREP) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -C "This is a comment" -p >> test.log 2>&1
  697. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  698. print_comment:
  699. $(PRINTF) "%s" "[tcpprep] Print comment mode test: "
  700. $(PRINTF) "%s\n" "*** [tcpprep] Print comment mode test: " >> test.log
  701. $(TCPPREP) $(ENABLE_DEBUG) -P $(srcdir)/test.comment >$(srcdir)/test.$@1 >> test.log 2>&1
  702. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  703. print_info:
  704. $(PRINTF) "%s" "[tcpprep] Print info mode test: "
  705. $(PRINTF) "%s\n" "*** [tcpprep] Print info mode test: " >> test.log
  706. $(TCPPREP) $(ENABLE_DEBUG) -I $(srcdir)/test.comment >$(srcdir)/test.$@1 >> test.log 2>&1
  707. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  708. regex_reverse:
  709. $(PRINTF) "%s" "[tcpprep] Regex reverse mode test: "
  710. $(PRINTF) "%s\n" "*** [tcpprep] Regex reverse mode test: " >> test.log
  711. $(TCPPREP) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -r '96.17.211.*' --reverse >> test.log 2>&1
  712. diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  713. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  714. cidr_reverse:
  715. $(PRINTF) "%s" "[tcpprep] CIDR reverse mode test: "
  716. $(PRINTF) "%s\n" "*** [tcpprep] CIDR reverse mode test: " >> test.log
  717. $(TCPPREP) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -c '96.17.211.0/24' --reverse >> test.log 2>&1
  718. diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  719. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  720. mac_reverse:
  721. $(PRINTF) "%s" "[tcpprep] MAC reverse mode test: "
  722. $(PRINTF) "%s\n" "*** [tcpprep] MAC reverse mode test: " >> test.log
  723. $(TCPPREP) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -e 00:1f:f3:3c:e1:13 --reverse >> test.log 2>&1
  724. diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  725. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  726. exclude_packets:
  727. $(PRINTF) "%s" "[tcpprep] exclude packets test: "
  728. $(PRINTF) "%s\n" "*** [tcpprep] exclude packets test: " >> test.log
  729. $(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
  730. diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  731. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  732. include_packets:
  733. $(PRINTF) "%s" "[tcpprep] include packets test: "
  734. $(PRINTF) "%s\n" "*** [tcpprep] include packets test: " >> test.log
  735. $(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
  736. diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  737. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  738. include_source:
  739. $(PRINTF) "%s" "[tcpprep] include source test: "
  740. $(PRINTF) "%s\n" "*** [tcpprep] include source test: " >> test.log
  741. $(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
  742. diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  743. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  744. include_dest:
  745. $(PRINTF) "%s" "[tcpprep] include destination test: "
  746. $(PRINTF) "%s\n" "*** [tcpprep] include destination test: " >> test.log
  747. $(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
  748. diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  749. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  750. replay_basic:
  751. $(PRINTF) "%s" "[tcpreplay] Basic test: "
  752. $(PRINTF) "%s\n" "*** [tcpreplay] Basic test: " >> test.log
  753. $(TCPREPLAY) $(ENABLE_DEBUG) -i $(nic1) -t $(TEST_PCAP) >> test.log 2>&1
  754. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  755. replay_nano_timer:
  756. $(PRINTF) "%s" "[tcpreplay] Nano timer test: "
  757. $(PRINTF) "%s\n" "*** [tcpreplay] Nano timer test: " >> test.log
  758. $(TCPREPLAY) $(ENABLE_DEBUG) -i $(nic1) --loop=2 --loopdelay-ns=125000000 -t $(TEST_PCAP) >> test.log 2>&1
  759. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  760. replay_cache:
  761. $(PRINTF) "%s" "[tcpreplay] Cache test: "
  762. $(PRINTF) "%s\n" "*** [tcpreplay] Cache test: " >> test.log
  763. $(TCPREPLAY) $(ENABLE_DEBUG) -c $(srcdir)/test.cidr -i $(nic1) -I $(nic2) -t $(TEST_PCAP) >> test.log 2>&1
  764. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  765. replay_accurate:
  766. $(PRINTF) "%s" "[tcpreplay] Accurate test: "
  767. $(PRINTF) "%s\n" "*** [tcpreplay] Accurate test: " >> test.log
  768. $(TCPREPLAY) $(ENABLE_DEBUG) -a -i $(nic1) $(TEST_PCAP) >> test.log 2>&1
  769. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  770. replay_stats:
  771. $(PRINTF) "%s" "[tcpreplay] Statistics test: "
  772. $(PRINTF) "%s\n" "*** [tcpreplay] Statistics test: " >> test.log
  773. $(TCPREPLAY) $(ENABLE_DEBUG) --stats=1 -i $(nic1) $(TEST_PCAP) >> test.log 2>&1
  774. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  775. rewrite_portmap:
  776. $(PRINTF) "%s" "[tcprewrite] Portmap test: "
  777. $(PRINTF) "%s\n" "*** [tcprewrite] Portmap test: " >> test.log
  778. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -r 80:8080 >> test.log 2>&1
  779. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  780. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  781. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  782. rewrite_range_portmap:
  783. $(PRINTF) "%s" "[tcprewrite] Portmap range test: "
  784. $(PRINTF) "%s\n" "*** [tcprewrite] Portmap range test: " >> test.log
  785. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -r 1-100:49148 >> test.log 2>&1
  786. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  787. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  788. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  789. rewrite_sequence:
  790. $(PRINTF) "%s" "[tcprewrite] TCP sequence test: "
  791. $(PRINTF) "%s\n" "*** [tcprewrite] TCP sequence test: " >> test.log
  792. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 --tcp-sequence 42 >> test.log 2>&1
  793. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  794. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  795. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  796. rewrite_endpoint:
  797. $(PRINTF) "%s" "[tcprewrite] Endpoint test: "
  798. $(PRINTF) "%s\n" "*** [tcprewrite] Endpoint test: " >> test.log
  799. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -e 10.10.0.1:10.10.0.2 \
  800. -c $(srcdir)/test.auto_router >> test.log 2>&1
  801. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  802. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  803. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  804. rewrite_pnat:
  805. $(PRINTF) "%s" "[tcprewrite] Pseudo NAT test: "
  806. $(PRINTF) "%s\n" "*** [tcprewrite] Pseudo NAT test: " >> test.log
  807. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 \
  808. -N 96.17.211.0/24:172.16.0.0/24 >> test.log 2>&1
  809. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  810. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  811. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  812. rewrite_mac:
  813. $(PRINTF) "%s" "[tcprewrite] Src/Dst MAC test: "
  814. $(PRINTF) "%s\n" "*** [tcprewrite] Src/Dst MAC test: " >> test.log
  815. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 \
  816. --enet-dmac=00:12:13:14:15:16,00:22:33:44:55:66 \
  817. --enet-smac=00:22:33:44:55:66,00:12:13:14:15:16 -c $(srcdir)/test.auto_router >> test.log 2>&1
  818. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  819. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  820. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  821. rewrite_enet_subsmac:
  822. $(PRINTF) "%s" "[tcprewrite] Substitute Src/Dst MAC test: "
  823. $(PRINTF) "%s\n" "*** [tcprewrite] Substitute Src/Dst MAC test: " >> test.log
  824. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 \
  825. --enet-subsmac=00:1f:f3:3c:e1:13,00:22:33:44:55:66 \
  826. --enet-subsmac=f8:1e:df:e5:84:3a,00:66:55:44:33:22 >> test.log 2>&1
  827. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  828. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  829. if [ $? ] ; then $(PRINTF) "\t%s\n" "FAILED"; else $(PRINTF) "\t%s\n" "OK"; fi
  830. rewrite_mac_seed:
  831. $(PRINTF) "%s" "[tcprewrite] Seeded MAC test: "
  832. $(PRINTF) "%s\n" "*** [tcprewrite] Seeded MAC test: " >> test.log
  833. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 \
  834. --enet-mac-seed=42 >> test.log 2>&1
  835. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  836. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  837. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  838. rewrite_mac_seed_keep:
  839. $(PRINTF) "%s" "[tcprewrite] Seeded Keep MAC test: "
  840. $(PRINTF) "%s\n" "*** [tcprewrite] Seeded Keep MAC test: " >> test.log
  841. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 \
  842. --enet-mac-seed=42 --enet-mac-seed-keep-bytes=3 >> test.log 2>&1
  843. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  844. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  845. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  846. rewrite_trunc:
  847. $(PRINTF) "%s" "[tcprewrite] Truncate test: "
  848. $(PRINTF) "%s\n" "*** [tcprewrite] Truncate test: " >> test.log
  849. $(TCPREWRITE) $(ENABLE_DEBUG) -F trunc -i $(TEST_PCAP) -o test.$@1 >> test.log 2>&1
  850. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  851. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  852. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  853. rewrite_pad:
  854. $(PRINTF) "%s" "[tcprewrite] Pad test: "
  855. $(PRINTF) "%s\n" "*** [tcprewrite] Pad test: " >> test.log
  856. $(TCPREWRITE) $(ENABLE_DEBUG) -F pad -i $(TEST_PCAP) -o test.$@1 >> test.log 2>&1
  857. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  858. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  859. if [ $? ] ; then $(PRINTF) "\t\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t\t%s\n" "OK"; fi
  860. rewrite_seed:
  861. $(PRINTF) "%s" "[tcprewrite] Seed IP test: "
  862. $(PRINTF) "%s\n" "*** [tcprewrite] Seed IP test: " >> test.log
  863. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -s 55 >> test.log 2>&1
  864. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  865. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  866. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  867. rewrite_layer2:
  868. $(PRINTF) "%s" "[tcprewrite] Layer2 test: "
  869. $(PRINTF) "%s\n" "*** [tcprewrite] Layer2 test: " >> test.log
  870. $(TCPREWRITE) $(ENABLE_DEBUG) --dlt=user --user-dlink=00,50,da,5d,46,55,0,7,eb,30,a4,c3,08,0 \
  871. -i $(TEST_PCAP) -o test.$@1 >> test.log 2>&1
  872. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  873. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  874. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  875. rewrite_config:
  876. $(PRINTF) "%s" "[tcprewrite] Config/VLAN Add test: "
  877. $(PRINTF) "%s\n" "*** [tcprewrite] Config/VLAN Add test: " >> test.log
  878. $(TCPREWRITE) $(ENABLE_DEBUG) --load-opts config >> test.log 2>&1
  879. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  880. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  881. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  882. rewrite_skip:
  883. $(PRINTF) "%s" "[tcprewrite] Skip bcast test: "
  884. $(PRINTF) "%s\n" "*** [tcprewrite] Skip bcast test: " >> test.log
  885. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 \
  886. --skipbroadcast --skipl2broadcast --skip-soft-errors --seed 55 \
  887. --enet-dmac=00:12:13:14:15:16,00:22:33:44:55:66 \
  888. --enet-smac=00:22:33:44:55:66,00:12:13:14:15:16 -c $(srcdir)/test.auto_router >> test.log 2>&1
  889. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  890. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  891. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  892. rewrite_dltuser:
  893. $(PRINTF) "%s" "[tcprewrite] DLT User test: "
  894. $(PRINTF) "%s\n" "*** [tcprewrite] DLT User test: " >> test.log
  895. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 --dlt=user \
  896. --user-dlink=0x0f,0x00,0x08,0x00 --user-dlt=104 >> test.log 2>&1
  897. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  898. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  899. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  900. rewrite_dlthdlc:
  901. $(PRINTF) "%s" "[tcprewrite] DLT Cisco HDLC test: "
  902. $(PRINTF) "%s\n" "*** [tcprewrite] DLT Cisco HDLC test: " >> test.log
  903. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 --dlt=hdlc \
  904. --hdlc-control=0 --hdlc-address=0x0F >> test.log 2>&1
  905. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  906. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  907. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  908. rewrite_vlan802.1ad:
  909. $(PRINTF) "%s" "[tcprewrite] VLAN 802.1ad test: "
  910. $(PRINTF) "%s\n" "*** [tcprewrite] VLAN 802.1ad test: " >> test.log
  911. $(TCPREWRITE) -i $(TEST_PCAP) -o test.$@1 \
  912. --enet-vlan=add --enet-vlan-tag=42 --enet-vlan-cfi=1 \
  913. --enet-vlan-pri=2 --enet-vlan-proto=802.1ad
  914. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  915. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  916. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  917. rewrite_vlandel:
  918. $(PRINTF) "%s" "[tcprewrite] VLAN Delete test: "
  919. $(PRINTF) "%s\n" "*** [tcprewrite] VLAN Delete test: " >> test.log
  920. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(srcdir)/test.rewrite_config -o test.$@1 \
  921. --enet-vlan=del >> 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_efcs:
  926. $(PRINTF) "%s" "[tcprewrite] Remove EFCS: "
  927. $(PRINTF) "%s\n" "*** [tcprewrite] Remove EFCS: " >> test.log
  928. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 --efcs >> 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%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  932. rewrite_1ttl:
  933. $(PRINTF) "%s" "[tcprewrite] Force TTL: "
  934. $(PRINTF) "%s\n" "*** [tcprewrite] Force TTL: " >> test.log
  935. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 --ttl=58 >> 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\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  939. rewrite_2ttl:
  940. $(PRINTF) "%s" "[tcprewrite] Increase TTL: "
  941. $(PRINTF) "%s\n" "*** [tcprewrite] Increase TTL: " >> test.log
  942. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 --ttl=+58 >> 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_3ttl:
  947. $(PRINTF) "%s" "[tcprewrite] Reduce TTL: "
  948. $(PRINTF) "%s\n" "*** [tcprewrite] Reduce TTL: " >> test.log
  949. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 --ttl=-58 >> 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\t%s\n" "OK"; fi
  953. rewrite_1ttl-hdrfix:
  954. $(PRINTF) "%s" "[tcprewrite] Force TTL with header fix: "
  955. $(PRINTF) "%s\n" "*** [tcprewrite] Force TTL header fix: " >> test.log
  956. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 --ttl=59 --fixhdrlen >> 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%s\n" "FAILED"; else $(PRINTF) "\t%s\n" "OK"; fi
  960. rewrite_2ttl-hdrfix:
  961. $(PRINTF) "%s" "[tcprewrite] Increase TTL with header fix:"
  962. $(PRINTF) "%s\n" "*** [tcprewrite] Increase TTL with header fix: " >> test.log
  963. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 --ttl=+59 --fixhdrlen >> 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%s\n" "FAILED"; else $(PRINTF) "\t%s\n" "OK"; fi
  967. rewrite_3ttl-hdrfix:
  968. $(PRINTF) "%s" "[tcprewrite] Reduce TTL with header fix: "
  969. $(PRINTF) "%s\n" "*** [tcprewrite] Reduce TTL with header fix: " >> test.log
  970. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 --ttl=-59 --fixhdrlen >> 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%s\n" "FAILED"; else $(PRINTF) "\t%s\n" "OK"; fi
  974. rewrite_tos:
  975. $(PRINTF) "%s" "[tcprewrite] TOS test: "
  976. $(PRINTF) "%s\n" "*** [tcprewrite] TOS test: " >> test.log
  977. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 --tos=50 >> test.log 2>&1
  978. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  979. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  980. if [ $? ] ; then $(PRINTF) "\t\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t\t%s\n" "OK"; fi
  981. rewrite_mtutrunc:
  982. $(PRINTF) "%s" "[tcprewrite] MTU Truncate test: "
  983. $(PRINTF) "%s\n" "*** [tcprewrite] MTU Truncate test: " >> test.log
  984. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 --mtu-trunc --mtu=300 >> test.log 2>&1
  985. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  986. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  987. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  988. rewrite_l7fuzzing:
  989. $(PRINTF) "%s" "[tcprewrite] L7 fuzzing test: "
  990. $(PRINTF) "%s\n" "*** [tcprewrite] L7 fuzzing test: " >> test.log
  991. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 --fuzz-seed=42 --fuzz-factor=2 >> test.log 2>&1
  992. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  993. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  994. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  995. rewrite_fixcsum:
  996. $(PRINTF) "%s" "[tcprewrite] Fix checksum test: "
  997. $(PRINTF) "%s\n" "*** [tcprewrite] Fix checksum test: " >> test.log
  998. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 --fixcsum >> test.log 2>&1
  999. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  1000. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  1001. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  1002. rewrite_fixlen_pad:
  1003. $(PRINTF) "%s" "[tcprewrite] Fix length and pad test: "
  1004. $(PRINTF) "%s\n" "*** [tcprewrite] Fix length and pad test: " >> test.log
  1005. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 --fixlen=pad >> test.log 2>&1
  1006. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  1007. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  1008. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  1009. rewrite_fixlen_trunc:
  1010. $(PRINTF) "%s" "[tcprewrite] Fix length and truncate test: "
  1011. $(PRINTF) "%s\n" "*** [tcprewrite] Fix length and truncate test: " >> test.log
  1012. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 --fixlen=trunc >> test.log 2>&1
  1013. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  1014. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  1015. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t%s\n" "OK"; fi
  1016. rewrite_fixlen_del:
  1017. $(PRINTF) "%s" "[tcprewrite] Fix length and delete test: "
  1018. $(PRINTF) "%s\n" "*** [tcprewrite] Fix length and delete test: " >> test.log
  1019. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 --fixlen=del >> test.log 2>&1
  1020. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  1021. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  1022. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t%s\n" "OK"; fi
  1023. replay_pps:
  1024. $(PRINTF) "%s" "[tcpreplay] Packets/sec test: "
  1025. $(PRINTF) "%s\n" "*** [tcpreplay] Packets/sec test: " >> test.log
  1026. $(TCPREPLAY) $(ENABLE_DEBUG) -i $(nic1) -p 25 $(TEST_PCAP) >> test.log 2>&1
  1027. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  1028. replay_rate:
  1029. $(PRINTF) "%s" "[tcpreplay] Mbps test: "
  1030. $(PRINTF) "%s\n" "*** [tcpreplay] Mbps test: " >> test.log
  1031. $(TCPREPLAY) $(ENABLE_DEBUG) -i $(nic1) -M 25.0 $(TEST_PCAP) >> test.log 2>&1
  1032. if [ $? ] ; then $(PRINTF) "\t\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t\t%s\n" "OK"; fi
  1033. replay_multi:
  1034. $(PRINTF) "%s" "[tcpreplay] Multiplier test: "
  1035. $(PRINTF) "%s\n" "*** [tcpreplay] Multiplier test: " >> test.log
  1036. $(TCPREPLAY) $(ENABLE_DEBUG) -i $(nic1) -x 25.0 $(TEST_PCAP) >> test.log 2>&1
  1037. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  1038. replay_pps_multi:
  1039. $(PRINTF) "%s" "[tcpreplay] Packets/sec Multiplier test: "
  1040. $(PRINTF) "%s\n" "*** [tcpreplay] Packets/sec Multiplier test: " >> test.log
  1041. $(TCPREPLAY) $(ENABLE_DEBUG) -i $(nic1) -p 100 --pps-multi=5 $(TEST_PCAP) >> test.log 2>&1
  1042. if [ $? ] ; then $(PRINTF) "\t%s\n" "FAILED"; else $(PRINTF) "\t%s\n" "OK"; fi
  1043. replay_top:
  1044. $(PRINTF) "%s" "[tcpreplay] Topspeed test: "
  1045. $(PRINTF) "%s\n" "*** [tcpreplay] Topspeed test: " >> test.log
  1046. $(TCPREPLAY) $(ENABLE_DEBUG) -i $(nic1) -t $(TEST_PCAP) >> test.log 2>&1
  1047. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  1048. replay_precache:
  1049. $(PRINTF) "%s" "[tcpreplay] Precache test: "
  1050. $(PRINTF) "%s\n" "*** [tcpreplay] Precache test: " >> test.log
  1051. $(TCPREPLAY) $(ENABLE_DEBUG) -i $(nic1) --preload-pcap $(TEST_PCAP) >> test.log 2>&1
  1052. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  1053. datadump_mode:
  1054. $(PRINTF) "%s" "[tcpreplay] Data dump test: "
  1055. $(PRINTF) "%s\n" "*** [tcpreplay] Data dump mode test: " >> test.log
  1056. $(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
  1057. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  1058. replay_config:
  1059. $(PRINTF) "%s" "[tcpreplay] Config file/VLAN add test: "
  1060. $(PRINTF) "%s\n" "*** [tcpreplay] Config file/VLAN add test: " >> test.log
  1061. $(TCPREPLAY) $(ENABLE_DEBUG) --load-opts=config $(TEST_PCAP) >> test.log 2>&1
  1062. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  1063. replay_dualfile:
  1064. $(PRINTF) "%s" "[tcpreplay] Dual file test: "
  1065. $(PRINTF) "%s\n" "*** [tcpreplay] Dual file test: " >> test.log
  1066. $(TCPREPLAY) $(ENABLE_DEBUG) -i $(nic1) -I $(nic2) --dualfile $(TEST_PCAP) $(TEST_PCAP) >> test.log 2>&1
  1067. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  1068. replay_maxsleep:
  1069. $(PRINTF) "%s" "[tcpreplay] Maximum sleep test: "
  1070. $(PRINTF) "%s\n" "*** [tcpreplay] Maximum sleep test: " >> test.log
  1071. $(TCPREPLAY) $(ENABLE_DEBUG) -i $(nic1) --maxsleep=20 $(TEST_PCAP) $(TEST_PCAP) >> test.log 2>&1
  1072. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  1073. # the following write to a file
  1074. replay_include:
  1075. $(PRINTF) "%s" "[tcpreplay] Include rule test: "
  1076. $(PRINTF) "%s\n" "*** [tcpreplay] Include rule test: " >> test.log
  1077. $(TCPREPLAY) $(ENABLE_DEBUG) -w test.$@1 -t --include=7,11,20-23,174- $(TEST_PCAP) >> test.log 2>&1
  1078. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  1079. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  1080. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  1081. replay_exclude:
  1082. $(PRINTF) "%s" "[tcpreplay] Exclude rule test: "
  1083. $(PRINTF) "%s\n" "*** [tcpreplay] Exclude rule test: " >> test.log
  1084. $(TCPREPLAY) $(ENABLE_DEBUG) -w test.$@1 -t --exclude=23-,11-20,2,3 $(TEST_PCAP) >> test.log 2>&1
  1085. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  1086. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  1087. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  1088. replay_unique_ip:
  1089. $(PRINTF) "%s" "[tcpreplay] Unique IP test: "
  1090. $(PRINTF) "%s\n" "*** [tcpreplay] Unique IP test: " >> test.log
  1091. $(TCPREPLAY) $(ENABLE_DEBUG) -w test.$@1 -t --unique-ip --loop=2 $(TEST_PCAP) >> test.log 2>&1
  1092. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  1093. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  1094. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  1095. rewrite_portmap:
  1096. $(PRINTF) "%s" "[tcprewrite] Portmap test: "
  1097. $(PRINTF) "%s\n" "*** [tcprewrite] Portmap test: " >> test.log
  1098. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -r 80:8080 >> test.log 2>&1
  1099. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  1100. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  1101. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  1102. clean:
  1103. rm -f *1 test.log core* *~ primary.data secondary.data
  1104. distclean: clean
  1105. rm -f Makefile Makefile.in config
  1106. maintainer-clean: distclean
  1107. # Tell versions [3.59,3.63) of GNU make to not export all variables.
  1108. # Otherwise a system limit (for SysV at least) may be exceeded.
  1109. .NOEXPORT: