Makefile.in 45 KB

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