1
0

Makefile.in 45 KB

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