aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsmace <smace@FreeBSD.org>2002-04-16 04:03:51 +0800
committersmace <smace@FreeBSD.org>2002-04-16 04:03:51 +0800
commit2978d7f20d1a383ae8e2e1f3d7b13da92e422c86 (patch)
treebcd61b984d38e472c5b5a0e873bd56d77fc888e4
parent358b59d07c6e7475ed469a4e29c3ba8f55a9d36a (diff)
downloadfreebsd-ports-gnome-2978d7f20d1a383ae8e2e1f3d7b13da92e422c86.tar.gz
freebsd-ports-gnome-2978d7f20d1a383ae8e2e1f3d7b13da92e422c86.tar.zst
freebsd-ports-gnome-2978d7f20d1a383ae8e2e1f3d7b13da92e422c86.zip
Update tcpreplay with patch from Aaron Turner.
This includes tcpprep and multi-nic support.
-rw-r--r--net-mgmt/tcpreplay/Makefile14
-rw-r--r--net-mgmt/tcpreplay/distinfo1
-rw-r--r--net-mgmt/tcpreplay/files/patch-Makefile.in45
-rw-r--r--net-mgmt/tcpreplay/files/patch-configure.in28
-rw-r--r--net-mgmt/tcpreplay/files/patch-tcpreplay.c31
-rw-r--r--net-mgmt/tcpreplay/pkg-descr10
-rw-r--r--net-mgmt/tcpreplay/pkg-plist1
-rw-r--r--net/tcpreplay/Makefile14
-rw-r--r--net/tcpreplay/distinfo1
-rw-r--r--net/tcpreplay/files/patch-Makefile.in45
-rw-r--r--net/tcpreplay/files/patch-configure.in28
-rw-r--r--net/tcpreplay/files/patch-tcpreplay.c31
-rw-r--r--net/tcpreplay/pkg-descr10
-rw-r--r--net/tcpreplay/pkg-plist1
14 files changed, 94 insertions, 166 deletions
diff --git a/net-mgmt/tcpreplay/Makefile b/net-mgmt/tcpreplay/Makefile
index 730900a48d88..afcf6b6d7ab5 100644
--- a/net-mgmt/tcpreplay/Makefile
+++ b/net-mgmt/tcpreplay/Makefile
@@ -7,16 +7,24 @@
PORTNAME= tcpreplay
PORTVERSION= 1.0.1
+PORTREVISION= 1
CATEGORIES= net
-MASTER_SITES= http://synfin.net/aturner/tcpreplay/ \
- http://www.anzen.com/research/nidsbench/
+MASTER_SITES= http://synfin.net/aturner/tcpreplay/
+
+PATCH_SITES= http://synfin.net/aturner/tcpreplay/
+PATCHFILES= tcpreplay-adt9.patch.gz
+PATCH_DIST_STRIP= -p1
MAINTAINER= ports@FreeBSD.org
+LIB_DEPENDS= redblack:${PORTSDIR}/devel/libredblack
BUILD_DEPENDS= ${LOCALBASE}/lib/libnet.a:${PORTSDIR}/net/libnet
+GNU_CONFIGURE= yes
+CONFIGURE_ARGS+= --with-libnet=${PREFIX} --with-libredblack=${PREFIX}
+
USE_AUTOCONF= yes
-MAN8= tcpreplay.8
+MAN8= tcpreplay.8 tcpprep.8
.include <bsd.port.mk>
diff --git a/net-mgmt/tcpreplay/distinfo b/net-mgmt/tcpreplay/distinfo
index b5ba6a8f4ff4..5288fbc89957 100644
--- a/net-mgmt/tcpreplay/distinfo
+++ b/net-mgmt/tcpreplay/distinfo
@@ -1 +1,2 @@
MD5 (tcpreplay-1.0.1.tar.gz) = 4b9335761e9202abfc175c06b169e991
+MD5 (tcpreplay-adt9.patch.gz) = 22bb5970284ca27a6e89222399721e0c
diff --git a/net-mgmt/tcpreplay/files/patch-Makefile.in b/net-mgmt/tcpreplay/files/patch-Makefile.in
index a54081d50383..e8b98ef6efc1 100644
--- a/net-mgmt/tcpreplay/files/patch-Makefile.in
+++ b/net-mgmt/tcpreplay/files/patch-Makefile.in
@@ -1,45 +1,32 @@
---- Makefile.in.orig Thu Apr 22 07:16:41 1999
-+++ Makefile.in Thu Jan 18 01:05:19 2001
-@@ -9,22 +9,23 @@
- CC = @CC@
+--- Makefile.in.orig Mon Apr 15 14:13:06 2002
++++ Makefile.in Mon Apr 15 14:15:49 2002
+@@ -10,10 +10,11 @@
CFLAGS = @CFLAGS@
+ #CFLAGS = -ggdb -pipe -Wall
LDFLAGS = @LDFLAGS@
--DEFS = @DEFS@
+-DEFS = @DEFS@
+DEFS = @DEFS@ `libnet-config --defines`
- INCS = $(LNETINCS) $(PCAPINCS)
- LIBS = @LIBS@ $(LNETLIBS) $(PCAPLIBS)
-
+ LIBS = @LIBS@ @LNETLIB@ @REDBLACKLIB@ @PCAPLIB@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+ INCS = @LNETINC@ @REDBLACKINC@ @PCAPINC@
+ LIBRARIES = tree cache cidr
--PCAPDIR = libpcap-0.4
--PCAPINCS = -I$(PCAPDIR)
--PCAPLIBS = -L$(PCAPDIR) -lpcap
--PCAPDEP = $(PCAPDIR)/pcap.h $(PCAPDIR)/libpcap.a
-+# PCAPDIR = libpcap-0.4
-+# PCAPINCS = -I$(PCAPDIR)
-+PCAPLIBS = -lpcap
-+# PCAPDEP = $(PCAPDIR)/pcap.h $(PCAPDIR)/libpcap.a
-
--LNETDIR = Libnet-0.99
-+LNETDIR = ${LOCALBASE}
- LNETINCS = -I$(LNETDIR)/include
--LNETLIBS = -L$(LNETDIR)/lib -lnet
--LNETDEP = $(LNETDIR)/include/libnet.h $(LNETDIR)/libnet.a
-+LNETLIBS = -L$(LNETDIR)/lib `libnet-config --libs`
-+# LNETDEP = $(LNETDIR)/include/libnet.h $(LNETDIR)/libnet.a
-
- PROGRAMS = tcpreplay
-
-@@ -51,8 +52,8 @@
+@@ -53,12 +54,10 @@
rm -f Makefile config.h config.status config.cache config.log
install:
+- $(INSTALL_PROGRAM) -m 755 -d $(SBINDIR)
+- $(INSTALL_PROGRAM) -m 755 -d $(MANDIR)
- $(INSTALL_PROGRAM) -m 755 tcpreplay $(SBINDIR)
-- $(INSTALL) -m 644 tcpreplay.8 $(MANDIR)
+- $(INSTALL_PROGRAM) -m 755 tcpprep $(SBINDIR)
+- $(INSTALL_PROGRAM) -m 644 tcpreplay.8 $(MANDIR)
+- $(INSTALL_PROGRAM) -m 644 tcpprep.8 $(MANDIR)
+ $(INSTALL_PROGRAM) tcpreplay $(SBINDIR)
++ $(INSTALL_PROGRAM) tcpprep $(SBINDIR)
+ $(INSTALL_DATA) tcpreplay.8 $(MANDIR)
++ $(INSTALL_DATA) tcpprep.8 $(MANDIR)
uninstall:
rm -f $(SBINDIR)/tcpreplay
diff --git a/net-mgmt/tcpreplay/files/patch-configure.in b/net-mgmt/tcpreplay/files/patch-configure.in
index b3ff9a2b4fec..c4b923a297ed 100644
--- a/net-mgmt/tcpreplay/files/patch-configure.in
+++ b/net-mgmt/tcpreplay/files/patch-configure.in
@@ -1,25 +1,15 @@
---- configure.in.orig Thu May 20 04:55:28 1999
-+++ configure.in Thu Jan 18 01:02:11 2001
-@@ -8,13 +8,6 @@
- AC_PROG_INSTALL
- AC_PROG_MAKE_SET
+--- configure.in.orig Mon Apr 15 14:20:18 2002
++++ configure.in Mon Apr 15 14:20:52 2002
+@@ -20,12 +20,6 @@
+ [ --with-debug Enable debugging code and support for the -d option],
+ AC_DEFINE(DEBUG) AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
-dnl Use these compiler flags if we have gcc.
--dnl
-if test $ac_cv_prog_gcc = yes; then
-- CCOPTS='-O3 -pipe -Wall'
+- CCOPTS='-O2 -pipe -Wall'
- CFLAGS="$CCOPTS"
-fi
-
- dnl Checks for libraries.
- AC_CHECK_LIB(socket, socket)
- AC_CHECK_LIB(nsl, gethostbyname)
-@@ -28,8 +21,6 @@
-
- dnl Checks for library functions.
- AC_CHECK_FUNCS(gettimeofday)
--
--AC_CONFIG_SUBDIRS(Libnet-0.99 libpcap-0.4)
-
- AC_CONFIG_HEADER(config.h)
- AC_OUTPUT(Makefile)
+ dnl Checks for libnet
+ AC_ARG_WITH(libnet,
+ [ --with-libnet=DIR use libnet in DIR/lib],
diff --git a/net-mgmt/tcpreplay/files/patch-tcpreplay.c b/net-mgmt/tcpreplay/files/patch-tcpreplay.c
deleted file mode 100644
index 1b49c631bfaf..000000000000
--- a/net-mgmt/tcpreplay/files/patch-tcpreplay.c
+++ /dev/null
@@ -1,31 +0,0 @@
---- tcpreplay.c.orig Wed May 19 13:00:35 1999
-+++ tcpreplay.c Thu Nov 2 17:58:27 2000
-@@ -229,8 +229,8 @@
- }
-
- while (write_status < 0) {
-- write_status = write_link_layer((struct link_int *)user, interface,
-- data,pcap_hdr->caplen);
-+ write_status = libnet_write_link_layer((struct libnet_link_int *)user,
-+ interface,data,pcap_hdr->caplen);
- #ifdef DEBUG
- if (debug > 1) {
- fprintf(stderr, "write_status = %i\n", write_status);
-@@ -255,7 +255,7 @@
- int main(int argc, char * argv[])
- {
- pcap_t * in_file;
-- struct link_int * write_if;
-+ struct libnet_link_int * write_if;
- float Mrate = 0;
- double starttime_local, startusec;
- char ebuf[256];
-@@ -327,7 +327,7 @@
- failed_writes = 0;
- pkts_sent = 0;
- bytes_sent = 0;
-- write_if = open_link_interface(interface,ebuf);
-+ write_if = libnet_open_link_interface(interface,ebuf);
- if (write_if <= 0) {
- fprintf(stderr, "output i/f: %s\n",ebuf);
- exit(1);
diff --git a/net-mgmt/tcpreplay/pkg-descr b/net-mgmt/tcpreplay/pkg-descr
index c63b49408891..4740f222ec7b 100644
--- a/net-mgmt/tcpreplay/pkg-descr
+++ b/net-mgmt/tcpreplay/pkg-descr
@@ -11,4 +11,12 @@ reproduce the real-world anomalies that appear on production networks
etc.), tcpreplay allows for exact replication of real traffic seen on real
networks.
-WWW: http://www.anzen.com/research/nidsbench/
+Tcpprep is tcpreplay with patches can send traffic out two network cards,
+however it requires the calculations be done in real-time. These calculations
+can be expensive and can significantly reduce the throughput of tcpreplay.
+
+tcpprep is a libpcap pre-processor for tcpreplay which enables this
+feature in tcpreplay, and significantly increases throughput through
+the use of a cache file.
+
+WWW: http://synfin.net/aturner/tcpreplay/
diff --git a/net-mgmt/tcpreplay/pkg-plist b/net-mgmt/tcpreplay/pkg-plist
index 69ef82f2515c..bc8e8a336ae8 100644
--- a/net-mgmt/tcpreplay/pkg-plist
+++ b/net-mgmt/tcpreplay/pkg-plist
@@ -1 +1,2 @@
sbin/tcpreplay
+sbin/tcpprep
diff --git a/net/tcpreplay/Makefile b/net/tcpreplay/Makefile
index 730900a48d88..afcf6b6d7ab5 100644
--- a/net/tcpreplay/Makefile
+++ b/net/tcpreplay/Makefile
@@ -7,16 +7,24 @@
PORTNAME= tcpreplay
PORTVERSION= 1.0.1
+PORTREVISION= 1
CATEGORIES= net
-MASTER_SITES= http://synfin.net/aturner/tcpreplay/ \
- http://www.anzen.com/research/nidsbench/
+MASTER_SITES= http://synfin.net/aturner/tcpreplay/
+
+PATCH_SITES= http://synfin.net/aturner/tcpreplay/
+PATCHFILES= tcpreplay-adt9.patch.gz
+PATCH_DIST_STRIP= -p1
MAINTAINER= ports@FreeBSD.org
+LIB_DEPENDS= redblack:${PORTSDIR}/devel/libredblack
BUILD_DEPENDS= ${LOCALBASE}/lib/libnet.a:${PORTSDIR}/net/libnet
+GNU_CONFIGURE= yes
+CONFIGURE_ARGS+= --with-libnet=${PREFIX} --with-libredblack=${PREFIX}
+
USE_AUTOCONF= yes
-MAN8= tcpreplay.8
+MAN8= tcpreplay.8 tcpprep.8
.include <bsd.port.mk>
diff --git a/net/tcpreplay/distinfo b/net/tcpreplay/distinfo
index b5ba6a8f4ff4..5288fbc89957 100644
--- a/net/tcpreplay/distinfo
+++ b/net/tcpreplay/distinfo
@@ -1 +1,2 @@
MD5 (tcpreplay-1.0.1.tar.gz) = 4b9335761e9202abfc175c06b169e991
+MD5 (tcpreplay-adt9.patch.gz) = 22bb5970284ca27a6e89222399721e0c
diff --git a/net/tcpreplay/files/patch-Makefile.in b/net/tcpreplay/files/patch-Makefile.in
index a54081d50383..e8b98ef6efc1 100644
--- a/net/tcpreplay/files/patch-Makefile.in
+++ b/net/tcpreplay/files/patch-Makefile.in
@@ -1,45 +1,32 @@
---- Makefile.in.orig Thu Apr 22 07:16:41 1999
-+++ Makefile.in Thu Jan 18 01:05:19 2001
-@@ -9,22 +9,23 @@
- CC = @CC@
+--- Makefile.in.orig Mon Apr 15 14:13:06 2002
++++ Makefile.in Mon Apr 15 14:15:49 2002
+@@ -10,10 +10,11 @@
CFLAGS = @CFLAGS@
+ #CFLAGS = -ggdb -pipe -Wall
LDFLAGS = @LDFLAGS@
--DEFS = @DEFS@
+-DEFS = @DEFS@
+DEFS = @DEFS@ `libnet-config --defines`
- INCS = $(LNETINCS) $(PCAPINCS)
- LIBS = @LIBS@ $(LNETLIBS) $(PCAPLIBS)
-
+ LIBS = @LIBS@ @LNETLIB@ @REDBLACKLIB@ @PCAPLIB@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+ INCS = @LNETINC@ @REDBLACKINC@ @PCAPINC@
+ LIBRARIES = tree cache cidr
--PCAPDIR = libpcap-0.4
--PCAPINCS = -I$(PCAPDIR)
--PCAPLIBS = -L$(PCAPDIR) -lpcap
--PCAPDEP = $(PCAPDIR)/pcap.h $(PCAPDIR)/libpcap.a
-+# PCAPDIR = libpcap-0.4
-+# PCAPINCS = -I$(PCAPDIR)
-+PCAPLIBS = -lpcap
-+# PCAPDEP = $(PCAPDIR)/pcap.h $(PCAPDIR)/libpcap.a
-
--LNETDIR = Libnet-0.99
-+LNETDIR = ${LOCALBASE}
- LNETINCS = -I$(LNETDIR)/include
--LNETLIBS = -L$(LNETDIR)/lib -lnet
--LNETDEP = $(LNETDIR)/include/libnet.h $(LNETDIR)/libnet.a
-+LNETLIBS = -L$(LNETDIR)/lib `libnet-config --libs`
-+# LNETDEP = $(LNETDIR)/include/libnet.h $(LNETDIR)/libnet.a
-
- PROGRAMS = tcpreplay
-
-@@ -51,8 +52,8 @@
+@@ -53,12 +54,10 @@
rm -f Makefile config.h config.status config.cache config.log
install:
+- $(INSTALL_PROGRAM) -m 755 -d $(SBINDIR)
+- $(INSTALL_PROGRAM) -m 755 -d $(MANDIR)
- $(INSTALL_PROGRAM) -m 755 tcpreplay $(SBINDIR)
-- $(INSTALL) -m 644 tcpreplay.8 $(MANDIR)
+- $(INSTALL_PROGRAM) -m 755 tcpprep $(SBINDIR)
+- $(INSTALL_PROGRAM) -m 644 tcpreplay.8 $(MANDIR)
+- $(INSTALL_PROGRAM) -m 644 tcpprep.8 $(MANDIR)
+ $(INSTALL_PROGRAM) tcpreplay $(SBINDIR)
++ $(INSTALL_PROGRAM) tcpprep $(SBINDIR)
+ $(INSTALL_DATA) tcpreplay.8 $(MANDIR)
++ $(INSTALL_DATA) tcpprep.8 $(MANDIR)
uninstall:
rm -f $(SBINDIR)/tcpreplay
diff --git a/net/tcpreplay/files/patch-configure.in b/net/tcpreplay/files/patch-configure.in
index b3ff9a2b4fec..c4b923a297ed 100644
--- a/net/tcpreplay/files/patch-configure.in
+++ b/net/tcpreplay/files/patch-configure.in
@@ -1,25 +1,15 @@
---- configure.in.orig Thu May 20 04:55:28 1999
-+++ configure.in Thu Jan 18 01:02:11 2001
-@@ -8,13 +8,6 @@
- AC_PROG_INSTALL
- AC_PROG_MAKE_SET
+--- configure.in.orig Mon Apr 15 14:20:18 2002
++++ configure.in Mon Apr 15 14:20:52 2002
+@@ -20,12 +20,6 @@
+ [ --with-debug Enable debugging code and support for the -d option],
+ AC_DEFINE(DEBUG) AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
-dnl Use these compiler flags if we have gcc.
--dnl
-if test $ac_cv_prog_gcc = yes; then
-- CCOPTS='-O3 -pipe -Wall'
+- CCOPTS='-O2 -pipe -Wall'
- CFLAGS="$CCOPTS"
-fi
-
- dnl Checks for libraries.
- AC_CHECK_LIB(socket, socket)
- AC_CHECK_LIB(nsl, gethostbyname)
-@@ -28,8 +21,6 @@
-
- dnl Checks for library functions.
- AC_CHECK_FUNCS(gettimeofday)
--
--AC_CONFIG_SUBDIRS(Libnet-0.99 libpcap-0.4)
-
- AC_CONFIG_HEADER(config.h)
- AC_OUTPUT(Makefile)
+ dnl Checks for libnet
+ AC_ARG_WITH(libnet,
+ [ --with-libnet=DIR use libnet in DIR/lib],
diff --git a/net/tcpreplay/files/patch-tcpreplay.c b/net/tcpreplay/files/patch-tcpreplay.c
deleted file mode 100644
index 1b49c631bfaf..000000000000
--- a/net/tcpreplay/files/patch-tcpreplay.c
+++ /dev/null
@@ -1,31 +0,0 @@
---- tcpreplay.c.orig Wed May 19 13:00:35 1999
-+++ tcpreplay.c Thu Nov 2 17:58:27 2000
-@@ -229,8 +229,8 @@
- }
-
- while (write_status < 0) {
-- write_status = write_link_layer((struct link_int *)user, interface,
-- data,pcap_hdr->caplen);
-+ write_status = libnet_write_link_layer((struct libnet_link_int *)user,
-+ interface,data,pcap_hdr->caplen);
- #ifdef DEBUG
- if (debug > 1) {
- fprintf(stderr, "write_status = %i\n", write_status);
-@@ -255,7 +255,7 @@
- int main(int argc, char * argv[])
- {
- pcap_t * in_file;
-- struct link_int * write_if;
-+ struct libnet_link_int * write_if;
- float Mrate = 0;
- double starttime_local, startusec;
- char ebuf[256];
-@@ -327,7 +327,7 @@
- failed_writes = 0;
- pkts_sent = 0;
- bytes_sent = 0;
-- write_if = open_link_interface(interface,ebuf);
-+ write_if = libnet_open_link_interface(interface,ebuf);
- if (write_if <= 0) {
- fprintf(stderr, "output i/f: %s\n",ebuf);
- exit(1);
diff --git a/net/tcpreplay/pkg-descr b/net/tcpreplay/pkg-descr
index c63b49408891..4740f222ec7b 100644
--- a/net/tcpreplay/pkg-descr
+++ b/net/tcpreplay/pkg-descr
@@ -11,4 +11,12 @@ reproduce the real-world anomalies that appear on production networks
etc.), tcpreplay allows for exact replication of real traffic seen on real
networks.
-WWW: http://www.anzen.com/research/nidsbench/
+Tcpprep is tcpreplay with patches can send traffic out two network cards,
+however it requires the calculations be done in real-time. These calculations
+can be expensive and can significantly reduce the throughput of tcpreplay.
+
+tcpprep is a libpcap pre-processor for tcpreplay which enables this
+feature in tcpreplay, and significantly increases throughput through
+the use of a cache file.
+
+WWW: http://synfin.net/aturner/tcpreplay/
diff --git a/net/tcpreplay/pkg-plist b/net/tcpreplay/pkg-plist
index 69ef82f2515c..bc8e8a336ae8 100644
--- a/net/tcpreplay/pkg-plist
+++ b/net/tcpreplay/pkg-plist
@@ -1 +1,2 @@
sbin/tcpreplay
+sbin/tcpprep