Makefile.in 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797
  1. # Makefile.in generated by automake 1.10.1 from Makefile.am.
  2. # @configure_input@
  3. # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
  4. # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
  5. # This Makefile.in is free software; the Free Software Foundation
  6. # gives unlimited permission to copy and/or distribute it,
  7. # with or without modifications, as long as this notice is preserved.
  8. # This program is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
  10. # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  11. # PARTICULAR PURPOSE.
  12. @SET_MAKE@
  13. VPATH = @srcdir@
  14. pkgdatadir = $(datadir)/@PACKAGE@
  15. pkglibdir = $(libdir)/@PACKAGE@
  16. pkgincludedir = $(includedir)/@PACKAGE@
  17. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
  18. install_sh_DATA = $(install_sh) -c -m 644
  19. install_sh_PROGRAM = $(install_sh) -c
  20. install_sh_SCRIPT = $(install_sh) -c
  21. INSTALL_HEADER = $(INSTALL_DATA)
  22. transform = $(program_transform_name)
  23. NORMAL_INSTALL = :
  24. PRE_INSTALL = :
  25. POST_INSTALL = :
  26. NORMAL_UNINSTALL = :
  27. PRE_UNINSTALL = :
  28. POST_UNINSTALL = :
  29. build_triplet = @build@
  30. host_triplet = @host@
  31. target_triplet = @target@
  32. subdir = test
  33. DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
  34. $(srcdir)/config.in
  35. ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
  36. am__aclocal_m4_deps = $(top_srcdir)/configure.ac
  37. am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
  38. $(ACLOCAL_M4)
  39. mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
  40. CONFIG_HEADER = $(top_builddir)/src/config.h
  41. CONFIG_CLEAN_FILES = config
  42. SOURCES =
  43. DIST_SOURCES =
  44. DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
  45. ACLOCAL = @ACLOCAL@
  46. AMTAR = @AMTAR@
  47. AR = @AR@
  48. AUTOCONF = @AUTOCONF@
  49. AUTOGEN = @AUTOGEN@
  50. AUTOHEADER = @AUTOHEADER@
  51. AUTOMAKE = @AUTOMAKE@
  52. AWK = @AWK@
  53. CC = @CC@
  54. CCDEPMODE = @CCDEPMODE@
  55. CFLAGS = @CFLAGS@
  56. CPP = @CPP@
  57. CPPFLAGS = @CPPFLAGS@
  58. CUT = @CUT@
  59. CXX = @CXX@
  60. CXXCPP = @CXXCPP@
  61. CXXDEPMODE = @CXXDEPMODE@
  62. CXXFLAGS = @CXXFLAGS@
  63. CYGPATH_W = @CYGPATH_W@
  64. DEFS = @DEFS@
  65. DEPDIR = @DEPDIR@
  66. DMALLOC_LIB = @DMALLOC_LIB@
  67. DSYMUTIL = @DSYMUTIL@
  68. ECHO = @ECHO@
  69. ECHO_C = @ECHO_C@
  70. ECHO_N = @ECHO_N@
  71. ECHO_T = @ECHO_T@
  72. EGREP = @EGREP@
  73. EXEEXT = @EXEEXT@
  74. F77 = @F77@
  75. FFLAGS = @FFLAGS@
  76. GREP = @GREP@
  77. INSTALL = @INSTALL@
  78. INSTALL_DATA = @INSTALL_DATA@
  79. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  80. INSTALL_SCRIPT = @INSTALL_SCRIPT@
  81. INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
  82. LDFLAGS = @LDFLAGS@
  83. LDNETINC = @LDNETINC@
  84. LDNETLIB = @LDNETLIB@
  85. LIBOBJS = @LIBOBJS@
  86. LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@
  87. LIBOPTS_DIR = @LIBOPTS_DIR@
  88. LIBOPTS_LDADD = @LIBOPTS_LDADD@
  89. LIBS = @LIBS@
  90. LIBTOOL = @LIBTOOL@
  91. LNAVLIB = @LNAVLIB@
  92. LNAV_CFLAGS = @LNAV_CFLAGS@
  93. LNETINC = @LNETINC@
  94. LNETLIB = @LNETLIB@
  95. LN_S = @LN_S@
  96. LPCAPINC = @LPCAPINC@
  97. LPCAPLIB = @LPCAPLIB@
  98. LTLIBOBJS = @LTLIBOBJS@
  99. MAINT = @MAINT@
  100. MAKEINFO = @MAKEINFO@
  101. MKDIR_P = @MKDIR_P@
  102. NMEDIT = @NMEDIT@
  103. OBJEXT = @OBJEXT@
  104. PACKAGE = @PACKAGE@
  105. PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
  106. PACKAGE_NAME = @PACKAGE_NAME@
  107. PACKAGE_STRING = @PACKAGE_STRING@
  108. PACKAGE_TARNAME = @PACKAGE_TARNAME@
  109. PACKAGE_VERSION = @PACKAGE_VERSION@
  110. PATH_SEPARATOR = @PATH_SEPARATOR@
  111. PCAP_BPF_H_FILE = @PCAP_BPF_H_FILE@
  112. PRINTF = @PRINTF@
  113. RANLIB = @RANLIB@
  114. SED = @SED@
  115. SET_MAKE = @SET_MAKE@
  116. SHELL = @SHELL@
  117. STRIP = @STRIP@
  118. TCPREPLAY_RELEASE = @TCPREPLAY_RELEASE@
  119. TCPREPLAY_VERSION = @TCPREPLAY_VERSION@
  120. VERSION = @VERSION@
  121. abs_builddir = @abs_builddir@
  122. abs_srcdir = @abs_srcdir@
  123. abs_top_builddir = @abs_top_builddir@
  124. abs_top_srcdir = @abs_top_srcdir@
  125. ac_ct_CC = @ac_ct_CC@
  126. ac_ct_CXX = @ac_ct_CXX@
  127. ac_ct_F77 = @ac_ct_F77@
  128. am__include = @am__include@
  129. am__leading_dot = @am__leading_dot@
  130. am__quote = @am__quote@
  131. am__tar = @am__tar@
  132. am__untar = @am__untar@
  133. bindir = @bindir@
  134. build = @build@
  135. build_alias = @build_alias@
  136. build_cpu = @build_cpu@
  137. build_os = @build_os@
  138. build_vendor = @build_vendor@
  139. builddir = @builddir@
  140. datadir = @datadir@
  141. datarootdir = @datarootdir@
  142. debug_flag = @debug_flag@
  143. docdir = @docdir@
  144. dvidir = @dvidir@
  145. exec_prefix = @exec_prefix@
  146. host = @host@
  147. host_alias = @host_alias@
  148. host_cpu = @host_cpu@
  149. host_os = @host_os@
  150. host_vendor = @host_vendor@
  151. htmldir = @htmldir@
  152. includedir = @includedir@
  153. infodir = @infodir@
  154. install_sh = @install_sh@
  155. libdir = @libdir@
  156. libexecdir = @libexecdir@
  157. localedir = @localedir@
  158. localstatedir = @localstatedir@
  159. mandir = @mandir@
  160. mkdir_p = @mkdir_p@
  161. nic1 = @nic1@
  162. nic2 = @nic2@
  163. oldincludedir = @oldincludedir@
  164. pcncfg = @pcncfg@
  165. pdfdir = @pdfdir@
  166. prefix = @prefix@
  167. program_transform_name = @program_transform_name@
  168. psdir = @psdir@
  169. sbindir = @sbindir@
  170. sharedstatedir = @sharedstatedir@
  171. srcdir = @srcdir@
  172. sysconfdir = @sysconfdir@
  173. target = @target@
  174. target_alias = @target_alias@
  175. target_cpu = @target_cpu@
  176. target_os = @target_os@
  177. target_vendor = @target_vendor@
  178. tcpdump_path = @tcpdump_path@
  179. top_build_prefix = @top_build_prefix@
  180. top_builddir = @top_builddir@
  181. top_srcdir = @top_srcdir@
  182. # $Id$
  183. MAKEFLAGS = -s -k
  184. HOST = @host@
  185. TARGET = @target@
  186. BUILD = @build@
  187. ENABLE_DEBUG = @debug_flag@
  188. TCPPREP = ../src/tcpprep --no-arg-comment
  189. TCPREPLAY = ../src/tcpreplay
  190. TCPREWRITE = ../src/tcprewrite
  191. TCPBRIDGE = ../src/tcpbridge
  192. EXTRA_DIST = test.pcap test.auto_bridge test.auto_client test.auto_router \
  193. test.auto_server test.auto_first test.cidr test.comment test.port test.mac \
  194. test.cidr_reverse test.mac_reverse test.regex_reverse \
  195. test.prep_config test.primary test.regex test.secondary \
  196. test.rewrite_seed test.rewrite_portmap test.rewrite_endpoint \
  197. test.rewrite_pnat test.rewrite_pad test.rewrite_trunc \
  198. test.rewrite_mac test.rewrite_layer2 test.rewrite_config \
  199. test.rewrite_skip test.rewrite_dltuser test.rewrite_dlthdlc \
  200. test.rewrite_vlandel test.rewrite_efcs test.rewrite_1ttl \
  201. test.rewrite_2ttl test.rewrite_3ttl \
  202. test2.rewrite_seed test2.rewrite_portmap test2.rewrite_endpoint \
  203. test2.rewrite_pnat test2.rewrite_pad test2.rewrite_trunc \
  204. test2.rewrite_mac test2.rewrite_layer2 test2.rewrite_config \
  205. test2.rewrite_skip test2.rewrite_dltuser test2.rewrite_dlthdlc \
  206. test2.rewrite_vlandel test2.rewrite_efcs test2.rewrite_1ttl \
  207. test2.rewrite_2ttl test2.rewrite_3ttl
  208. @WORDS_BIGENDIAN_FALSE@STANDARD_REWRITE = standard_littleendian
  209. @WORDS_BIGENDIAN_TRUE@STANDARD_REWRITE = standard_bigendian
  210. @WORDS_BIGENDIAN_FALSE@REWRITE_WARN = "little"
  211. @WORDS_BIGENDIAN_TRUE@REWRITE_WARN = "big"
  212. all: all-am
  213. .SUFFIXES:
  214. $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
  215. @for dep in $?; do \
  216. case '$(am__configure_deps)' in \
  217. *$$dep*) \
  218. cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
  219. && exit 0; \
  220. exit 1;; \
  221. esac; \
  222. done; \
  223. echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/Makefile'; \
  224. cd $(top_srcdir) && \
  225. $(AUTOMAKE) --gnu test/Makefile
  226. .PRECIOUS: Makefile
  227. Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
  228. @case '$?' in \
  229. *config.status*) \
  230. cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
  231. *) \
  232. echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
  233. cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
  234. esac;
  235. $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
  236. cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
  237. $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
  238. cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
  239. $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
  240. cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
  241. config: $(top_builddir)/config.status $(srcdir)/config.in
  242. cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
  243. mostlyclean-libtool:
  244. -rm -f *.lo
  245. clean-libtool:
  246. -rm -rf .libs _libs
  247. tags: TAGS
  248. TAGS:
  249. ctags: CTAGS
  250. CTAGS:
  251. distdir: $(DISTFILES)
  252. @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
  253. topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
  254. list='$(DISTFILES)'; \
  255. dist_files=`for file in $$list; do echo $$file; done | \
  256. sed -e "s|^$$srcdirstrip/||;t" \
  257. -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
  258. case $$dist_files in \
  259. */*) $(MKDIR_P) `echo "$$dist_files" | \
  260. sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
  261. sort -u` ;; \
  262. esac; \
  263. for file in $$dist_files; do \
  264. if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
  265. if test -d $$d/$$file; then \
  266. dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
  267. if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
  268. cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
  269. fi; \
  270. cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
  271. else \
  272. test -f $(distdir)/$$file \
  273. || cp -p $$d/$$file $(distdir)/$$file \
  274. || exit 1; \
  275. fi; \
  276. done
  277. check-am: all-am
  278. check: check-am
  279. all-am: Makefile
  280. installdirs:
  281. install: install-am
  282. install-exec: install-exec-am
  283. install-data: install-data-am
  284. uninstall: uninstall-am
  285. install-am: all-am
  286. @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
  287. installcheck: installcheck-am
  288. install-strip:
  289. $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
  290. install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
  291. `test -z '$(STRIP)' || \
  292. echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
  293. mostlyclean-generic:
  294. clean-generic:
  295. distclean-generic:
  296. -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
  297. maintainer-clean-generic:
  298. @echo "This command is intended for maintainers to use"
  299. @echo "it deletes files that may require special tools to rebuild."
  300. clean-am: clean-generic clean-libtool mostlyclean-am
  301. distclean-am: clean-am distclean-generic
  302. dvi: dvi-am
  303. dvi-am:
  304. html: html-am
  305. info: info-am
  306. info-am:
  307. install-data-am:
  308. install-dvi: install-dvi-am
  309. install-exec-am:
  310. install-html: install-html-am
  311. install-info: install-info-am
  312. install-man:
  313. install-pdf: install-pdf-am
  314. install-ps: install-ps-am
  315. installcheck-am:
  316. maintainer-clean-am: distclean-am maintainer-clean-generic
  317. mostlyclean: mostlyclean-am
  318. mostlyclean-am: mostlyclean-generic mostlyclean-libtool
  319. pdf: pdf-am
  320. pdf-am:
  321. ps: ps-am
  322. ps-am:
  323. uninstall-am:
  324. .MAKE: install-am install-strip
  325. .PHONY: all all-am check check-am clean clean-generic clean-libtool \
  326. distclean distclean-generic distclean-libtool distdir dvi \
  327. dvi-am html html-am info info-am install install-am \
  328. install-data install-data-am install-dvi install-dvi-am \
  329. install-exec install-exec-am install-html install-html-am \
  330. install-info install-info-am install-man install-pdf \
  331. install-pdf-am install-ps install-ps-am install-strip \
  332. installcheck installcheck-am installdirs maintainer-clean \
  333. maintainer-clean-generic mostlyclean mostlyclean-generic \
  334. mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
  335. test: all
  336. all: clearlog check tcpprep tcpreplay tcprewrite
  337. clearlog:
  338. -rm test.log
  339. check:
  340. $(PRINTF) "%s\n" "NOTICE: Tests must be run as root"
  341. $(PRINTF) "%s\n" "Sending traffic on '$(nic1)' and '$(nic2)'"
  342. standard: standard_prep $(STANDARD_REWRITE)
  343. $(PRINTF) "Warning: only creating %s endian standard test files\n" $(REWRITE_WARN)
  344. standard_prep:
  345. $(TCPPREP) -i test.pcap -o test.auto_router -a router
  346. $(TCPPREP) -i test.pcap -o test.auto_bridge -a bridge
  347. $(TCPPREP) -i test.pcap -o test.auto_client -a client
  348. $(TCPPREP) -i test.pcap -o test.auto_server -a server
  349. $(TCPPREP) -i test.pcap -o test.auto_first -a first
  350. $(TCPPREP) --load-opts config -o test.prep_config
  351. $(TCPPREP) -i test.pcap -o test.port -p
  352. $(TCPPREP) -i test.pcap -o test.mac -e 00:02:3b:00:3d:ce
  353. $(TCPPREP) -i test.pcap -o test.cidr -c '216.27.178.0/24'
  354. $(TCPPREP) -i test.pcap -o test.regex -r '216.27.178.*'
  355. $(TCPPREP) -i test.pcap -o test.comment -C "This is a comment" -p
  356. $(TCPPREP) -i test.pcap -o test.mac_reverse -e 00:02:3b:00:3d:ce --reverse
  357. $(TCPPREP) -i test.pcap -o test.cidr_reverse -c '216.27.178.0/24' --reverse
  358. $(TCPPREP) -i test.pcap -o test.regex_reverse -r '216.27.178.*' --reverse
  359. standard_bigendian:
  360. $(TCPREWRITE) -i test.pcap -o test.rewrite_seed -s 55
  361. $(TCPREWRITE) -i test.pcap -o test.rewrite_portmap -r 80:8080
  362. $(TCPREWRITE) -i test.pcap -o test.rewrite_endpoint \
  363. -e 10.10.0.1:10.10.0.2 -c test.auto_router
  364. $(TCPREWRITE) -i test.pcap -o test.rewrite_pnat \
  365. -N 216.27.178.0/24:172.16.0.0/24
  366. $(TCPREWRITE) -i test.pcap -o test.rewrite_pad -F pad
  367. $(TCPREWRITE) -i test.pcap -o test.rewrite_trunc -F trunc
  368. $(TCPREWRITE) -i test.pcap -o test.rewrite_mac \
  369. --enet-dmac=00:12:13:14:15:16,00:22:33:44:55:66 \
  370. --enet-smac=00:22:33:44:55:66,00:12:13:14:15:16 -c test.auto_router
  371. $(TCPREWRITE) -i test.pcap -o test.rewrite_layer2 \
  372. --dlt=user --user-dlink=00,50,da,5d,46,55,0,7,eb,30,a4,c3,08,0
  373. $(TCPREWRITE) -i test.pcap -o test.rewrite_config --enet-vlan=add --enet-vlan-tag=45 \
  374. --enet-vlan-cfi=1 --enet-vlan-pri=5
  375. $(TCPREWRITE) -i test.pcap -o test.rewrite_skip -b -s 55 \
  376. --enet-dmac=00:12:13:14:15:16,00:22:33:44:55:66 \
  377. --enet-smac=00:22:33:44:55:66,00:12:13:14:15:16 -c test.auto_router
  378. $(TCPREWRITE) -i test.pcap -o test.rewrite_dltuser --dlt=user \
  379. --user-dlink=0x0f,0x00,0x08,0x00 --user-dlt=104
  380. $(TCPREWRITE) -i test.pcap -o test.rewrite_dlthdlc --dlt=hdlc \
  381. --hdlc-control=0 --hdlc-address=0x0F
  382. $(TCPREWRITE) -i test.rewrite_config -o test.rewrite_vlandel \
  383. --enet-vlan=del
  384. $(TCPREWRITE) -i test.pcap -o test.rewrite_efcs --efcs
  385. $(TCPREWRITE) -i test.pcap -o test.rewrite_1ttl --ttl=58
  386. $(TCPREWRITE) -i test.pcap -o test.rewrite_2ttl --ttl=+58
  387. $(TCPREWRITE) -i test.pcap -o test.rewrite_3ttl --ttl=-58
  388. standard_littleendian:
  389. $(TCPREWRITE) -i test.pcap -o test2.rewrite_seed -s 55
  390. $(TCPREWRITE) -i test.pcap -o test2.rewrite_portmap -r 80:8080
  391. $(TCPREWRITE) -i test.pcap -o test2.rewrite_endpoint \
  392. -e 10.10.0.1:10.10.0.2 -c test.auto_router
  393. $(TCPREWRITE) -i test.pcap -o test2.rewrite_pnat \
  394. -N 216.27.178.0/24:172.16.0.0/24
  395. $(TCPREWRITE) -i test.pcap -o test2.rewrite_pad -F pad
  396. $(TCPREWRITE) -i test.pcap -o test2.rewrite_trunc -F trunc
  397. $(TCPREWRITE) -i test.pcap -o test2.rewrite_mac \
  398. --enet-dmac=00:12:13:14:15:16,00:22:33:44:55:66 \
  399. --enet-smac=00:22:33:44:55:66,00:12:13:14:15:16 -c test.auto_router
  400. $(TCPREWRITE) -i test.pcap -o test2.rewrite_layer2 \
  401. --dlt=user --user-dlink=00,50,da,5d,46,55,0,7,eb,30,a4,c3,08,0
  402. $(TCPREWRITE) -i test.pcap -o test2.rewrite_config --enet-vlan=add --enet-vlan-tag=45 \
  403. --enet-vlan-cfi=1 --enet-vlan-pri=5
  404. $(TCPREWRITE) -i test.pcap -o test2.rewrite_skip -b -s 55 \
  405. --enet-dmac=00:12:13:14:15:16,00:22:33:44:55:66 \
  406. --enet-smac=00:22:33:44:55:66,00:12:13:14:15:16 -c test.auto_router
  407. $(TCPREWRITE) -i test.pcap -o test2.rewrite_dltuser --dlt=user \
  408. --user-dlink=0x0f,0x00,0x08,0x00 --user-dlt=104
  409. $(TCPREWRITE) -i test.pcap -o test2.rewrite_dlthdlc --dlt=hdlc \
  410. --hdlc-control=0 --hdlc-address=0x0F
  411. $(TCPREWRITE) -i test.rewrite_config -o test2.rewrite_vlandel \
  412. --enet-vlan=del
  413. $(TCPREWRITE) -i test.pcap -o test2.rewrite_efcs --efcs
  414. $(TCPREWRITE) -i test.pcap -o test2.rewrite_1ttl --ttl=58
  415. $(TCPREWRITE) -i test.pcap -o test2.rewrite_2ttl --ttl=+58
  416. $(TCPREWRITE) -i test.pcap -o test2.rewrite_3ttl --ttl=-58
  417. tcpprep: auto_router auto_bridge auto_client auto_server auto_first cidr regex \
  418. port mac comment print_info print_comment prep_config \
  419. mac_reverse cidr_reverse regex_reverse
  420. tcprewrite: rewrite_portmap rewrite_endpoint rewrite_pnat rewrite_trunc \
  421. rewrite_pad rewrite_seed rewrite_mac rewrite_layer2 rewrite_config \
  422. rewrite_skip rewrite_dltuser rewrite_dlthdlc rewrite_vlandel rewrite_efcs \
  423. rewrite_1ttl rewrite_2ttl rewrite_3ttl
  424. tcpreplay: replay_basic replay_cache replay_pps replay_rate replay_top \
  425. replay_config replay_multi
  426. prep_config:
  427. $(PRINTF) "%s" "[tcpprep] Config mode test: "
  428. $(PRINTF) "%s\n" "*** [tcpprep] Config mode test: " >>test.log
  429. $(TCPPREP) $(ENABLE_DEBUG) --load-opts=config -o test.$@1 2>>test.log
  430. diff test.$@ test.$@1 >>test.log 2>&1
  431. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  432. auto_router:
  433. $(PRINTF) "%s" "[tcpprep] Auto/Router mode test: "
  434. $(PRINTF) "%s\n" "*** [tcpprep] Auto/Router mode test: " >>test.log
  435. $(TCPPREP) $(ENABLE_DEBUG) -i test.pcap -o test.$@1 -a router 2>>test.log
  436. diff test.$@ test.$@1 >>test.log 2>&1
  437. if [ $? ] ; then $(PRINTF) "\t%s\n" "FAILED"; else $(PRINTF) "\t%s\n" "OK"; fi
  438. auto_bridge:
  439. $(PRINTF) "%s" "[tcpprep] Auto/Bridge mode test: "
  440. $(PRINTF) "%s\n" "*** [tcpprep] Auto/Bridge mode test: " >>test.log
  441. $(TCPPREP) $(ENABLE_DEBUG) -i test.pcap -o test.$@1 -a bridge 2>>test.log
  442. diff test.$@ test.$@1 >>test.log 2>&1
  443. if [ $? ] ; then $(PRINTF) "\t%s\n" "FAILED"; else $(PRINTF) "\t%s\n" "OK"; fi
  444. auto_client:
  445. $(PRINTF) "%s" "[tcpprep] Auto/Client mode test: "
  446. $(PRINTF) "%s\n" "*** [tcpprep] Auto/Client mode test: " >>test.log
  447. $(TCPPREP) $(ENABLE_DEBUG) -i test.pcap -o test.$@1 -a client 2>>test.log
  448. diff test.$@ test.$@1 >>test.log 2>&1
  449. if [ $? ] ; then $(PRINTF) "\t%s\n" "FAILED"; else $(PRINTF) "\t%s\n" "OK"; fi
  450. auto_server:
  451. $(PRINTF) "%s" "[tcpprep] Auto/Server mode test: "
  452. $(PRINTF) "%s\n" "*** [tcpprep] Auto/Server mode test: " >>test.log
  453. $(TCPPREP) $(ENABLE_DEBUG) -i test.pcap -o test.$@1 -a server 2>>test.log
  454. diff test.$@ test.$@1 >>test.log 2>&1
  455. if [ $? ] ; then $(PRINTF) "\t%s\n" "FAILED"; else $(PRINTF) "\t%s\n" "OK"; fi
  456. auto_first:
  457. $(PRINTF) "%s" "[tcpprep] Auto/First mode test: "
  458. $(PRINTF) "%s\n" "*** [tcpprep] Auto/First mode test: " >>test.log
  459. $(TCPPREP) $(ENABLE_DEBUG) -i test.pcap -o test.$@1 -a first 2>>test.log
  460. diff test.$@ test.$@1 >>test.log 2>&1
  461. if [ $? ] ; then $(PRINTF) "\t%s\n" "FAILED"; else $(PRINTF) "\t%s\n" "OK"; fi
  462. regex:
  463. $(PRINTF) "%s" "[tcpprep] Regex mode test: "
  464. $(PRINTF) "%s\n" "*** [tcpprep] Regex mode test: " >>test.log
  465. $(TCPPREP) $(ENABLE_DEBUG) -i test.pcap -o test.$@1 -r '216.27.178.*' 2>>test.log
  466. diff test.$@ test.$@1 >>test.log 2>&1
  467. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  468. cidr:
  469. $(PRINTF) "%s" "[tcpprep] CIDR mode test: "
  470. $(PRINTF) "%s\n" "*** [tcpprep] CIDR mode test: " >>test.log
  471. $(TCPPREP) $(ENABLE_DEBUG) -i test.pcap -o test.$@1 -c '216.27.178.0/24' 2>>test.log
  472. diff test.$@ test.$@1 >>test.log 2>&1
  473. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  474. port:
  475. $(PRINTF) "%s" "[tcpprep] Port mode test: "
  476. $(PRINTF) "%s\n" "*** [tcpprep] Port mode test: " >>test.log
  477. $(TCPPREP) $(ENABLE_DEBUG) -i test.pcap -o test.$@1 -p 2>>test.log
  478. diff test.$@ test.$@1 >>test.log 2>&1
  479. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  480. mac:
  481. $(PRINTF) "%s" "[tcpprep] MAC mode test: "
  482. $(PRINTF) "%s\n" "*** [tcpprep] MAC mode test: " >>test.log
  483. $(TCPPREP) $(ENABLE_DEBUG) -i test.pcap -o test.$@1 -e 00:02:3b:00:3d:ce 2>>test.log
  484. diff test.$@ test.$@1 >>test.log 2>&1
  485. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  486. comment:
  487. $(PRINTF) "%s" "[tcpprep] Comment mode test: "
  488. $(PRINTF) "%s\n" "*** [tcpprep] Comment mode test: " >>test.log
  489. $(TCPPREP) $(ENABLE_DEBUG) -i test.pcap -o test.$@1 -C "This is a comment" -p 2>>test.log
  490. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  491. print_comment:
  492. $(PRINTF) "%s" "[tcpprep] Print comment mode test: "
  493. $(PRINTF) "%s\n" "*** [tcpprep] Print comment mode test: " >>test.log
  494. $(TCPPREP) $(ENABLE_DEBUG) -P test.comment >test.$@1 2>>test.log
  495. if [ $? ] ; then $(PRINTF) "\t%s\n" "FAILED"; else $(PRINTF) "\t%s\n" "OK"; fi
  496. print_info:
  497. $(PRINTF) "%s" "[tcpprep] Print info mode test: "
  498. $(PRINTF) "%s\n" "*** [tcpprep] Print info mode test: " >>test.log
  499. $(TCPPREP) $(ENABLE_DEBUG) -I test.comment >test.$@1 2>>test.log
  500. if [ $? ] ; then $(PRINTF) "\t%s\n" "FAILED"; else $(PRINTF) "\t%s\n" "OK"; fi
  501. regex_reverse:
  502. $(PRINTF) "%s" "[tcpprep] Regex reverse mode test: "
  503. $(PRINTF) "%s\n" "*** [tcpprep] Regex reverse mode test: " >>test.log
  504. $(TCPPREP) $(ENABLE_DEBUG) -i test.pcap -o test.$@1 -r '216.27.178.*' --reverse 2>>test.log
  505. diff test.$@ test.$@1 >>test.log 2>&1
  506. if [ $? ] ; then $(PRINTF) "\t%s\n" "FAILED"; else $(PRINTF) "\t%s\n" "OK"; fi
  507. cidr_reverse:
  508. $(PRINTF) "%s" "[tcpprep] CIDR reverse mode test: "
  509. $(PRINTF) "%s\n" "*** [tcpprep] CIDR reverse mode test: " >>test.log
  510. $(TCPPREP) $(ENABLE_DEBUG) -i test.pcap -o test.$@1 -c '216.27.178.0/24' --reverse 2>>test.log
  511. diff test.$@ test.$@1 >>test.log 2>&1
  512. if [ $? ] ; then $(PRINTF) "\t%s\n" "FAILED"; else $(PRINTF) "\t%s\n" "OK"; fi
  513. mac_reverse:
  514. $(PRINTF) "%s" "[tcpprep] MAC reverse mode test: "
  515. $(PRINTF) "%s\n" "*** [tcpprep] MAC reverse mode test: " >>test.log
  516. $(TCPPREP) $(ENABLE_DEBUG) -i test.pcap -o test.$@1 -e 00:02:3b:00:3d:ce --reverse 2>>test.log
  517. diff test.$@ test.$@1 >>test.log 2>&1
  518. if [ $? ] ; then $(PRINTF) "\t%s\n" "FAILED"; else $(PRINTF) "\t%s\n" "OK"; fi
  519. replay_basic:
  520. $(PRINTF) "%s" "[tcpreplay] Basic test: "
  521. $(PRINTF) "%s\n" "*** [tcpreplay] Basic test: " >>test.log
  522. $(TCPREPLAY) $(ENABLE_DEBUG) -i $(nic1) -t test.pcap >>test.log 2>&1
  523. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  524. replay_cache:
  525. $(PRINTF) "%s" "[tcpreplay] Cache test: "
  526. $(PRINTF) "%s\n" "*** [tcpreplay] Cache test: " >>test.log
  527. $(TCPREPLAY) $(ENABLE_DEBUG) -c test.cidr -i $(nic1) -I $(nic2) -t test.pcap >>test.log 2>&1
  528. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  529. replay_accurate:
  530. $(PRINTF) "%s" "[tcpreplay] Accurate test: "
  531. $(PRINTF) "%s\n" "*** [tcpreplay] Accurate test: " >>test.log
  532. $(TCPREPLAY) $(ENABLE_DEBUG) -a -i $(nic1) test.pcap >>test.log 2>&1
  533. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  534. rewrite_portmap:
  535. $(PRINTF) "%s" "[tcprewrite] Portmap test: "
  536. $(PRINTF) "%s\n" "*** [tcprewrite] Portmap test: " >>test.log
  537. $(TCPREWRITE) $(ENABLE_DEBUG) -i test.pcap -o test.rewrite_portmap1 -r 80:8080 >>test.log 2>&1
  538. @WORDS_BIGENDIAN_TRUE@ diff test.$@ test.$@1 >>test.log 2>&1
  539. @WORDS_BIGENDIAN_FALSE@ diff test2.$@ test.$@1 >>test.log 2>&1
  540. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  541. rewrite_endpoint:
  542. $(PRINTF) "%s" "[tcprewrite] Endpoint test: "
  543. $(PRINTF) "%s\n" "*** [tcprewrite] Endpoint test: " >>test.log
  544. $(TCPREWRITE) $(ENABLE_DEBUG) -i test.pcap -o test.rewrite_endpoint1 -e 10.10.0.1:10.10.0.2 -c test.auto_router
  545. @WORDS_BIGENDIAN_TRUE@ diff test.$@ test.$@1 >>test.log 2>&1
  546. @WORDS_BIGENDIAN_FALSE@ diff test2.$@ test.$@1 >>test.log 2>&1
  547. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  548. rewrite_pnat:
  549. $(PRINTF) "%s" "[tcprewrite] Pseudo NAT test: "
  550. $(PRINTF) "%s\n" "*** [tcprewrite] Pseudo NAT test: " >>test.log
  551. $(TCPREWRITE) $(ENABLE_DEBUG) -i test.pcap -o test.rewrite_pnat1 -N 216.27.178.0/24:172.16.0.0/24
  552. @WORDS_BIGENDIAN_TRUE@ diff test.$@ test.$@1 >>test.log 2>&1
  553. @WORDS_BIGENDIAN_FALSE@ diff test2.$@ test.$@1 >>test.log 2>&1
  554. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  555. rewrite_mac:
  556. $(PRINTF) "%s" "[tcprewrite] Src/Dst MAC test: "
  557. $(PRINTF) "%s\n" "*** [tcprewrite] Src/Dst MAC test: " >>test.log
  558. $(TCPREWRITE) $(ENABLE_DEBUG) -i test.pcap -o test.rewrite_mac1 \
  559. --enet-dmac=00:12:13:14:15:16,00:22:33:44:55:66 \
  560. --enet-smac=00:22:33:44:55:66,00:12:13:14:15:16 -c test.auto_router
  561. @WORDS_BIGENDIAN_TRUE@ diff test.$@ test.$@1 >>test.log 2>&1
  562. @WORDS_BIGENDIAN_FALSE@ diff test2.$@ test.$@1 >>test.log 2>&1
  563. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  564. rewrite_trunc:
  565. $(PRINTF) "%s" "[tcprewrite] Truncate test: "
  566. $(PRINTF) "%s\n" "*** [tcprewrite] Truncate test: " >>test.log
  567. $(TCPREWRITE) $(ENABLE_DEBUG) -F trunc -i test.pcap -o test.rewrite_trunc1 >>test.log 2>&1
  568. @WORDS_BIGENDIAN_TRUE@ diff test.$@ test.$@1 >>test.log 2>&1
  569. @WORDS_BIGENDIAN_FALSE@ diff test2.$@ test.$@1 >>test.log 2>&1
  570. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  571. rewrite_pad:
  572. $(PRINTF) "%s" "[tcprewrite] Pad test: "
  573. $(PRINTF) "%s\n" "*** [tcprewrite] Pad test: " >>test.log
  574. $(TCPREWRITE) $(ENABLE_DEBUG) -F pad -i test.pcap -o test.rewrite_pad1 >>test.log 2>&1
  575. @WORDS_BIGENDIAN_TRUE@ diff test.$@ test.$@1 >>test.log 2>&1
  576. @WORDS_BIGENDIAN_FALSE@ diff test2.$@ test.$@1 >>test.log 2>&1
  577. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  578. rewrite_seed:
  579. $(PRINTF) "%s" "[tcprewrite] Seed IP test: "
  580. $(PRINTF) "%s\n" "*** [tcprewrite] Seed IP test: " >>test.log
  581. $(TCPREWRITE) $(ENABLE_DEBUG) -i test.pcap -o test.rewrite_seed1 -s 55 >>test.log 2>&1
  582. @WORDS_BIGENDIAN_TRUE@ diff test.$@ test.$@1 >>test.log 2>&1
  583. @WORDS_BIGENDIAN_FALSE@ diff test2.$@ test.$@1 >>test.log 2>&1
  584. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  585. rewrite_layer2:
  586. $(PRINTF) "%s" "[tcprewrite] Layer2 test: "
  587. $(PRINTF) "%s\n" "*** [tcprewrite] Layer2 test: " >>test.log
  588. $(TCPREWRITE) $(ENABLE_DEBUG) --dlt=user --user-dlink=00,50,da,5d,46,55,0,7,eb,30,a4,c3,08,0 \
  589. -i test.pcap -o test.rewrite_layer21 >>test.log 2>&1
  590. @WORDS_BIGENDIAN_TRUE@ diff test.$@ test.$@1 >>test.log 2>&1
  591. @WORDS_BIGENDIAN_FALSE@ diff test2.$@ test.$@1 >>test.log 2>&1
  592. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  593. rewrite_config:
  594. $(PRINTF) "%s" "[tcprewrite] Config/VLAN Add test: "
  595. $(PRINTF) "%s\n" "*** [tcprewrite] Config/VLAN Add test: " >>test.log
  596. $(TCPREWRITE) --load-opts config
  597. @WORDS_BIGENDIAN_TRUE@ diff test.$@ test.$@1 >>test.log 2>&1
  598. @WORDS_BIGENDIAN_FALSE@ diff test2.$@ test.$@1 >>test.log 2>&1
  599. if [ $? ] ; then $(PRINTF) "\t%s\n" "FAILED"; else $(PRINTF) "\t%s\n" "OK"; fi
  600. rewrite_skip:
  601. $(PRINTF) "%s" "[tcprewrite] Skip bcast test: "
  602. $(PRINTF) "%s\n" "*** [tcprewrite] Skip bcast test: " >>test.log
  603. $(TCPREWRITE) -i test.pcap -o test.rewrite_skip1 -b -s 55 \
  604. --enet-dmac=00:12:13:14:15:16,00:22:33:44:55:66 \
  605. --enet-smac=00:22:33:44:55:66,00:12:13:14:15:16 -c test.auto_router
  606. @WORDS_BIGENDIAN_TRUE@ diff test.$@ test.$@1 >>test.log 2>&1
  607. @WORDS_BIGENDIAN_FALSE@ diff test2.$@ test.$@1 >>test.log 2>&1
  608. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  609. rewrite_dltuser:
  610. $(PRINTF) "%s" "[tcprewrite] DLT User test: "
  611. $(PRINTF) "%s\n" "*** [tcprewrite] DLT User test: " >>test.log
  612. $(TCPREWRITE) -i test.pcap -o test.rewrite_dltuser1 --dlt=user \
  613. --user-dlink=0x0f,0x00,0x08,0x00 --user-dlt=104
  614. @WORDS_BIGENDIAN_TRUE@ diff test.$@ test.$@1 >>test.log 2>&1
  615. @WORDS_BIGENDIAN_FALSE@ diff test2.$@ test.$@1 >>test.log 2>&1
  616. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  617. rewrite_dlthdlc:
  618. $(PRINTF) "%s" "[tcprewrite] DLT Cisco HDLC test: "
  619. $(PRINTF) "%s\n" "*** [tcprewrite] DLT Cisco HDLC test: " >>test.log
  620. $(TCPREWRITE) -i test.pcap -o test.rewrite_dlthdlc1 --dlt=hdlc \
  621. --hdlc-control=0 --hdlc-address=0x0F
  622. @WORDS_BIGENDIAN_TRUE@ diff test.$@ test.$@1 >>test.log 2>&1
  623. @WORDS_BIGENDIAN_FALSE@ diff test2.$@ test.$@1 >>test.log 2>&1
  624. if [ $? ] ; then $(PRINTF) "\t%s\n" "FAILED"; else $(PRINTF) "\t%s\n" "OK"; fi
  625. rewrite_vlandel:
  626. $(PRINTF) "%s" "[tcprewrite] VLAN Delete test: "
  627. $(PRINTF) "%s\n" "*** [tcprewrite] VLAN Delete test: " >>test.log
  628. $(TCPREWRITE) -i test.rewrite_config -o test.rewrite_vlandel1 \
  629. --enet-vlan=del
  630. @WORDS_BIGENDIAN_TRUE@ diff test.$@ test.$@1 >>test.log 2>&1
  631. @WORDS_BIGENDIAN_FALSE@ diff test2.$@ test.$@1 >>test.log 2>&1
  632. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  633. rewrite_efcs:
  634. $(PRINTF) "%s" "[tcprewrite] Remove EFCS: "
  635. $(PRINTF) "%s\n" "*** [tcprewrite] Remove EFCS: " >>test.log
  636. $(TCPREWRITE) -i test.pcap -o test.rewrite_efcs1 --efcs
  637. @WORDS_BIGENDIAN_TRUE@ diff test.$@ test.$@1 >>test.log 2>&1
  638. @WORDS_BIGENDIAN_FALSE@ diff test2.$@ test.$@1 >>test.log 2>&1
  639. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  640. rewrite_1ttl:
  641. $(PRINTF) "%s" "[tcprewrite] Force TTL: "
  642. $(PRINTF) "%s\n" "*** [tcprewrite] Force TTL: " >>test.log
  643. $(TCPREWRITE) -i test.pcap -o test.$@1 --ttl=58
  644. @WORDS_BIGENDIAN_TRUE@ diff test.$@ test.$@1 >>test.log 2>&1
  645. @WORDS_BIGENDIAN_FALSE@ diff test2.$@ test.$@1 >>test.log 2>&1
  646. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  647. rewrite_2ttl:
  648. $(PRINTF) "%s" "[tcprewrite] Increase TTL: "
  649. $(PRINTF) "%s\n" "*** [tcprewrite] Increase TTL: " >>test.log
  650. $(TCPREWRITE) -i test.pcap -o test.$@1 --ttl=+58
  651. @WORDS_BIGENDIAN_TRUE@ diff test.$@ test.$@1 >>test.log 2>&1
  652. @WORDS_BIGENDIAN_FALSE@ diff test2.$@ test.$@1 >>test.log 2>&1
  653. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  654. rewrite_3ttl:
  655. $(PRINTF) "%s" "[tcprewrite] Reduce TTL: "
  656. $(PRINTF) "%s\n" "*** [tcprewrite] Reduce TTL: " >>test.log
  657. $(TCPREWRITE) -i test.pcap -o test.$@1 --ttl=-58
  658. @WORDS_BIGENDIAN_TRUE@ diff test.$@ test.$@1 >>test.log 2>&1
  659. @WORDS_BIGENDIAN_FALSE@ diff test2.$@ test.$@1 >>test.log 2>&1
  660. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  661. replay_pps:
  662. $(PRINTF) "%s" "[tcpreplay] Packets/sec test: "
  663. $(PRINTF) "%s\n" "*** [tcpreplay] Packets/sec test: " >>test.log
  664. $(TCPREPLAY) $(ENABLE_DEBUG) -i $(nic1) -p 25 test.pcap >>test.log 2>&1
  665. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  666. replay_rate:
  667. $(PRINTF) "%s" "[tcpreplay] Mbps test: "
  668. $(PRINTF) "%s\n" "*** [tcpreplay] Mbps test: " >>test.log
  669. $(TCPREPLAY) $(ENABLE_DEBUG) -i $(nic1) -M 25.0 test.pcap >>test.log 2>&1
  670. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  671. replay_multi:
  672. $(PRINTF) "%s" "[tcpreplay] Multiplier test: "
  673. $(PRINTF) "%s\n" "*** [tcpreplay] Multiplier test: " >>test.log
  674. $(TCPREPLAY) $(ENABLE_DEBUG) -i $(nic1) -x 25.0 test.pcap >>test.log 2>&1
  675. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  676. replay_top:
  677. $(PRINTF) "%s" "[tcpreplay] Topspeed test: "
  678. $(PRINTF) "%s\n" "*** [tcpreplay] Topspeed test: " >>test.log
  679. $(TCPREPLAY) $(ENABLE_DEBUG) -i $(nic1) -t test.pcap >>test.log 2>&1
  680. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  681. datadump_mode:
  682. $(PRINTF) "%s" "[tcpreplay] Data dump test: "
  683. $(PRINTF) "%s\n" "*** [tcpreplay] Data dump mode test: " >>test.log
  684. $(TCPREPLAY) $(ENABLE_DEBUG) -D -i $(nic1) -j $(nic2) -w primary.data -W secondary.data -c test.cidr -R test.pcap >>test.log 2>&1
  685. if [ $? ] ; then $(PRINTF) "\t%s\n" "FAILED"; else $(PRINTF) "\t%s\n" "OK"; fi
  686. replay_config:
  687. $(PRINTF) "%s" "[tcpreplay] Config file/VLAN add test: "
  688. $(PRINTF) "%s\n" "*** [tcpreplay] Config file/VLAN add test: " >>test.log
  689. $(TCPREPLAY) $(ENABLE_DEBUG) --load-opts=config test.pcap >>test.log 2>&1
  690. if [ $? ] ; then $(PRINTF) "\t%s\n" "FAILED"; else $(PRINTF) "\t%s\n" "OK"; fi
  691. clean:
  692. rm -f *1 test.log core* *~ primary.data secondary.data
  693. distclean: clean
  694. rm -f Makefile config
  695. maintainer-clean: distclean
  696. # Tell versions [3.59,3.63) of GNU make to not export all variables.
  697. # Otherwise a system limit (for SysV at least) may be exceeded.
  698. .NOEXPORT: