Makefile.in 34 KB

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