Makefile.in 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644
  1. # Makefile.in generated by automake 1.9.6 from Makefile.am.
  2. # @configure_input@
  3. # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
  4. # 2003, 2004, 2005 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. srcdir = @srcdir@
  14. top_srcdir = @top_srcdir@
  15. VPATH = @srcdir@
  16. pkgdatadir = $(datadir)/@PACKAGE@
  17. pkglibdir = $(libdir)/@PACKAGE@
  18. pkgincludedir = $(includedir)/@PACKAGE@
  19. top_builddir = ..
  20. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
  21. INSTALL = @INSTALL@
  22. install_sh_DATA = $(install_sh) -c -m 644
  23. install_sh_PROGRAM = $(install_sh) -c
  24. install_sh_SCRIPT = $(install_sh) -c
  25. INSTALL_HEADER = $(INSTALL_DATA)
  26. transform = $(program_transform_name)
  27. NORMAL_INSTALL = :
  28. PRE_INSTALL = :
  29. POST_INSTALL = :
  30. NORMAL_UNINSTALL = :
  31. PRE_UNINSTALL = :
  32. POST_UNINSTALL = :
  33. build_triplet = @build@
  34. host_triplet = @host@
  35. target_triplet = @target@
  36. subdir = test
  37. DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
  38. $(srcdir)/config.in
  39. ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
  40. am__aclocal_m4_deps = $(top_srcdir)/configure.in
  41. am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
  42. $(ACLOCAL_M4)
  43. mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
  44. CONFIG_HEADER = $(top_builddir)/src/config.h
  45. CONFIG_CLEAN_FILES = config
  46. SOURCES =
  47. DIST_SOURCES =
  48. DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
  49. ACLOCAL = @ACLOCAL@
  50. AMDEP_FALSE = @AMDEP_FALSE@
  51. AMDEP_TRUE = @AMDEP_TRUE@
  52. AMTAR = @AMTAR@
  53. AR = @AR@
  54. AUTOCONF = @AUTOCONF@
  55. AUTOGEN = @AUTOGEN@
  56. AUTOHEADER = @AUTOHEADER@
  57. AUTOMAKE = @AUTOMAKE@
  58. AWK = @AWK@
  59. CC = @CC@
  60. CCDEPMODE = @CCDEPMODE@
  61. CFLAGS = @CFLAGS@
  62. CPP = @CPP@
  63. CPPFLAGS = @CPPFLAGS@
  64. CXX = @CXX@
  65. CXXCPP = @CXXCPP@
  66. CXXDEPMODE = @CXXDEPMODE@
  67. CXXFLAGS = @CXXFLAGS@
  68. CYGPATH_W = @CYGPATH_W@
  69. DEFS = @DEFS@
  70. DEPDIR = @DEPDIR@
  71. DVIPDFM = @DVIPDFM@
  72. DVIPS = @DVIPS@
  73. ECHO = @ECHO@
  74. ECHO_C = @ECHO_C@
  75. ECHO_N = @ECHO_N@
  76. ECHO_T = @ECHO_T@
  77. EGREP = @EGREP@
  78. ENABLE_FLOWREPLAY_FALSE = @ENABLE_FLOWREPLAY_FALSE@
  79. ENABLE_FLOWREPLAY_TRUE = @ENABLE_FLOWREPLAY_TRUE@
  80. ENABLE_TCPBRIDGE_FALSE = @ENABLE_TCPBRIDGE_FALSE@
  81. ENABLE_TCPBRIDGE_TRUE = @ENABLE_TCPBRIDGE_TRUE@
  82. EXEEXT = @EXEEXT@
  83. F77 = @F77@
  84. FFLAGS = @FFLAGS@
  85. FIG2DEV = @FIG2DEV@
  86. HAVE_DOCTOOLS_FALSE = @HAVE_DOCTOOLS_FALSE@
  87. HAVE_DOCTOOLS_TRUE = @HAVE_DOCTOOLS_TRUE@
  88. INSTALL_DATA = @INSTALL_DATA@
  89. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  90. INSTALL_SCRIPT = @INSTALL_SCRIPT@
  91. INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
  92. LATEX2HTML = @LATEX2HTML@
  93. LDFLAGS = @LDFLAGS@
  94. LIBOBJS = @LIBOBJS@
  95. LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@
  96. LIBOPTS_DIR = @LIBOPTS_DIR@
  97. LIBOPTS_LDADD = @LIBOPTS_LDADD@
  98. LIBS = @LIBS@
  99. LIBTOOL = @LIBTOOL@
  100. LNAVLIB = @LNAVLIB@
  101. LNAV_CFLAGS = @LNAV_CFLAGS@
  102. LNETINC = @LNETINC@
  103. LNETLIB = @LNETLIB@
  104. LN_S = @LN_S@
  105. LPCAPINC = @LPCAPINC@
  106. LPCAPLIB = @LPCAPLIB@
  107. LTLIBOBJS = @LTLIBOBJS@
  108. LYX = @LYX@
  109. MAINT = @MAINT@
  110. MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
  111. MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
  112. MAKEINFO = @MAKEINFO@
  113. NEED_LIBOPTS_FALSE = @NEED_LIBOPTS_FALSE@
  114. NEED_LIBOPTS_TRUE = @NEED_LIBOPTS_TRUE@
  115. OBJEXT = @OBJEXT@
  116. PACKAGE = @PACKAGE@
  117. PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
  118. PACKAGE_NAME = @PACKAGE_NAME@
  119. PACKAGE_STRING = @PACKAGE_STRING@
  120. PACKAGE_TARNAME = @PACKAGE_TARNAME@
  121. PACKAGE_VERSION = @PACKAGE_VERSION@
  122. PATH_SEPARATOR = @PATH_SEPARATOR@
  123. PCAP_BPF_H_FILE = @PCAP_BPF_H_FILE@
  124. PRINTF = @PRINTF@
  125. RANLIB = @RANLIB@
  126. SET_MAKE = @SET_MAKE@
  127. SHELL = @SHELL@
  128. STRIP = @STRIP@
  129. SYSTEM_STRLCPY_FALSE = @SYSTEM_STRLCPY_FALSE@
  130. SYSTEM_STRLCPY_TRUE = @SYSTEM_STRLCPY_TRUE@
  131. TCPREPLAY_RELEASE = @TCPREPLAY_RELEASE@
  132. TCPREPLAY_VERSION = @TCPREPLAY_VERSION@
  133. TEXI2DVI = @TEXI2DVI@
  134. VERSION = @VERSION@
  135. ac_ct_AR = @ac_ct_AR@
  136. ac_ct_CC = @ac_ct_CC@
  137. ac_ct_CXX = @ac_ct_CXX@
  138. ac_ct_F77 = @ac_ct_F77@
  139. ac_ct_RANLIB = @ac_ct_RANLIB@
  140. ac_ct_STRIP = @ac_ct_STRIP@
  141. am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
  142. am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
  143. am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
  144. am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
  145. am__include = @am__include@
  146. am__leading_dot = @am__leading_dot@
  147. am__quote = @am__quote@
  148. am__tar = @am__tar@
  149. am__untar = @am__untar@
  150. bindir = @bindir@
  151. build = @build@
  152. build_alias = @build_alias@
  153. build_cpu = @build_cpu@
  154. build_os = @build_os@
  155. build_vendor = @build_vendor@
  156. datadir = @datadir@
  157. debug_flag = @debug_flag@
  158. exec_prefix = @exec_prefix@
  159. host = @host@
  160. host_alias = @host_alias@
  161. host_cpu = @host_cpu@
  162. host_os = @host_os@
  163. host_vendor = @host_vendor@
  164. includedir = @includedir@
  165. infodir = @infodir@
  166. install_sh = @install_sh@
  167. libdir = @libdir@
  168. libexecdir = @libexecdir@
  169. localstatedir = @localstatedir@
  170. mandir = @mandir@
  171. mkdir_p = @mkdir_p@
  172. nic1 = @nic1@
  173. nic2 = @nic2@
  174. oldincludedir = @oldincludedir@
  175. pcncfg = @pcncfg@
  176. prefix = @prefix@
  177. program_transform_name = @program_transform_name@
  178. sbindir = @sbindir@
  179. sharedstatedir = @sharedstatedir@
  180. sysconfdir = @sysconfdir@
  181. target = @target@
  182. target_alias = @target_alias@
  183. target_cpu = @target_cpu@
  184. target_os = @target_os@
  185. target_vendor = @target_vendor@
  186. td = @td@
  187. # $Id$
  188. MAKEFLAGS = -s -k
  189. HOST = @host@
  190. TARGET = @target@
  191. BUILD = @build@
  192. ENABLE_DEBUG = @debug_flag@
  193. TCPPREP = ../src/tcpprep --no-arg-comment
  194. TCPREPLAY = ../src/tcpreplay
  195. TCPREWRITE = ../src/tcprewrite
  196. TCPBRIDGE = ../src/tcpbridge
  197. EXTRA_DIST = test.pcap test.auto_bridge test.auto_client test.auto_router \
  198. test.auto_server test.cidr test.comment test.port test.mac \
  199. test.prep_config test.primary test.regex test.secondary \
  200. test.rewrite_seed test.rewrite_portmap test.rewrite_endpoint \
  201. test.rewrite_pnat test.rewrite_pad test.rewrite_trunc \
  202. test.rewrite_mac test.rewrite_layer2 test.rewrite_config \
  203. test.rewrite_skip test.rewrite_dlt
  204. all: all-am
  205. .SUFFIXES:
  206. $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
  207. @for dep in $?; do \
  208. case '$(am__configure_deps)' in \
  209. *$$dep*) \
  210. cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
  211. && exit 0; \
  212. exit 1;; \
  213. esac; \
  214. done; \
  215. echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/Makefile'; \
  216. cd $(top_srcdir) && \
  217. $(AUTOMAKE) --gnu test/Makefile
  218. .PRECIOUS: Makefile
  219. Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
  220. @case '$?' in \
  221. *config.status*) \
  222. cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
  223. *) \
  224. echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
  225. cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
  226. esac;
  227. $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
  228. cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
  229. $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
  230. cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
  231. $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
  232. cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
  233. config: $(top_builddir)/config.status $(srcdir)/config.in
  234. cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
  235. mostlyclean-libtool:
  236. -rm -f *.lo
  237. clean-libtool:
  238. -rm -rf .libs _libs
  239. distclean-libtool:
  240. -rm -f libtool
  241. uninstall-info-am:
  242. tags: TAGS
  243. TAGS:
  244. ctags: CTAGS
  245. CTAGS:
  246. distdir: $(DISTFILES)
  247. @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
  248. topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
  249. list='$(DISTFILES)'; for file in $$list; do \
  250. case $$file in \
  251. $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
  252. $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
  253. esac; \
  254. if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
  255. dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
  256. if test "$$dir" != "$$file" && test "$$dir" != "."; then \
  257. dir="/$$dir"; \
  258. $(mkdir_p) "$(distdir)$$dir"; \
  259. else \
  260. dir=''; \
  261. fi; \
  262. if test -d $$d/$$file; then \
  263. if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
  264. cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
  265. fi; \
  266. cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
  267. else \
  268. test -f $(distdir)/$$file \
  269. || cp -p $$d/$$file $(distdir)/$$file \
  270. || exit 1; \
  271. fi; \
  272. done
  273. check-am: all-am
  274. check: check-am
  275. all-am: Makefile
  276. installdirs:
  277. install: install-am
  278. install-exec: install-exec-am
  279. install-data: install-data-am
  280. uninstall: uninstall-am
  281. install-am: all-am
  282. @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
  283. installcheck: installcheck-am
  284. install-strip:
  285. $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
  286. install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
  287. `test -z '$(STRIP)' || \
  288. echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
  289. mostlyclean-generic:
  290. clean-generic:
  291. distclean-generic:
  292. -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
  293. maintainer-clean-generic:
  294. @echo "This command is intended for maintainers to use"
  295. @echo "it deletes files that may require special tools to rebuild."
  296. clean-am: clean-generic clean-libtool mostlyclean-am
  297. distclean-am: clean-am distclean-generic distclean-libtool
  298. dvi: dvi-am
  299. dvi-am:
  300. html: html-am
  301. info: info-am
  302. info-am:
  303. install-data-am:
  304. install-exec-am:
  305. install-info: install-info-am
  306. install-man:
  307. installcheck-am:
  308. maintainer-clean-am: distclean-am maintainer-clean-generic
  309. mostlyclean: mostlyclean-am
  310. mostlyclean-am: mostlyclean-generic mostlyclean-libtool
  311. pdf: pdf-am
  312. pdf-am:
  313. ps: ps-am
  314. ps-am:
  315. uninstall-am: uninstall-info-am
  316. .PHONY: all all-am check check-am clean clean-generic clean-libtool \
  317. distclean distclean-generic distclean-libtool distdir dvi \
  318. dvi-am html html-am info info-am install install-am \
  319. install-data install-data-am install-exec install-exec-am \
  320. install-info install-info-am install-man install-strip \
  321. installcheck installcheck-am installdirs maintainer-clean \
  322. maintainer-clean-generic mostlyclean mostlyclean-generic \
  323. mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
  324. uninstall-info-am
  325. test: all
  326. all: clearlog check tcpprep tcpreplay tcprewrite
  327. clearlog:
  328. -rm test.log
  329. check:
  330. $(PRINTF) "%s\n" "NOTICE: Tests must be run as root"
  331. $(PRINTF) "%s\n" "Sending traffic on '$(nic1)' and '$(nic2)'"
  332. # the cache files to be used as the standard; be sure to do a cvs commit
  333. # afterwords!
  334. standard:
  335. $(TCPPREP) -i test.pcap -o test.auto_router -a router
  336. $(TCPPREP) -i test.pcap -o test.auto_bridge -a bridge
  337. $(TCPPREP) -i test.pcap -o test.auto_client -a client
  338. $(TCPPREP) -i test.pcap -o test.auto_server -a server
  339. $(TCPPREP) --load-opts config -o test.prep_config
  340. $(TCPPREP) -i test.pcap -o test.port -p
  341. $(TCPPREP) -i test.pcap -o test.mac -e 00:02:3b:00:3d:ce
  342. $(TCPPREP) -i test.pcap -o test.cidr -c '216.27.178.0/24'
  343. $(TCPPREP) -i test.pcap -o test.regex -r '216.27.178.*'
  344. $(TCPPREP) -i test.pcap -o test.comment -C "This is a comment" -p
  345. $(TCPREWRITE) -i test.pcap -o test.rewrite_seed -s 55
  346. $(TCPREWRITE) -i test.pcap -o test.rewrite_portmap -r 80:8080
  347. $(TCPREWRITE) -i test.pcap -o test.rewrite_endpoint \
  348. -e 10.10.0.1:10.10.0.2 -c test.auto_router
  349. $(TCPREWRITE) -i test.pcap -o test.rewrite_pnat \
  350. -N 216.27.178.0/24:172.16.0.0/24
  351. $(TCPREWRITE) -i test.pcap -o test.rewrite_pad -F pad
  352. $(TCPREWRITE) -i test.pcap -o test.rewrite_trunc -F trunc
  353. $(TCPREWRITE) -i test.pcap -o test.rewrite_mac \
  354. -D 00:12:13:14:15:16,00:22:33:44:55:66 \
  355. -S 00:22:33:44:55:66,00:12:13:14:15:16 -c test.auto_router
  356. $(TCPREWRITE) -i test.pcap -o test.rewrite_layer2 \
  357. -l 00,50,da,5d,46,55,0,7,eb,30,a4,c3,08,0
  358. $(TCPREWRITE) -i test.pcap -o test.rewrite_config --vlan=add --vlan-tag=45 \
  359. --vlan-cfi=1 --vlan-pri=5
  360. $(TCPREWRITE) -i test.pcap -o test.rewrite_skip -b -s 55 \
  361. -D 00:12:13:14:15:16,00:22:33:44:55:66 \
  362. -S 00:22:33:44:55:66,00:12:13:14:15:16 -c test.auto_router
  363. $(TCPREWRITE) -i test.pcap -o test.rewrite_dlt \
  364. --dlink=0x0f,0x00,0x08,0x00 --dlt=104
  365. tcpprep: auto_router auto_bridge auto_client auto_server cidr regex port \
  366. mac comment print_info print_comment prep_config
  367. tcprewrite: rewrite_portmap rewrite_endpoint rewrite_pnat rewrite_trunc \
  368. rewrite_pad rewrite_seed rewrite_mac rewrite_layer2 rewrite_config \
  369. rewrite_skip rewrite_dlt
  370. tcpreplay: replay_basic replay_cache replay_pps replay_rate replay_top \
  371. replay_config replay_multi replay_accurate
  372. prep_config:
  373. $(PRINTF) "%s" "[tcpprep] Config mode test: "
  374. $(PRINTF) "%s\n" "*** [tcpprep] Config mode test: " >>test.log
  375. $(TCPPREP) $(ENABLE_DEBUG) --load-opts=config -o test.$@1 2>>test.log
  376. diff test.$@ test.$@1 >>test.log 2>&1
  377. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  378. auto_router:
  379. $(PRINTF) "%s" "[tcpprep] Auto/Router mode test: "
  380. $(PRINTF) "%s\n" "*** [tcpprep] Auto/Router mode test: " >>test.log
  381. $(TCPPREP) $(ENABLE_DEBUG) -i test.pcap -o test.$@1 -a router 2>>test.log
  382. diff test.$@ test.$@1 >>test.log 2>&1
  383. if [ $? ] ; then $(PRINTF) "\t%s\n" "FAILED"; else $(PRINTF) "\t%s\n" "OK"; fi
  384. auto_bridge:
  385. $(PRINTF) "%s" "[tcpprep] Auto/Bridge mode test: "
  386. $(PRINTF) "%s\n" "*** [tcpprep] Auto/Bridge mode test: " >>test.log
  387. $(TCPPREP) $(ENABLE_DEBUG) -i test.pcap -o test.$@1 -a bridge 2>>test.log
  388. diff test.$@ test.$@1 >>test.log 2>&1
  389. if [ $? ] ; then $(PRINTF) "\t%s\n" "FAILED"; else $(PRINTF) "\t%s\n" "OK"; fi
  390. auto_client:
  391. $(PRINTF) "%s" "[tcpprep] Auto/Client mode test: "
  392. $(PRINTF) "%s\n" "*** [tcpprep] Auto/Client mode test: " >>test.log
  393. $(TCPPREP) $(ENABLE_DEBUG) -i test.pcap -o test.$@1 -a client 2>>test.log
  394. diff test.$@ test.$@1 >>test.log 2>&1
  395. if [ $? ] ; then $(PRINTF) "\t%s\n" "FAILED"; else $(PRINTF) "\t%s\n" "OK"; fi
  396. auto_server:
  397. $(PRINTF) "%s" "[tcpprep] Auto/Server mode test: "
  398. $(PRINTF) "%s\n" "*** [tcpprep] Auto/Server mode test: " >>test.log
  399. $(TCPPREP) $(ENABLE_DEBUG) -i test.pcap -o test.$@1 -a server 2>>test.log
  400. diff test.$@ test.$@1 >>test.log 2>&1
  401. if [ $? ] ; then $(PRINTF) "\t%s\n" "FAILED"; else $(PRINTF) "\t%s\n" "OK"; fi
  402. regex:
  403. $(PRINTF) "%s" "[tcpprep] Regex mode test: "
  404. $(PRINTF) "%s\n" "*** [tcpprep] Regex mode test: " >>test.log
  405. $(TCPPREP) $(ENABLE_DEBUG) -i test.pcap -o test.$@1 -r '216.27.178.*' 2>>test.log
  406. diff test.$@ test.$@1 >>test.log 2>&1
  407. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  408. cidr:
  409. $(PRINTF) "%s" "[tcpprep] CIDR mode test: "
  410. $(PRINTF) "%s\n" "*** [tcpprep] CIDR mode test: " >>test.log
  411. $(TCPPREP) $(ENABLE_DEBUG) -i test.pcap -o test.$@1 -c '216.27.178.0/24' 2>>test.log
  412. diff test.$@ test.$@1 >>test.log 2>&1
  413. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  414. port:
  415. $(PRINTF) "%s" "[tcpprep] Port mode test: "
  416. $(PRINTF) "%s\n" "*** [tcpprep] Port mode test: " >>test.log
  417. $(TCPPREP) $(ENABLE_DEBUG) -i test.pcap -o test.$@1 -p 2>>test.log
  418. diff test.$@ test.$@1 >>test.log 2>&1
  419. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  420. mac:
  421. $(PRINTF) "%s" "[tcpprep] MAC mode test: "
  422. $(PRINTF) "%s\n" "*** [tcpprep] MAC mode test: " >>test.log
  423. $(TCPPREP) $(ENABLE_DEBUG) -i test.pcap -o test.$@1 -e 00:02:3b:00:3d:ce 2>>test.log
  424. diff test.$@ test.$@1 >>test.log 2>&1
  425. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  426. comment:
  427. $(PRINTF) "%s" "[tcpprep] Comment mode test: "
  428. $(PRINTF) "%s\n" "*** [tcpprep] Comment mode test: " >>test.log
  429. $(TCPPREP) $(ENABLE_DEBUG) -i test.pcap -o test.$@1 -C "This is a comment" -p 2>>test.log
  430. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  431. print_comment:
  432. $(PRINTF) "%s" "[tcpprep] Print comment mode test: "
  433. $(PRINTF) "%s\n" "*** [tcpprep] Print comment mode test: " >>test.log
  434. $(TCPPREP) $(ENABLE_DEBUG) -P test.comment >test.$@1 2>>test.log
  435. if [ $? ] ; then $(PRINTF) "\t%s\n" "FAILED"; else $(PRINTF) "\t%s\n" "OK"; fi
  436. print_info:
  437. $(PRINTF) "%s" "[tcpprep] Print info mode test: "
  438. $(PRINTF) "%s\n" "*** [tcpprep] Print info mode test: " >>test.log
  439. $(TCPPREP) $(ENABLE_DEBUG) -I test.comment >test.$@1 2>>test.log
  440. if [ $? ] ; then $(PRINTF) "\t%s\n" "FAILED"; else $(PRINTF) "\t%s\n" "OK"; fi
  441. replay_basic:
  442. $(PRINTF) "%s" "[tcpreplay] Basic test: "
  443. $(PRINTF) "%s\n" "*** [tcpreplay] Basic test: " >>test.log
  444. $(TCPREPLAY) $(ENABLE_DEBUG) -i $(nic1) -t test.pcap >>test.log 2>&1
  445. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  446. replay_cache:
  447. $(PRINTF) "%s" "[tcpreplay] Cache test: "
  448. $(PRINTF) "%s\n" "*** [tcpreplay] Cache test: " >>test.log
  449. $(TCPREPLAY) $(ENABLE_DEBUG) -c test.cidr -i $(nic1) -I $(nic2) -t test.pcap >>test.log 2>&1
  450. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  451. replay_accurate:
  452. $(PRINTF) "%s" "[tcpreplay] Accurate test: "
  453. $(PRINTF) "%s\n" "*** [tcpreplay] Accurate test: " >>test.log
  454. $(TCPREPLAY) $(ENABLE_DEBUG) -a -i $(nic1) test.pcap >>test.log 2>&1
  455. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  456. rewrite_portmap:
  457. $(PRINTF) "%s" "[tcprewrite] Portmap test: "
  458. $(PRINTF) "%s\n" "[tcprewrite] Portmap test: " >>test.log
  459. $(TCPREWRITE) $(ENABLE_DEBUG) -i test.pcap -o test.rewrite_portmap1 -r 80:8080 >>test.log 2>&1
  460. diff test.$@ test.$@1 >>test.log 2>&1
  461. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  462. rewrite_endpoint:
  463. $(PRINTF) "%s" "[tcprewrite] Endpoint test: "
  464. $(PRINTF) "%s\n" "[tcprewrite] Endpoint test: " >>test.log
  465. $(TCPREWRITE) $(ENABLE_DEBUG) -i test.pcap -o test.rewrite_endpoint1 -e 10.10.0.1:10.10.0.2 -c test.auto_router
  466. diff test.$@ test.$@1 >>test.log 2>&1
  467. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  468. rewrite_pnat:
  469. $(PRINTF) "%s" "[tcprewrite] Pseudo NAT test: "
  470. $(PRINTF) "%s\n" "[tcprewrite] Pseudo NAT test: " >>test.log
  471. $(TCPREWRITE) $(ENABLE_DEBUG) -i test.pcap -o test.rewrite_pnat1 -N 216.27.178.0/24:172.16.0.0/24
  472. diff test.$@ test.$@1 >>test.log 2>&1
  473. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  474. rewrite_mac:
  475. $(PRINTF) "%s" "[tcprewrite] Src/Dst MAC test: "
  476. $(PRINTF) "%s\n" "[tcprewrite] Src/Dst MAC test: " >>test.log
  477. $(TCPREWRITE) $(ENABLE_DEBUG) -i test.pcap -o test.rewrite_mac1 \
  478. -D 00:12:13:14:15:16,00:22:33:44:55:66 \
  479. -S 00:22:33:44:55:66,00:12:13:14:15:16 -c test.auto_router
  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. rewrite_trunc:
  483. $(PRINTF) "%s" "[tcprewrite] Truncate test: "
  484. $(PRINTF) "%s\n" "*** [tcprewrite] Truncate test: " >>test.log
  485. $(TCPREWRITE) $(ENABLE_DEBUG) -F trunc -i test.pcap -o test.rewrite_trunc1 >>test.log 2>&1
  486. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  487. rewrite_pad:
  488. $(PRINTF) "%s" "[tcprewrite] Pad test: "
  489. $(PRINTF) "%s\n" "*** [tcprewrite] Pad test: " >>test.log
  490. $(TCPREWRITE) $(ENABLE_DEBUG) -F pad -i test.pcap -o test.rewrite_pad1 >>test.log 2>&1
  491. diff test.$@ test.$@1 >>test.log 2>&1
  492. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  493. rewrite_seed:
  494. $(PRINTF) "%s" "[tcprewrite] Seed IP test: "
  495. $(PRINTF) "%s\n" "*** [tcprewrite] Seed IP test: " >>test.log
  496. $(TCPREWRITE) $(ENABLE_DEBUG) -i test.pcap -o test.rewrite_seed1 -s 55 >>test.log 2>&1
  497. diff test.$@ test.$@1 >>test.log 2>&1
  498. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  499. rewrite_layer2:
  500. $(PRINTF) "%s" "[tcprewrite] Layer2 test: "
  501. $(PRINTF) "%s\n" "*** [tcprewrite] Layer2 test: " >>test.log
  502. $(TCPREWRITE) $(ENABLE_DEBUG) -l 00,50,da,5d,46,55,0,7,eb,30,a4,c3,08,0 \
  503. -i test.pcap -o test.rewrite_layer21 >>test.log 2>&1
  504. diff test.$@ test.$@1 >>test.log 2>&1
  505. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  506. rewrite_config:
  507. $(PRINTF) "%s" "[tcprewrite] Config test: "
  508. $(PRINTF) "%s\n" "*** [tcprewrite] Config test: " >>test.log
  509. $(TCPREWRITE) -i test.pcap -o test.rewrite_config1 --load-opts config
  510. diff test.$@ test.$@1 >>test.log 2>&1
  511. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  512. rewrite_skip:
  513. $(PRINTF) "%s" "[tcprewrite] Skip bcast test: "
  514. $(PRINTF) "%s\n" "*** [tcprewrite] Skip bcast test: " >>test.log
  515. $(TCPREWRITE) -i test.pcap -o test.rewrite_skip1 -b -s 55 \
  516. -D 00:12:13:14:15:16,00:22:33:44:55:66 \
  517. -S 00:22:33:44:55:66,00:12:13:14:15:16 -c test.auto_router
  518. diff test.$@ test.$@1 >>test.log 2>&1
  519. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  520. rewrite_dlt:
  521. $(PRINTF) "%s" "[tcprewrite] DLT test: "
  522. $(PRINTF) "%s\n" "*** [tcprewrite] DLT test: " >>test.log
  523. $(TCPREWRITE) -i test.pcap -o test.rewrite_dlt1 \
  524. --dlink=0x0f,0x00,0x08,0x00 --dlt=104
  525. diff test.$@ test.$@1 >>test.log 2>&1
  526. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  527. replay_pps:
  528. $(PRINTF) "%s" "[tcpreplay] Packets/sec test: "
  529. $(PRINTF) "%s\n" "*** [tcpreplay] Packets/sec test: " >>test.log
  530. $(TCPREPLAY) $(ENABLE_DEBUG) -i $(nic1) -p 25 test.pcap >>test.log 2>&1
  531. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  532. replay_rate:
  533. $(PRINTF) "%s" "[tcpreplay] Mbps test: "
  534. $(PRINTF) "%s\n" "*** [tcpreplay] Mbps test: " >>test.log
  535. $(TCPREPLAY) $(ENABLE_DEBUG) -i $(nic1) -M 25.0 test.pcap >>test.log 2>&1
  536. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  537. replay_multi:
  538. $(PRINTF) "%s" "[tcpreplay] Multiplier test: "
  539. $(PRINTF) "%s\n" "*** [tcpreplay] Multiplier test: " >>test.log
  540. $(TCPREPLAY) $(ENABLE_DEBUG) -i $(nic1) -m 25.0 test.pcap >>test.log 2>&1
  541. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  542. replay_top:
  543. $(PRINTF) "%s" "[tcpreplay] Topspeed test: "
  544. $(PRINTF) "%s\n" "*** [tcpreplay] Topspeed test: " >>test.log
  545. $(TCPREPLAY) $(ENABLE_DEBUG) -i $(nic1) -t test.pcap >>test.log 2>&1
  546. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  547. datadump_mode:
  548. $(PRINTF) "%s" "[tcpreplay] Data dump test: "
  549. $(PRINTF) "%s\n" "*** [tcpreplay] Data dump mode test: " >>test.log
  550. $(TCPREPLAY) $(ENABLE_DEBUG) -D -i $(nic1) -j $(nic2) -w primary.data -W secondary.data -c test.cidr -R test.pcap >>test.log 2>&1
  551. if [ $? ] ; then $(PRINTF) "\t%s\n" "FAILED"; else $(PRINTF) "\t%s\n" "OK"; fi
  552. replay_config:
  553. $(PRINTF) "%s" "[tcpreplay] Config file/VLAN add test: "
  554. $(PRINTF) "%s\n" "*** [tcpreplay] Config file/VLAN add test: " >>test.log
  555. $(TCPREPLAY) $(ENABLE_DEBUG) --load-opts=config test.pcap >>test.log 2>&1
  556. if [ $? ] ; then $(PRINTF) "\t%s\n" "FAILED"; else $(PRINTF) "\t%s\n" "OK"; fi
  557. clean:
  558. rm -f *1 test.log core* *~ primary.data secondary.data
  559. distclean: clean
  560. rm -f Makefile config
  561. maintainer-clean: distclean
  562. # Tell versions [3.59,3.63) of GNU make to not export all variables.
  563. # Otherwise a system limit (for SysV at least) may be exceeded.
  564. .NOEXPORT: