Makefile.in 49 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166
  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)/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_vlan802.1ad 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 test.rewrite_fixcsum \
  315. test.rewrite_fixlen_pad test.rewrite_fixlen_trunc test.rewrite_fixlen_del \
  316. test2.rewrite_seed test2.rewrite_portmap test2.rewrite_endpoint \
  317. test2.rewrite_pnat test2.rewrite_pad test2.rewrite_trunc \
  318. test2.rewrite_mac test2.rewrite_layer2 test2.rewrite_config \
  319. test2.rewrite_skip test2.rewrite_dltuser test2.rewrite_dlthdlc \
  320. test2.rewrite_vlan802.1ad test2.rewrite_vlandel test2.rewrite_efcs test2.rewrite_1ttl \
  321. test2.rewrite_mtutrunc test2.rewrite_enet_subsmac \
  322. test2.rewrite_2ttl test2.rewrite_3ttl test.rewrite_tos test2.rewrite_tos \
  323. test2.rewrite_enet_subsmac test2.rewrite_mac_seed \
  324. test2.rewrite_range_portmap test2.rewrite_mac_seed_keep \
  325. test2.rewrite_l7fuzzing test2.rewrite_sequence test2.rewrite_fixcsum \
  326. test2.rewrite_fixlen_pad test2.rewrite_fixlen_trunc test2.rewrite_fixlen_del
  327. @WORDS_BIGENDIAN_FALSE@STANDARD_REWRITE = standard_littleendian
  328. @WORDS_BIGENDIAN_TRUE@STANDARD_REWRITE = standard_bigendian
  329. @WORDS_BIGENDIAN_FALSE@REWRITE_WARN = "little"
  330. @WORDS_BIGENDIAN_TRUE@REWRITE_WARN = "big"
  331. all: all-am
  332. .SUFFIXES:
  333. $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
  334. @for dep in $?; do \
  335. case '$(am__configure_deps)' in \
  336. *$$dep*) \
  337. ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
  338. && { if test -f $@; then exit 0; else break; fi; }; \
  339. exit 1;; \
  340. esac; \
  341. done; \
  342. echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/Makefile'; \
  343. $(am__cd) $(top_srcdir) && \
  344. $(AUTOMAKE) --foreign test/Makefile
  345. Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
  346. @case '$?' in \
  347. *config.status*) \
  348. cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
  349. *) \
  350. echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
  351. cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
  352. esac;
  353. $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
  354. cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
  355. $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
  356. cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
  357. $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
  358. cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
  359. $(am__aclocal_m4_deps):
  360. config: $(top_builddir)/config.status $(srcdir)/config.in
  361. cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
  362. mostlyclean-libtool:
  363. -rm -f *.lo
  364. clean-libtool:
  365. -rm -rf .libs _libs
  366. tags TAGS:
  367. ctags CTAGS:
  368. cscope cscopelist:
  369. distdir: $(BUILT_SOURCES)
  370. $(MAKE) $(AM_MAKEFLAGS) distdir-am
  371. distdir-am: $(DISTFILES)
  372. @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
  373. topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
  374. list='$(DISTFILES)'; \
  375. dist_files=`for file in $$list; do echo $$file; done | \
  376. sed -e "s|^$$srcdirstrip/||;t" \
  377. -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
  378. case $$dist_files in \
  379. */*) $(MKDIR_P) `echo "$$dist_files" | \
  380. sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
  381. sort -u` ;; \
  382. esac; \
  383. for file in $$dist_files; do \
  384. if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
  385. if test -d $$d/$$file; then \
  386. dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
  387. if test -d "$(distdir)/$$file"; then \
  388. find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
  389. fi; \
  390. if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
  391. cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
  392. find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
  393. fi; \
  394. cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
  395. else \
  396. test -f "$(distdir)/$$file" \
  397. || cp -p $$d/$$file "$(distdir)/$$file" \
  398. || exit 1; \
  399. fi; \
  400. done
  401. check-am: all-am
  402. check: check-am
  403. all-am: Makefile
  404. installdirs:
  405. install: install-am
  406. install-exec: install-exec-am
  407. install-data: install-data-am
  408. uninstall: uninstall-am
  409. install-am: all-am
  410. @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
  411. installcheck: installcheck-am
  412. install-strip:
  413. if test -z '$(STRIP)'; then \
  414. $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
  415. install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
  416. install; \
  417. else \
  418. $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
  419. install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
  420. "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
  421. fi
  422. mostlyclean-generic:
  423. clean-generic:
  424. distclean-generic:
  425. -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
  426. -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
  427. maintainer-clean-generic:
  428. @echo "This command is intended for maintainers to use"
  429. @echo "it deletes files that may require special tools to rebuild."
  430. clean-am: clean-generic clean-libtool mostlyclean-am
  431. distclean-am: clean-am distclean-generic
  432. dvi: dvi-am
  433. dvi-am:
  434. html: html-am
  435. html-am:
  436. info: info-am
  437. info-am:
  438. install-data-am:
  439. install-dvi: install-dvi-am
  440. install-dvi-am:
  441. install-exec-am:
  442. install-html: install-html-am
  443. install-html-am:
  444. install-info: install-info-am
  445. install-info-am:
  446. install-man:
  447. install-pdf: install-pdf-am
  448. install-pdf-am:
  449. install-ps: install-ps-am
  450. install-ps-am:
  451. installcheck-am:
  452. maintainer-clean-am: distclean-am maintainer-clean-generic
  453. mostlyclean: mostlyclean-am
  454. mostlyclean-am: mostlyclean-generic mostlyclean-libtool
  455. pdf: pdf-am
  456. pdf-am:
  457. ps: ps-am
  458. ps-am:
  459. uninstall-am:
  460. .MAKE: install-am install-strip
  461. .PHONY: all all-am check check-am clean clean-generic clean-libtool \
  462. cscopelist-am ctags-am distclean distclean-generic \
  463. distclean-libtool distdir dvi dvi-am html html-am info info-am \
  464. install install-am install-data install-data-am install-dvi \
  465. install-dvi-am install-exec install-exec-am install-html \
  466. install-html-am install-info install-info-am install-man \
  467. install-pdf install-pdf-am install-ps install-ps-am \
  468. install-strip installcheck installcheck-am installdirs \
  469. maintainer-clean maintainer-clean-generic mostlyclean \
  470. mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
  471. tags-am uninstall uninstall-am
  472. .PRECIOUS: Makefile
  473. test: all
  474. all: clearlog check tcpprep tcpreplay tcprewrite
  475. clearlog:
  476. -rm test.log
  477. check:
  478. $(PRINTF) "%s\n" "NOTICE: Tests must be run as root"
  479. $(PRINTF) "%s\n" "Sending traffic on '$(nic1)' and '$(nic2)'"
  480. standard: standard_prep $(STANDARD_REWRITE)
  481. $(PRINTF) "Warning: only creating %s endian standard test files\n" $(REWRITE_WARN)
  482. standard_prep:
  483. $(TCPPREP) -i $(TEST_PCAP) -o test.auto_router -a router
  484. $(TCPPREP) -i $(TEST_PCAP) -o test.auto_bridge -a bridge
  485. $(TCPPREP) -i $(TEST_PCAP) -o test.auto_client -a client
  486. $(TCPPREP) -i $(TEST_PCAP) -o test.auto_server -a server
  487. $(TCPPREP) -i test.pcap -o test.auto_first -a first
  488. $(TCPPREP) --load-opts config -o test.prep_config
  489. $(TCPPREP) -i $(TEST_PCAP) -o test.port -p
  490. $(TCPPREP) -i $(TEST_PCAP) -o test.mac -e 00:1f:f3:3c:e1:13
  491. $(TCPPREP) -i $(TEST_PCAP) -o test.cidr -c '96.17.211.0/24'
  492. $(TCPPREP) -i $(TEST_PCAP) -o test.regex -r '96.17.211.*'
  493. $(TCPPREP) -i $(TEST_PCAP) -o test.comment -C "This is a comment" -p
  494. $(TCPPREP) -i $(TEST_PCAP) -o test.mac_reverse -e 00:1f:f3:3c:e1:13 --reverse
  495. $(TCPPREP) -i $(TEST_PCAP) -o test.cidr_reverse -c '96.17.211.0/24' --reverse
  496. $(TCPPREP) -i $(TEST_PCAP) -o test.regex_reverse -r '96.17.211.*' --reverse
  497. $(TCPPREP) -i $(TEST_PCAP) -o test.exclude_packets -c '96.17.211.0/24' --exclude 'P:61-65,88-91'
  498. $(TCPPREP) -i $(TEST_PCAP) -o test.include_packets -c '96.17.211.0/24' --include 'P:61-65,88-91'
  499. $(TCPPREP) -i $(TEST_PCAP) -o test.include_source -c '96.17.211.0/24' --include 'S:96.0.0.0/8'
  500. $(TCPPREP) -i $(TEST_PCAP) -o test.include_dest -c '96.17.211.0/24' --include 'D:96.0.0.0/8'
  501. standard_bigendian:
  502. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_seed -s 55
  503. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_tos --tos=50
  504. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_portmap -r 80:8080
  505. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_range_portmap -r 1-100:49148
  506. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_sequence --tcp-sequence 42
  507. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_endpoint \
  508. -e 10.10.0.1:10.10.0.2 -c test.auto_router
  509. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_pnat \
  510. -N 96.17.211.0/24:172.16.0.0/24
  511. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_pad -F pad
  512. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_trunc -F trunc
  513. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_mac \
  514. --enet-dmac=00:12:13:14:15:16,00:22:33:44:55:66 \
  515. --enet-smac=00:22:33:44:55:66,00:12:13:14:15:16 -c $(srcdir)/test.auto_router
  516. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_enet_subsmac \
  517. --enet-subsmac=00:1f:f3:3c:e1:13,00:22:33:44:55:66 \
  518. --enet-subsmac=f8:1e:df:e5:84:3a,00:66:55:44:33:22
  519. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_mac_seed --enet-mac-seed=42
  520. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_mac_seed_keep --enet-mac-seed=42 \
  521. --enet-mac-seed-keep-bytes=3
  522. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_layer2 \
  523. --dlt=user --user-dlink=00,50,da,5d,46,55,0,7,eb,30,a4,c3,08,0
  524. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_config --enet-vlan=add --enet-vlan-tag=45 \
  525. --enet-vlan-cfi=1 --enet-vlan-pri=5
  526. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_skip \
  527. --skipbroadcast --skipl2broadcast --skip-soft-errors --seed 55 \
  528. --enet-dmac=00:12:13:14:15:16,00:22:33:44:55:66 \
  529. --enet-smac=00:22:33:44:55:66,00:12:13:14:15:16 -c $(srcdir)/test.auto_router
  530. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_dltuser --dlt=user \
  531. --user-dlink=0x0f,0x00,0x08,0x00 --user-dlt=104
  532. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_dlthdlc --dlt=hdlc \
  533. --hdlc-control=0 --hdlc-address=0x0F
  534. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_vlan802.1ad \
  535. --enet-vlan=add --enet-vlan-tag=42 --enet-vlan-cfi=1 \
  536. --enet-vlan-pri=2 --enet-vlan-proto=802.1ad
  537. $(TCPREWRITE) -i $(srcdir)/test.rewrite_config -o test.rewrite_vlandel \
  538. --enet-vlan=del
  539. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_efcs --efcs
  540. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_1ttl --ttl=58
  541. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_2ttl --ttl=+58
  542. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_3ttl --ttl=-58
  543. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_mtutrunc --mtu-trunc --mtu=300
  544. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_l7fuzzing \
  545. --fuzz-seed=42 --fuzz-factor=2
  546. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_fixcsum --fixcsum
  547. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_fixlen_pad --fixlen=pad
  548. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_fixlen_trunc --fixlen=trunc
  549. $(TCPREWRITE) -i $(TEST_PCAP) -o test.rewrite_fixlen_del --fixlen=del
  550. standard_littleendian:
  551. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_seed -s 55
  552. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_tos --tos=50
  553. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_portmap -r 80:8080
  554. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_range_portmap -r 1-100:49148
  555. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_sequence --tcp-sequence 42
  556. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_endpoint \
  557. -e 10.10.0.1:10.10.0.2 -c test.auto_router
  558. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_pnat \
  559. -N 96.17.211.0/24:172.16.0.0/24
  560. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_pad -F pad
  561. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_trunc -F trunc
  562. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_mac \
  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_enet_subsmac \
  566. --enet-subsmac=00:1f:f3:3c:e1:13,00:22:33:44:55:66 \
  567. --enet-subsmac=f8:1e:df:e5:84:3a,00:66:55:44:33:22
  568. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_mac_seed --enet-mac-seed=42
  569. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_mac_seed_keep --enet-mac-seed=42 \
  570. --enet-mac-seed-keep-bytes=3
  571. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_layer2 \
  572. --dlt=user --user-dlink=00,50,da,5d,46,55,0,7,eb,30,a4,c3,08,0
  573. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_config --enet-vlan=add --enet-vlan-tag=45 \
  574. --enet-vlan-cfi=1 --enet-vlan-pri=5
  575. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_skip \
  576. --skipbroadcast --skipl2broadcast --skip-soft-errors --seed 55 \
  577. --enet-dmac=00:12:13:14:15:16,00:22:33:44:55:66 \
  578. --enet-smac=00:22:33:44:55:66,00:12:13:14:15:16 -c $(srcdir)/test.auto_router
  579. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_dltuser --dlt=user \
  580. --user-dlink=0x0f,0x00,0x08,0x00 --user-dlt=104
  581. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_dlthdlc --dlt=hdlc \
  582. --hdlc-control=0 --hdlc-address=0x0F
  583. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_vlan802.1ad \
  584. --enet-vlan=add --enet-vlan-tag=42 --enet-vlan-cfi=1 \
  585. --enet-vlan-pri=2 --enet-vlan-proto=802.1ad
  586. $(TCPREWRITE) -i $(srcdir)/test.rewrite_config -o test2.rewrite_vlandel \
  587. --enet-vlan=del
  588. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_efcs --efcs
  589. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_1ttl --ttl=58
  590. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_2ttl --ttl=+58
  591. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_3ttl --ttl=-58
  592. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_mtutrunc --mtu-trunc --mtu=300
  593. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_l7fuzzing \
  594. --fuzz-seed=42 --fuzz-factor=2
  595. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_fixcsum --fixcsum
  596. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_fixlen_pad --fixlen=pad
  597. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_fixlen_trunc --fixlen=trunc
  598. $(TCPREWRITE) -i $(TEST_PCAP) -o test2.rewrite_fixlen_del --fixlen=del
  599. tcpprep: auto_router auto_bridge auto_client auto_server auto_first cidr regex \
  600. port mac comment print_info print_comment prep_config \
  601. mac_reverse cidr_reverse regex_reverse exclude_packets \
  602. include_packets include_source include_dest
  603. tcprewrite: rewrite_portmap rewrite_range_portmap rewrite_endpoint \
  604. rewrite_pnat rewrite_trunc rewrite_pad rewrite_seed rewrite_mac \
  605. rewrite_layer2 rewrite_config rewrite_skip rewrite_dltuser rewrite_dlthdlc \
  606. rewrite_vlan802.1ad rewrite_vlandel rewrite_efcs rewrite_1ttl rewrite_2ttl rewrite_3ttl \
  607. rewrite_tos rewrite_mtutrunc rewrite_enet_subsmac rewrite_mac_seed \
  608. rewrite_mac_seed_keep rewrite_l7fuzzing rewrite_sequence rewrite_fixcsum \
  609. rewrite_fixlen_pad rewrite_fixlen_trunc rewrite_fixlen_del
  610. tcpreplay: replay_basic replay_cache replay_pps replay_rate replay_top \
  611. replay_config replay_multi replay_pps_multi replay_precache \
  612. replay_stats replay_dualfile replay_maxsleep
  613. prep_config:
  614. $(PRINTF) "%s" "[tcpprep] Config mode test: "
  615. $(PRINTF) "%s\n" "*** [tcpprep] Config mode test: " >> test.log
  616. $(TCPPREP) $(ENABLE_DEBUG) --load-opts=config -o test.$@1 >> test.log 2>&1
  617. diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  618. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  619. auto_router:
  620. $(PRINTF) "%s" "[tcpprep] Auto/Router mode test: "
  621. $(PRINTF) "%s\n" "*** [tcpprep] Auto/Router mode test: " >> test.log
  622. $(TCPPREP) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -a router >> test.log 2>&1
  623. diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  624. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  625. auto_bridge:
  626. $(PRINTF) "%s" "[tcpprep] Auto/Bridge mode test: "
  627. $(PRINTF) "%s\n" "*** [tcpprep] Auto/Bridge mode test: " >> test.log
  628. $(TCPPREP) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -a bridge >> test.log 2>&1
  629. diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  630. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  631. auto_client:
  632. $(PRINTF) "%s" "[tcpprep] Auto/Client mode test: "
  633. $(PRINTF) "%s\n" "*** [tcpprep] Auto/Client mode test: " >> test.log
  634. $(TCPPREP) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -a client >> test.log 2>&1
  635. diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  636. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  637. auto_server:
  638. $(PRINTF) "%s" "[tcpprep] Auto/Server mode test: "
  639. $(PRINTF) "%s\n" "*** [tcpprep] Auto/Server mode test: " >> test.log
  640. $(TCPPREP) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -a server >> test.log 2>&1
  641. diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  642. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  643. auto_first:
  644. $(PRINTF) "%s" "[tcpprep] Auto/First mode test: "
  645. $(PRINTF) "%s\n" "*** [tcpprep] Auto/First mode test: " >> test.log
  646. $(TCPPREP) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -a first >> test.log 2>&1
  647. diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  648. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  649. regex:
  650. $(PRINTF) "%s" "[tcpprep] Regex mode test: "
  651. $(PRINTF) "%s\n" "*** [tcpprep] Regex mode test: " >> test.log
  652. $(TCPPREP) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -r '96.17.211.*' >> test.log 2>&1
  653. diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  654. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  655. cidr:
  656. $(PRINTF) "%s" "[tcpprep] CIDR mode test: "
  657. $(PRINTF) "%s\n" "*** [tcpprep] CIDR mode test: " >> test.log
  658. $(TCPPREP) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -c '96.17.211.0/24' >> test.log 2>&1
  659. diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  660. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  661. port:
  662. $(PRINTF) "%s" "[tcpprep] Port mode test: "
  663. $(PRINTF) "%s\n" "*** [tcpprep] Port mode test: " >> test.log
  664. $(TCPPREP) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -p >> test.log 2>&1
  665. diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  666. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  667. mac:
  668. $(PRINTF) "%s" "[tcpprep] MAC mode test: "
  669. $(PRINTF) "%s\n" "*** [tcpprep] MAC mode test: " >> test.log
  670. $(TCPPREP) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -e 00:1f:f3:3c:e1:13 >> test.log 2>&1
  671. diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  672. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  673. comment:
  674. $(PRINTF) "%s" "[tcpprep] Comment mode test: "
  675. $(PRINTF) "%s\n" "*** [tcpprep] Comment mode test: " >> test.log
  676. $(TCPPREP) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -C "This is a comment" -p >> test.log 2>&1
  677. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  678. print_comment:
  679. $(PRINTF) "%s" "[tcpprep] Print comment mode test: "
  680. $(PRINTF) "%s\n" "*** [tcpprep] Print comment mode test: " >> test.log
  681. $(TCPPREP) $(ENABLE_DEBUG) -P $(srcdir)/test.comment >$(srcdir)/test.$@1 >> test.log 2>&1
  682. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  683. print_info:
  684. $(PRINTF) "%s" "[tcpprep] Print info mode test: "
  685. $(PRINTF) "%s\n" "*** [tcpprep] Print info mode test: " >> test.log
  686. $(TCPPREP) $(ENABLE_DEBUG) -I $(srcdir)/test.comment >$(srcdir)/test.$@1 >> test.log 2>&1
  687. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  688. regex_reverse:
  689. $(PRINTF) "%s" "[tcpprep] Regex reverse mode test: "
  690. $(PRINTF) "%s\n" "*** [tcpprep] Regex reverse mode test: " >> test.log
  691. $(TCPPREP) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -r '96.17.211.*' --reverse >> test.log 2>&1
  692. diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  693. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  694. cidr_reverse:
  695. $(PRINTF) "%s" "[tcpprep] CIDR reverse mode test: "
  696. $(PRINTF) "%s\n" "*** [tcpprep] CIDR reverse mode test: " >> test.log
  697. $(TCPPREP) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -c '96.17.211.0/24' --reverse >> test.log 2>&1
  698. diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  699. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  700. mac_reverse:
  701. $(PRINTF) "%s" "[tcpprep] MAC reverse mode test: "
  702. $(PRINTF) "%s\n" "*** [tcpprep] MAC reverse mode test: " >> test.log
  703. $(TCPPREP) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -e 00:1f:f3:3c:e1:13 --reverse >> test.log 2>&1
  704. diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  705. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  706. exclude_packets:
  707. $(PRINTF) "%s" "[tcpprep] exclude packets test: "
  708. $(PRINTF) "%s\n" "*** [tcpprep] exclude packets test: " >> test.log
  709. $(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
  710. diff test.$@ test.$@1 >> test.log 2>&1
  711. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  712. include_packets:
  713. $(PRINTF) "%s" "[tcpprep] include packets test: "
  714. $(PRINTF) "%s\n" "*** [tcpprep] include packets test: " >> test.log
  715. $(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
  716. diff test.$@ test.$@1 >> test.log 2>&1
  717. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  718. include_source:
  719. $(PRINTF) "%s" "[tcpprep] include source test: "
  720. $(PRINTF) "%s\n" "*** [tcpprep] include source test: " >> test.log
  721. $(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
  722. diff test.$@ test.$@1 >> test.log 2>&1
  723. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  724. include_dest:
  725. $(PRINTF) "%s" "[tcpprep] include destination test: "
  726. $(PRINTF) "%s\n" "*** [tcpprep] include destination test: " >> test.log
  727. $(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
  728. diff test.$@ test.$@1 >> test.log 2>&1
  729. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  730. replay_basic:
  731. $(PRINTF) "%s" "[tcpreplay] Basic test: "
  732. $(PRINTF) "%s\n" "*** [tcpreplay] Basic test: " >> test.log
  733. $(TCPREPLAY) $(ENABLE_DEBUG) -i $(nic1) -t $(TEST_PCAP) >> test.log 2>&1
  734. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  735. replay_cache:
  736. $(PRINTF) "%s" "[tcpreplay] Cache test: "
  737. $(PRINTF) "%s\n" "*** [tcpreplay] Cache test: " >> test.log
  738. $(TCPREPLAY) $(ENABLE_DEBUG) -c $(srcdir)/test.cidr -i $(nic1) -I $(nic2) -t $(TEST_PCAP) >> test.log 2>&1
  739. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  740. replay_accurate:
  741. $(PRINTF) "%s" "[tcpreplay] Accurate test: "
  742. $(PRINTF) "%s\n" "*** [tcpreplay] Accurate test: " >> test.log
  743. $(TCPREPLAY) $(ENABLE_DEBUG) -a -i $(nic1) $(TEST_PCAP) >> test.log 2>&1
  744. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  745. replay_stats:
  746. $(PRINTF) "%s" "[tcpreplay] Statistics test: "
  747. $(PRINTF) "%s\n" "*** [tcpreplay] Statistics test: " >> test.log
  748. $(TCPREPLAY) $(ENABLE_DEBUG) --stats=1 -i $(nic1) $(TEST_PCAP) >> test.log 2>&1
  749. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  750. rewrite_portmap:
  751. $(PRINTF) "%s" "[tcprewrite] Portmap test: "
  752. $(PRINTF) "%s\n" "*** [tcprewrite] Portmap test: " >> test.log
  753. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -r 80:8080 >> 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_range_portmap:
  758. $(PRINTF) "%s" "[tcprewrite] Portmap range test: "
  759. $(PRINTF) "%s\n" "*** [tcprewrite] Portmap range test: " >> test.log
  760. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -r 1-100:49148 >> test.log 2>&1
  761. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  762. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  763. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  764. rewrite_sequence:
  765. $(PRINTF) "%s" "[tcprewrite] TCP sequence test: "
  766. $(PRINTF) "%s\n" "*** [tcprewrite] TCP sequence test: " >> test.log
  767. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 --tcp-sequence 42 >> test.log 2>&1
  768. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  769. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  770. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  771. rewrite_endpoint:
  772. $(PRINTF) "%s" "[tcprewrite] Endpoint test: "
  773. $(PRINTF) "%s\n" "*** [tcprewrite] Endpoint test: " >> test.log
  774. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -e 10.10.0.1:10.10.0.2 \
  775. -c $(srcdir)/test.auto_router >> test.log 2>&1
  776. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  777. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  778. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  779. rewrite_pnat:
  780. $(PRINTF) "%s" "[tcprewrite] Pseudo NAT test: "
  781. $(PRINTF) "%s\n" "*** [tcprewrite] Pseudo NAT test: " >> test.log
  782. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 \
  783. -N 96.17.211.0/24:172.16.0.0/24 >> test.log 2>&1
  784. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  785. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  786. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  787. rewrite_mac:
  788. $(PRINTF) "%s" "[tcprewrite] Src/Dst MAC test: "
  789. $(PRINTF) "%s\n" "*** [tcprewrite] Src/Dst MAC test: " >> test.log
  790. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 \
  791. --enet-dmac=00:12:13:14:15:16,00:22:33:44:55:66 \
  792. --enet-smac=00:22:33:44:55:66,00:12:13:14:15:16 -c $(srcdir)/test.auto_router >> test.log 2>&1
  793. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  794. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  795. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  796. rewrite_enet_subsmac:
  797. $(PRINTF) "%s" "[tcprewrite] Substitute Src/Dst MAC test: "
  798. $(PRINTF) "%s\n" "*** [tcprewrite] Substitute Src/Dst MAC test: " >> test.log
  799. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 \
  800. --enet-subsmac=00:1f:f3:3c:e1:13,00:22:33:44:55:66 \
  801. --enet-subsmac=f8:1e:df:e5:84:3a,00:66:55:44:33:22 >> test.log 2>&1
  802. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  803. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  804. if [ $? ] ; then $(PRINTF) "\t%s\n" "FAILED"; else $(PRINTF) "\t%s\n" "OK"; fi
  805. rewrite_mac_seed:
  806. $(PRINTF) "%s" "[tcprewrite] Seeded MAC test: "
  807. $(PRINTF) "%s\n" "*** [tcprewrite] Seeded MAC test: " >> test.log
  808. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 \
  809. --enet-mac-seed=42 >> 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%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  813. rewrite_mac_seed_keep:
  814. $(PRINTF) "%s" "[tcprewrite] Seeded Keep MAC test: "
  815. $(PRINTF) "%s\n" "*** [tcprewrite] Seeded Keep MAC test: " >> test.log
  816. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 \
  817. --enet-mac-seed=42 --enet-mac-seed-keep-bytes=3 >> 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%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  821. rewrite_trunc:
  822. $(PRINTF) "%s" "[tcprewrite] Truncate test: "
  823. $(PRINTF) "%s\n" "*** [tcprewrite] Truncate test: " >> test.log
  824. $(TCPREWRITE) $(ENABLE_DEBUG) -F trunc -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_pad:
  829. $(PRINTF) "%s" "[tcprewrite] Pad test: "
  830. $(PRINTF) "%s\n" "*** [tcprewrite] Pad test: " >> test.log
  831. $(TCPREWRITE) $(ENABLE_DEBUG) -F pad -i $(TEST_PCAP) -o test.$@1 >> 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\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t\t%s\n" "OK"; fi
  835. rewrite_seed:
  836. $(PRINTF) "%s" "[tcprewrite] Seed IP test: "
  837. $(PRINTF) "%s\n" "*** [tcprewrite] Seed IP test: " >> test.log
  838. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 -s 55 >> test.log 2>&1
  839. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  840. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  841. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  842. rewrite_layer2:
  843. $(PRINTF) "%s" "[tcprewrite] Layer2 test: "
  844. $(PRINTF) "%s\n" "*** [tcprewrite] Layer2 test: " >> test.log
  845. $(TCPREWRITE) $(ENABLE_DEBUG) --dlt=user --user-dlink=00,50,da,5d,46,55,0,7,eb,30,a4,c3,08,0 \
  846. -i $(TEST_PCAP) -o test.$@1 >> test.log 2>&1
  847. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  848. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  849. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  850. rewrite_config:
  851. $(PRINTF) "%s" "[tcprewrite] Config/VLAN Add test: "
  852. $(PRINTF) "%s\n" "*** [tcprewrite] Config/VLAN Add test: " >> test.log
  853. $(TCPREWRITE) $(ENABLE_DEBUG) --load-opts config >> test.log 2>&1
  854. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  855. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  856. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  857. rewrite_skip:
  858. $(PRINTF) "%s" "[tcprewrite] Skip bcast test: "
  859. $(PRINTF) "%s\n" "*** [tcprewrite] Skip bcast test: " >> test.log
  860. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 \
  861. --skipbroadcast --skipl2broadcast --skip-soft-errors --seed 55 \
  862. --enet-dmac=00:12:13:14:15:16,00:22:33:44:55:66 \
  863. --enet-smac=00:22:33:44:55:66,00:12:13:14:15:16 -c $(srcdir)/test.auto_router >> test.log 2>&1
  864. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  865. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  866. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  867. rewrite_dltuser:
  868. $(PRINTF) "%s" "[tcprewrite] DLT User test: "
  869. $(PRINTF) "%s\n" "*** [tcprewrite] DLT User test: " >> test.log
  870. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 --dlt=user \
  871. --user-dlink=0x0f,0x00,0x08,0x00 --user-dlt=104 >> 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_dlthdlc:
  876. $(PRINTF) "%s" "[tcprewrite] DLT Cisco HDLC test: "
  877. $(PRINTF) "%s\n" "*** [tcprewrite] DLT Cisco HDLC test: " >> test.log
  878. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 --dlt=hdlc \
  879. --hdlc-control=0 --hdlc-address=0x0F >> 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%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  883. rewrite_vlan802.1ad:
  884. $(PRINTF) "%s" "[tcprewrite] VLAN 802.1ad test: "
  885. $(PRINTF) "%s\n" "*** [tcprewrite] VLAN 802.1ad test: " >> test.log
  886. $(TCPREWRITE) -i $(TEST_PCAP) -o test.$@1 \
  887. --enet-vlan=add --enet-vlan-tag=42 --enet-vlan-cfi=1 \
  888. --enet-vlan-pri=2 --enet-vlan-proto=802.1ad
  889. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  890. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  891. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  892. rewrite_vlandel:
  893. $(PRINTF) "%s" "[tcprewrite] VLAN Delete test: "
  894. $(PRINTF) "%s\n" "*** [tcprewrite] VLAN Delete test: " >> test.log
  895. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(srcdir)/test.rewrite_config -o test.$@1 \
  896. --enet-vlan=del >> test.log 2>&1
  897. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  898. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  899. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  900. rewrite_efcs:
  901. $(PRINTF) "%s" "[tcprewrite] Remove EFCS: "
  902. $(PRINTF) "%s\n" "*** [tcprewrite] Remove EFCS: " >> test.log
  903. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 --efcs >> test.log 2>&1
  904. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  905. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  906. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  907. rewrite_1ttl:
  908. $(PRINTF) "%s" "[tcprewrite] Force TTL: "
  909. $(PRINTF) "%s\n" "*** [tcprewrite] Force TTL: " >> test.log
  910. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 --ttl=58 >> test.log 2>&1
  911. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  912. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  913. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  914. rewrite_2ttl:
  915. $(PRINTF) "%s" "[tcprewrite] Increase TTL: "
  916. $(PRINTF) "%s\n" "*** [tcprewrite] Increase TTL: " >> test.log
  917. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 --ttl=+58 >> test.log 2>&1
  918. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  919. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  920. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  921. rewrite_3ttl:
  922. $(PRINTF) "%s" "[tcprewrite] Reduce TTL: "
  923. $(PRINTF) "%s\n" "*** [tcprewrite] Reduce TTL: " >> test.log
  924. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 --ttl=-58 >> test.log 2>&1
  925. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  926. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  927. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  928. rewrite_tos:
  929. $(PRINTF) "%s" "[tcprewrite] TOS test: "
  930. $(PRINTF) "%s\n" "*** [tcprewrite] TOS test: " >> test.log
  931. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 --tos=50 >> test.log 2>&1
  932. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  933. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  934. if [ $? ] ; then $(PRINTF) "\t\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t\t%s\n" "OK"; fi
  935. rewrite_mtutrunc:
  936. $(PRINTF) "%s" "[tcprewrite] MTU Truncate test: "
  937. $(PRINTF) "%s\n" "*** [tcprewrite] MTU Truncate test: " >> test.log
  938. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 --mtu-trunc --mtu=300 >> test.log 2>&1
  939. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  940. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  941. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  942. rewrite_l7fuzzing:
  943. $(PRINTF) "%s" "[tcprewrite] L7 fuzzing test: "
  944. $(PRINTF) "%s\n" "*** [tcprewrite] L7 fuzzing test: " >> test.log
  945. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 --fuzz-seed=42 --fuzz-factor=2 >> test.log 2>&1
  946. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  947. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  948. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  949. rewrite_fixcsum:
  950. $(PRINTF) "%s" "[tcprewrite] Fix checksum test: "
  951. $(PRINTF) "%s\n" "*** [tcprewrite] Fix checksum test: " >> test.log
  952. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 --fixcsum >> test.log 2>&1
  953. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  954. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  955. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  956. rewrite_fixlen_pad:
  957. $(PRINTF) "%s" "[tcprewrite] Fix length and pad test: "
  958. $(PRINTF) "%s\n" "*** [tcprewrite] Fix length and pad test: " >> test.log
  959. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 --fixlen=pad >> test.log 2>&1
  960. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  961. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  962. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  963. rewrite_fixlen_trunc:
  964. $(PRINTF) "%s" "[tcprewrite] Fix length and truncate test: "
  965. $(PRINTF) "%s\n" "*** [tcprewrite] Fix length and truncate test: " >> test.log
  966. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 --fixlen=trunc >> test.log 2>&1
  967. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  968. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  969. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t%s\n" "OK"; fi
  970. rewrite_fixlen_del:
  971. $(PRINTF) "%s" "[tcprewrite] Fix length and delete test: "
  972. $(PRINTF) "%s\n" "*** [tcprewrite] Fix length and delete test: " >> test.log
  973. $(TCPREWRITE) $(ENABLE_DEBUG) -i $(TEST_PCAP) -o test.$@1 --fixlen=del >> test.log 2>&1
  974. @WORDS_BIGENDIAN_TRUE@ diff $(srcdir)/test.$@ test.$@1 >> test.log 2>&1
  975. @WORDS_BIGENDIAN_FALSE@ diff $(srcdir)/test2.$@ test.$@1 >> test.log 2>&1
  976. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t%s\n" "OK"; fi
  977. replay_pps:
  978. $(PRINTF) "%s" "[tcpreplay] Packets/sec test: "
  979. $(PRINTF) "%s\n" "*** [tcpreplay] Packets/sec test: " >> test.log
  980. $(TCPREPLAY) $(ENABLE_DEBUG) -i $(nic1) -p 25 $(TEST_PCAP) >> test.log 2>&1
  981. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  982. replay_rate:
  983. $(PRINTF) "%s" "[tcpreplay] Mbps test: "
  984. $(PRINTF) "%s\n" "*** [tcpreplay] Mbps test: " >> test.log
  985. $(TCPREPLAY) $(ENABLE_DEBUG) -i $(nic1) -M 25.0 $(TEST_PCAP) >> test.log 2>&1
  986. if [ $? ] ; then $(PRINTF) "\t\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t\t%s\n" "OK"; fi
  987. replay_multi:
  988. $(PRINTF) "%s" "[tcpreplay] Multiplier test: "
  989. $(PRINTF) "%s\n" "*** [tcpreplay] Multiplier test: " >> test.log
  990. $(TCPREPLAY) $(ENABLE_DEBUG) -i $(nic1) -x 25.0 $(TEST_PCAP) >> test.log 2>&1
  991. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  992. replay_pps_multi:
  993. $(PRINTF) "%s" "[tcpreplay] Packets/sec Multiplier test: "
  994. $(PRINTF) "%s\n" "*** [tcpreplay] Packets/sec Multiplier test: " >> test.log
  995. $(TCPREPLAY) $(ENABLE_DEBUG) -i $(nic1) -p 100 --pps-multi=5 $(TEST_PCAP) >> test.log 2>&1
  996. if [ $? ] ; then $(PRINTF) "\t%s\n" "FAILED"; else $(PRINTF) "\t%s\n" "OK"; fi
  997. replay_top:
  998. $(PRINTF) "%s" "[tcpreplay] Topspeed test: "
  999. $(PRINTF) "%s\n" "*** [tcpreplay] Topspeed test: " >> test.log
  1000. $(TCPREPLAY) $(ENABLE_DEBUG) -i $(nic1) -t $(TEST_PCAP) >> test.log 2>&1
  1001. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  1002. replay_precache:
  1003. $(PRINTF) "%s" "[tcpreplay] Precache test: "
  1004. $(PRINTF) "%s\n" "*** [tcpreplay] Precache test: " >> test.log
  1005. $(TCPREPLAY) $(ENABLE_DEBUG) -i $(nic1) --preload-pcap $(TEST_PCAP) >> test.log 2>&1
  1006. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  1007. datadump_mode:
  1008. $(PRINTF) "%s" "[tcpreplay] Data dump test: "
  1009. $(PRINTF) "%s\n" "*** [tcpreplay] Data dump mode test: " >> test.log
  1010. $(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
  1011. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  1012. replay_config:
  1013. $(PRINTF) "%s" "[tcpreplay] Config file/VLAN add test: "
  1014. $(PRINTF) "%s\n" "*** [tcpreplay] Config file/VLAN add test: " >> test.log
  1015. $(TCPREPLAY) $(ENABLE_DEBUG) --load-opts=config $(TEST_PCAP) >> test.log 2>&1
  1016. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  1017. replay_dualfile:
  1018. $(PRINTF) "%s" "[tcpreplay] Dual file test: "
  1019. $(PRINTF) "%s\n" "*** [tcpreplay] Dual file test: " >> test.log
  1020. $(TCPREPLAY) $(ENABLE_DEBUG) -i $(nic1) -I $(nic2) --dualfile $(TEST_PCAP) $(TEST_PCAP) >> test.log 2>&1
  1021. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  1022. replay_maxsleep:
  1023. $(PRINTF) "%s" "[tcpreplay] Maximum sleep test: "
  1024. $(PRINTF) "%s\n" "*** [tcpreplay] Maximum sleep test: " >> test.log
  1025. $(TCPREPLAY) $(ENABLE_DEBUG) -i $(nic1) --maxsleep=20 $(TEST_PCAP) $(TEST_PCAP) >> test.log 2>&1
  1026. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  1027. clean:
  1028. rm -f *1 test.log core* *~ primary.data secondary.data
  1029. distclean: clean
  1030. rm -f Makefile Makefile.in config
  1031. maintainer-clean: distclean
  1032. # Tell versions [3.59,3.63) of GNU make to not export all variables.
  1033. # Otherwise a system limit (for SysV at least) may be exceeded.
  1034. .NOEXPORT: