1
0

Makefile.in 45 KB

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