Makefile.in 33 KB

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