Makefile.in 33 KB

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