Makefile.in 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609
  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. EXEEXT = @EXEEXT@
  79. F77 = @F77@
  80. FFLAGS = @FFLAGS@
  81. FIG2DEV = @FIG2DEV@
  82. HAVE_DOCTOOLS_FALSE = @HAVE_DOCTOOLS_FALSE@
  83. HAVE_DOCTOOLS_TRUE = @HAVE_DOCTOOLS_TRUE@
  84. HAVE_LIBNIDS_FALSE = @HAVE_LIBNIDS_FALSE@
  85. HAVE_LIBNIDS_TRUE = @HAVE_LIBNIDS_TRUE@
  86. INSTALL_DATA = @INSTALL_DATA@
  87. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  88. INSTALL_SCRIPT = @INSTALL_SCRIPT@
  89. INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
  90. LATEX2HTML = @LATEX2HTML@
  91. LDFLAGS = @LDFLAGS@
  92. LIBOBJS = @LIBOBJS@
  93. LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@
  94. LIBOPTS_DIR = @LIBOPTS_DIR@
  95. LIBOPTS_LDADD = @LIBOPTS_LDADD@
  96. LIBS = @LIBS@
  97. LIBTOOL = @LIBTOOL@
  98. LNAVLIB = @LNAVLIB@
  99. LNAV_CFLAGS = @LNAV_CFLAGS@
  100. LNETINC = @LNETINC@
  101. LNETLIB = @LNETLIB@
  102. LNIDSINC = @LNIDSINC@
  103. LNIDSLIB = @LNIDSLIB@
  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. all: all-am
  204. .SUFFIXES:
  205. $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
  206. @for dep in $?; do \
  207. case '$(am__configure_deps)' in \
  208. *$$dep*) \
  209. cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
  210. && exit 0; \
  211. exit 1;; \
  212. esac; \
  213. done; \
  214. echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/Makefile'; \
  215. cd $(top_srcdir) && \
  216. $(AUTOMAKE) --gnu test/Makefile
  217. .PRECIOUS: Makefile
  218. Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
  219. @case '$?' in \
  220. *config.status*) \
  221. cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
  222. *) \
  223. echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
  224. cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
  225. esac;
  226. $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
  227. cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
  228. $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
  229. cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
  230. $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
  231. cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
  232. config: $(top_builddir)/config.status $(srcdir)/config.in
  233. cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
  234. mostlyclean-libtool:
  235. -rm -f *.lo
  236. clean-libtool:
  237. -rm -rf .libs _libs
  238. distclean-libtool:
  239. -rm -f libtool
  240. uninstall-info-am:
  241. tags: TAGS
  242. TAGS:
  243. ctags: CTAGS
  244. CTAGS:
  245. distdir: $(DISTFILES)
  246. @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
  247. topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
  248. list='$(DISTFILES)'; for file in $$list; do \
  249. case $$file in \
  250. $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
  251. $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
  252. esac; \
  253. if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
  254. dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
  255. if test "$$dir" != "$$file" && test "$$dir" != "."; then \
  256. dir="/$$dir"; \
  257. $(mkdir_p) "$(distdir)$$dir"; \
  258. else \
  259. dir=''; \
  260. fi; \
  261. if test -d $$d/$$file; then \
  262. if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
  263. cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
  264. fi; \
  265. cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
  266. else \
  267. test -f $(distdir)/$$file \
  268. || cp -p $$d/$$file $(distdir)/$$file \
  269. || exit 1; \
  270. fi; \
  271. done
  272. check-am: all-am
  273. check: check-am
  274. all-am: Makefile
  275. installdirs:
  276. install: install-am
  277. install-exec: install-exec-am
  278. install-data: install-data-am
  279. uninstall: uninstall-am
  280. install-am: all-am
  281. @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
  282. installcheck: installcheck-am
  283. install-strip:
  284. $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
  285. install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
  286. `test -z '$(STRIP)' || \
  287. echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
  288. mostlyclean-generic:
  289. clean-generic:
  290. distclean-generic:
  291. -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
  292. maintainer-clean-generic:
  293. @echo "This command is intended for maintainers to use"
  294. @echo "it deletes files that may require special tools to rebuild."
  295. clean-am: clean-generic clean-libtool mostlyclean-am
  296. distclean-am: clean-am distclean-generic distclean-libtool
  297. dvi: dvi-am
  298. dvi-am:
  299. html: html-am
  300. info: info-am
  301. info-am:
  302. install-data-am:
  303. install-exec-am:
  304. install-info: install-info-am
  305. install-man:
  306. installcheck-am:
  307. maintainer-clean-am: distclean-am maintainer-clean-generic
  308. mostlyclean: mostlyclean-am
  309. mostlyclean-am: mostlyclean-generic mostlyclean-libtool
  310. pdf: pdf-am
  311. pdf-am:
  312. ps: ps-am
  313. ps-am:
  314. uninstall-am: uninstall-info-am
  315. .PHONY: all all-am check check-am clean clean-generic clean-libtool \
  316. distclean distclean-generic distclean-libtool distdir dvi \
  317. dvi-am html html-am info info-am install install-am \
  318. install-data install-data-am install-exec install-exec-am \
  319. install-info install-info-am install-man install-strip \
  320. installcheck installcheck-am installdirs maintainer-clean \
  321. maintainer-clean-generic mostlyclean mostlyclean-generic \
  322. mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
  323. uninstall-info-am
  324. test: all
  325. all: clearlog check tcpprep tcpreplay tcprewrite
  326. clearlog:
  327. -rm test.log
  328. check:
  329. $(PRINTF) "%s\n" "NOTICE: Tests must be run as root"
  330. $(PRINTF) "%s\n" "Sending traffic on '$(nic1)' and '$(nic2)'"
  331. # the cache files to be used as the standard; be sure to do a cvs commit
  332. # afterwords!
  333. standard:
  334. $(TCPPREP) -i test.pcap -o test.auto_router -a router
  335. $(TCPPREP) -i test.pcap -o test.auto_bridge -a bridge
  336. $(TCPPREP) -i test.pcap -o test.auto_client -a client
  337. $(TCPPREP) -i test.pcap -o test.auto_server -a server
  338. $(TCPPREP) --load-opts config -o test.prep_config
  339. $(TCPPREP) -i test.pcap -o test.port -p
  340. $(TCPPREP) -i test.pcap -o test.mac -e 00:02:3b:00:3d:ce
  341. $(TCPPREP) -i test.pcap -o test.cidr -c '216.27.178.0/24'
  342. $(TCPPREP) -i test.pcap -o test.regex -r '216.27.178.*'
  343. $(TCPPREP) -i test.pcap -o test.comment -C "This is a comment" -p
  344. $(TCPREWRITE) -i test.pcap -o test.rewrite_seed -s 55
  345. $(TCPREWRITE) -i test.pcap -o test.rewrite_portmap -r 80:8080
  346. $(TCPREWRITE) -i test.pcap -o test.rewrite_endpoint -e 10.10.0.1:10.10.0.2
  347. $(TCPREWRITE) -i test.pcap -o test.rewrite_pnat -N 216.27.178.0/24:172.16.0.0/24
  348. $(TCPREWRITE) -i test.pcap -o test.rewrite_pad -F pad
  349. $(TCPREWRITE) -i test.pcap -o test.rewrite_trunc -F trunc
  350. $(TCPREWRITE) -i test.pcap -o test.rewrite_mac \
  351. -D 00:12:13:14:15:16,00:22:33:44:55:66 \
  352. -S 00:22:33:44:55:66,00:12:13:14:15:16 -c test.auto_router
  353. $(TCPREWRITE) -i test.pcap -o test.rewrite_layer2 \
  354. -l 00,50,da,5d,46,55,0,7,eb,30,a4,c3,08,0
  355. $(TCPREWRITE) -i test.pcap -o test.rewrite_config --vlan=add --vlan-tag=45 \
  356. --vlan-cfi=1 --vlan-pri=5
  357. tcpprep: auto_router auto_bridge auto_client auto_server cidr regex port mac comment print_info print_comment prep_config
  358. tcprewrite: rewrite_portmap rewrite_endpoint rewrite_pnat rewrite_trunc rewrite_pad rewrite_seed rewrite_mac rewrite_layer2 rewrite_config
  359. tcpreplay: replay_basic replay_cache replay_pps replay_rate replay_top replay_config replay_multi
  360. prep_config:
  361. $(PRINTF) "%s" "[tcpprep] Config mode test: "
  362. $(PRINTF) "%s\n" "*** [tcpprep] Config mode test: " >>test.log
  363. $(TCPPREP) $(ENABLE_DEBUG) --load-opts=config -o test.$@1 2>>test.log
  364. diff test.$@ test.$@1 >>test.log 2>&1
  365. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  366. auto_router:
  367. $(PRINTF) "%s" "[tcpprep] Auto/Router mode test: "
  368. $(PRINTF) "%s\n" "*** [tcpprep] Auto/Router mode test: " >>test.log
  369. $(TCPPREP) $(ENABLE_DEBUG) -i test.pcap -o test.$@1 -a router 2>>test.log
  370. diff test.$@ test.$@1 >>test.log 2>&1
  371. if [ $? ] ; then $(PRINTF) "\t%s\n" "FAILED"; else $(PRINTF) "\t%s\n" "OK"; fi
  372. auto_bridge:
  373. $(PRINTF) "%s" "[tcpprep] Auto/Bridge mode test: "
  374. $(PRINTF) "%s\n" "*** [tcpprep] Auto/Bridge mode test: " >>test.log
  375. $(TCPPREP) $(ENABLE_DEBUG) -i test.pcap -o test.$@1 -a bridge 2>>test.log
  376. diff test.$@ test.$@1 >>test.log 2>&1
  377. if [ $? ] ; then $(PRINTF) "\t%s\n" "FAILED"; else $(PRINTF) "\t%s\n" "OK"; fi
  378. auto_client:
  379. $(PRINTF) "%s" "[tcpprep] Auto/Client mode test: "
  380. $(PRINTF) "%s\n" "*** [tcpprep] Auto/Client mode test: " >>test.log
  381. $(TCPPREP) $(ENABLE_DEBUG) -i test.pcap -o test.$@1 -a client 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_server:
  385. $(PRINTF) "%s" "[tcpprep] Auto/Server mode test: "
  386. $(PRINTF) "%s\n" "*** [tcpprep] Auto/Server mode test: " >>test.log
  387. $(TCPPREP) $(ENABLE_DEBUG) -i test.pcap -o test.$@1 -a server 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. regex:
  391. $(PRINTF) "%s" "[tcpprep] Regex mode test: "
  392. $(PRINTF) "%s\n" "*** [tcpprep] Regex mode test: " >>test.log
  393. $(TCPPREP) $(ENABLE_DEBUG) -i test.pcap -o test.$@1 -r '216.27.178.*' 2>>test.log
  394. diff test.$@ test.$@1 >>test.log 2>&1
  395. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  396. cidr:
  397. $(PRINTF) "%s" "[tcpprep] CIDR mode test: "
  398. $(PRINTF) "%s\n" "*** [tcpprep] CIDR mode test: " >>test.log
  399. $(TCPPREP) $(ENABLE_DEBUG) -i test.pcap -o test.$@1 -c '216.27.178.0/24' 2>>test.log
  400. diff test.$@ test.$@1 >>test.log 2>&1
  401. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  402. port:
  403. $(PRINTF) "%s" "[tcpprep] Port mode test: "
  404. $(PRINTF) "%s\n" "*** [tcpprep] Port mode test: " >>test.log
  405. $(TCPPREP) $(ENABLE_DEBUG) -i test.pcap -o test.$@1 -p 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. mac:
  409. $(PRINTF) "%s" "[tcpprep] MAC mode test: "
  410. $(PRINTF) "%s\n" "*** [tcpprep] MAC mode test: " >>test.log
  411. $(TCPPREP) $(ENABLE_DEBUG) -i test.pcap -o test.$@1 -e 00:02:3b:00:3d:ce 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. comment:
  415. $(PRINTF) "%s" "[tcpprep] Comment mode test: "
  416. $(PRINTF) "%s\n" "*** [tcpprep] Comment mode test: " >>test.log
  417. $(TCPPREP) $(ENABLE_DEBUG) -i test.pcap -o test.$@1 -C "This is a comment" -p 2>>test.log
  418. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  419. print_comment:
  420. $(PRINTF) "%s" "[tcpprep] Print comment mode test: "
  421. $(PRINTF) "%s\n" "*** [tcpprep] Print comment mode test: " >>test.log
  422. $(TCPPREP) $(ENABLE_DEBUG) -P test.comment >test.$@1 2>>test.log
  423. if [ $? ] ; then $(PRINTF) "\t%s\n" "FAILED"; else $(PRINTF) "\t%s\n" "OK"; fi
  424. print_info:
  425. $(PRINTF) "%s" "[tcpprep] Print info mode test: "
  426. $(PRINTF) "%s\n" "*** [tcpprep] Print info mode test: " >>test.log
  427. $(TCPPREP) $(ENABLE_DEBUG) -I test.comment >test.$@1 2>>test.log
  428. if [ $? ] ; then $(PRINTF) "\t%s\n" "FAILED"; else $(PRINTF) "\t%s\n" "OK"; fi
  429. replay_basic:
  430. $(PRINTF) "%s" "[tcpreplay] Basic test: "
  431. $(PRINTF) "%s\n" "*** [tcpreplay] Basic test: " >>test.log
  432. $(TCPREPLAY) $(ENABLE_DEBUG) -i $(nic1) -t test.pcap >>test.log 2>&1
  433. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  434. replay_cache:
  435. $(PRINTF) "%s" "[tcpreplay] Cache test: "
  436. $(PRINTF) "%s\n" "*** [tcpreplay] Cache test: " >>test.log
  437. $(TCPREPLAY) $(ENABLE_DEBUG) -c test.cidr -i $(nic1) -I $(nic2) -t test.pcap >>test.log 2>&1
  438. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  439. rewrite_portmap:
  440. $(PRINTF) "%s" "[tcprewrite] Portmap test: "
  441. $(PRINTF) "%s\n" "[tcprewrite] Portmap test: " >>test.log
  442. $(TCPREWRITE) $(ENABLE_DEBUG) -i test.pcap -o test.rewrite_portmap1 -r 80:8080 >>test.log 2>&1
  443. diff test.$@ test.$@1 >>test.log 2>&1
  444. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  445. rewrite_endpoint:
  446. $(PRINTF) "%s" "[tcprewrite] Endpoint test: "
  447. $(PRINTF) "%s\n" "[tcprewrite] Endpoint test: " >>test.log
  448. $(TCPREWRITE) $(ENABLE_DEBUG) -i test.pcap -o test.rewrite_endpoint1 -e 10.10.0.1:10.10.0.2
  449. diff test.$@ test.$@1 >>test.log 2>&1
  450. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  451. rewrite_pnat:
  452. $(PRINTF) "%s" "[tcprewrite] Pseudo NAT test: "
  453. $(PRINTF) "%s\n" "[tcprewrite] Pseudo NAT test: " >>test.log
  454. $(TCPREWRITE) $(ENABLE_DEBUG) -i test.pcap -o test.rewrite_pnat1 -N 216.27.178.0/24:172.16.0.0/24
  455. diff test.$@ test.$@1 >>test.log 2>&1
  456. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  457. rewrite_mac:
  458. $(PRINTF) "%s" "[tcprewrite] Src/Dst MAC test: "
  459. $(PRINTF) "%s\n" "[tcprewrite] Src/Dst MAC test: " >>test.log
  460. $(TCPREWRITE) $(ENABLE_DEBUG) -i test.pcap -o test.rewrite_mac1 \
  461. -D 00:12:13:14:15:16,00:22:33:44:55:66 \
  462. -S 00:22:33:44:55:66,00:12:13:14:15:16 -c test.auto_router
  463. diff test.$@ test.$@1 >>test.log 2>&1
  464. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  465. rewrite_trunc:
  466. $(PRINTF) "%s" "[tcprewrite] Truncate test: "
  467. $(PRINTF) "%s\n" "*** [tcprewrite] Truncate test: " >>test.log
  468. $(TCPREWRITE) $(ENABLE_DEBUG) -F trunc -i test.pcap -o test.rewrite_trunc1 >>test.log 2>&1
  469. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  470. rewrite_pad:
  471. $(PRINTF) "%s" "[tcprewrite] Pad test: "
  472. $(PRINTF) "%s\n" "*** [tcprewrite] Pad test: " >>test.log
  473. $(TCPREWRITE) $(ENABLE_DEBUG) -F pad -i test.pcap -o test.rewrite_pad1 >>test.log 2>&1
  474. diff test.$@ test.$@1 >>test.log 2>&1
  475. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  476. rewrite_seed:
  477. $(PRINTF) "%s" "[tcprewrite] Seed IP test: "
  478. $(PRINTF) "%s\n" "*** [tcprewrite] Seed IP test: " >>test.log
  479. $(TCPREWRITE) $(ENABLE_DEBUG) -i test.pcap -o test.rewrite_seed1 -s 55 >>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. rewrite_layer2:
  483. $(PRINTF) "%s" "[tcprewrite] Layer2 test: "
  484. $(PRINTF) "%s\n" "*** [tcprewrite] Layer2 test: " >>test.log
  485. $(TCPREWRITE) $(ENABLE_DEBUG) -l 00,50,da,5d,46,55,0,7,eb,30,a4,c3,08,0 \
  486. -i test.pcap -o test.rewrite_layer21 >>test.log 2>&1
  487. diff test.$@ test.$@1 >>test.log 2>&1
  488. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  489. rewrite_config:
  490. $(PRINTF) "%s" "[tcprewrite] Config test: "
  491. $(PRINTF) "%s\n" "*** [tcprewrite] Config test: " >>test.log
  492. $(TCPREWRITE) -i test.pcap -o test.rewrite_config1 --load-opts config
  493. diff test.$@ test.$@1 >>test.log 2>&1
  494. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  495. replay_pps:
  496. $(PRINTF) "%s" "[tcpreplay] Packets/sec test: "
  497. $(PRINTF) "%s\n" "*** [tcpreplay] Packets/sec test: " >>test.log
  498. $(TCPREPLAY) $(ENABLE_DEBUG) -i $(nic1) -p 25 test.pcap >>test.log 2>&1
  499. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  500. replay_rate:
  501. $(PRINTF) "%s" "[tcpreplay] Mbps test: "
  502. $(PRINTF) "%s\n" "*** [tcpreplay] Mbps test: " >>test.log
  503. $(TCPREPLAY) $(ENABLE_DEBUG) -i $(nic1) -M 25.0 test.pcap >>test.log 2>&1
  504. if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
  505. replay_multi:
  506. $(PRINTF) "%s" "[tcpreplay] Multiplier test: "
  507. $(PRINTF) "%s\n" "*** [tcpreplay] Multiplier test: " >>test.log
  508. $(TCPREPLAY) $(ENABLE_DEBUG) -i $(nic1) -m 25.0 test.pcap >>test.log 2>&1
  509. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  510. replay_top:
  511. $(PRINTF) "%s" "[tcpreplay] Topspeed test: "
  512. $(PRINTF) "%s\n" "*** [tcpreplay] Topspeed test: " >>test.log
  513. $(TCPREPLAY) $(ENABLE_DEBUG) -i $(nic1) -t test.pcap >>test.log 2>&1
  514. if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
  515. datadump_mode:
  516. $(PRINTF) "%s" "[tcpreplay] Data dump test: "
  517. $(PRINTF) "%s\n" "*** [tcpreplay] Data dump mode test: " >>test.log
  518. $(TCPREPLAY) $(ENABLE_DEBUG) -D -i $(nic1) -j $(nic2) -w primary.data -W secondary.data -c test.cidr -R test.pcap >>test.log 2>&1
  519. if [ $? ] ; then $(PRINTF) "\t%s\n" "FAILED"; else $(PRINTF) "\t%s\n" "OK"; fi
  520. replay_config:
  521. $(PRINTF) "%s" "[tcpreplay] Config file/VLAN add test: "
  522. $(PRINTF) "%s\n" "*** [tcpreplay] Config file/VLAN add test: " >>test.log
  523. $(TCPREPLAY) $(ENABLE_DEBUG) --load-opts=config test.pcap >>test.log 2>&1
  524. if [ $? ] ; then $(PRINTF) "\t%s\n" "FAILED"; else $(PRINTF) "\t%s\n" "OK"; fi
  525. clean:
  526. rm -f *1 test.log core* *~ primary.data secondary.data
  527. distclean: clean
  528. rm -f Makefile config
  529. maintainer-clean: distclean
  530. # Tell versions [3.59,3.63) of GNU make to not export all variables.
  531. # Otherwise a system limit (for SysV at least) may be exceeded.
  532. .NOEXPORT: