summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorMike Smith <msmith@FreeBSD.org>2000-11-29 02:29:03 +0000
committerMike Smith <msmith@FreeBSD.org>2000-11-29 02:29:03 +0000
commitc2b3abb02fe7382558662bbb890f03d863bea2f1 (patch)
treec7c75c57a3b22c9b47ed2b90b9b5076b2def4d69 /net
parentReduce the HTTP traffic on freefall. Move MASTERS_SITES (diff)
tcpreplay - a *working* libpcap trace file replay tool
Submitted by: "Christopher N. Harrell" <cnh@ivmg.net>
Diffstat (limited to 'net')
-rw-r--r--net/Makefile1
-rw-r--r--net/tcpreplay/Makefile23
-rw-r--r--net/tcpreplay/distinfo1
-rw-r--r--net/tcpreplay/files/patch-Makefile.in34
-rw-r--r--net/tcpreplay/files/patch-configure.in10
-rw-r--r--net/tcpreplay/files/patch-tcpreplay.c31
-rw-r--r--net/tcpreplay/pkg-comment1
-rw-r--r--net/tcpreplay/pkg-descr14
-rw-r--r--net/tcpreplay/pkg-plist1
9 files changed, 116 insertions, 0 deletions
diff --git a/net/Makefile b/net/Makefile
index f7a3ac32dfb9..565c1562d4c3 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -261,6 +261,7 @@
SUBDIR += tcpflow
SUBDIR += tcpillust
SUBDIR += tcpmssd
+ SUBDIR += tcpreplay
SUBDIR += tcpshow
SUBDIR += tcptrace
SUBDIR += tcserver
diff --git a/net/tcpreplay/Makefile b/net/tcpreplay/Makefile
new file mode 100644
index 000000000000..c943993c37c7
--- /dev/null
+++ b/net/tcpreplay/Makefile
@@ -0,0 +1,23 @@
+# New ports collection makefile for: tcpreplay
+# Date created: 2 November 2000
+# Whom: cnh@ivmg.net
+#
+# $FreeBSD$
+#
+
+PORTNAME= tcpreplay
+PORTVERSION= 1.0.1
+CATEGORIES= net
+MASTER_SITES= http://www.anzen.com/research/nidsbench/
+
+MAINTAINER= ports@freebsd.org
+
+BUILD_DEPENDS= ${LOCALBASE}/lib/libnet.a:${PORTSDIR}/net/libnet
+
+USE_AUTOCONF= yes
+GNU_CONFIGURE= yes
+EXTRACT_AFTER_ARGS= | ${TAR} -xf - --exclude */libpcap-* --exclude */Libnet-*
+
+MAN8= tcpreplay.8
+
+.include <bsd.port.mk>
diff --git a/net/tcpreplay/distinfo b/net/tcpreplay/distinfo
new file mode 100644
index 000000000000..b5ba6a8f4ff4
--- /dev/null
+++ b/net/tcpreplay/distinfo
@@ -0,0 +1 @@
+MD5 (tcpreplay-1.0.1.tar.gz) = 4b9335761e9202abfc175c06b169e991
diff --git a/net/tcpreplay/files/patch-Makefile.in b/net/tcpreplay/files/patch-Makefile.in
new file mode 100644
index 000000000000..4a4c01002a10
--- /dev/null
+++ b/net/tcpreplay/files/patch-Makefile.in
@@ -0,0 +1,34 @@
+--- Makefile.in.orig Thu Nov 2 18:01:53 2000
++++ Makefile.in Thu Nov 2 18:04:49 2000
+@@ -9,22 +9,22 @@
+ CC = @CC@
+ CFLAGS = @CFLAGS@
+ LDFLAGS = @LDFLAGS@
+-DEFS = @DEFS@
++DEFS = @DEFS@ `libnet-config --defines`
+ INCS = $(LNETINCS) $(PCAPINCS)
+ LIBS = @LIBS@ $(LNETLIBS) $(PCAPLIBS)
+
+ INSTALL = @INSTALL@
+ INSTALL_PROGRAM = @INSTALL_PROGRAM@
+
+-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
+-LNETINCS = -I$(LNETDIR)/include
+-LNETLIBS = -L$(LNETDIR)/lib -lnet
+-LNETDEP = $(LNETDIR)/include/libnet.h $(LNETDIR)/libnet.a
++# LNETDIR = Libnet-0.99
++LNETINCS = -I$(PREFIX)/include
++LNETLIBS = -L$(PREFIX)/lib `libnet-config --libs`
++# LNETDEP = $(LNETDIR)/include/libnet.h $(LNETDIR)/libnet.a
+
+ PROGRAMS = tcpreplay
+
diff --git a/net/tcpreplay/files/patch-configure.in b/net/tcpreplay/files/patch-configure.in
new file mode 100644
index 000000000000..91888f2fb4a2
--- /dev/null
+++ b/net/tcpreplay/files/patch-configure.in
@@ -0,0 +1,10 @@
+--- configure.in.orig Thu Nov 2 16:18:38 2000
++++ configure.in Thu Nov 2 16:18:52 2000
+@@ -29,7 +29,5 @@
+ 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)
diff --git a/net/tcpreplay/files/patch-tcpreplay.c b/net/tcpreplay/files/patch-tcpreplay.c
new file mode 100644
index 000000000000..1b49c631bfaf
--- /dev/null
+++ b/net/tcpreplay/files/patch-tcpreplay.c
@@ -0,0 +1,31 @@
+--- 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-comment b/net/tcpreplay/pkg-comment
new file mode 100644
index 000000000000..d24bbf51cf65
--- /dev/null
+++ b/net/tcpreplay/pkg-comment
@@ -0,0 +1 @@
+resend libpcap saved files (ala tcpdump -w)
diff --git a/net/tcpreplay/pkg-descr b/net/tcpreplay/pkg-descr
new file mode 100644
index 000000000000..c63b49408891
--- /dev/null
+++ b/net/tcpreplay/pkg-descr
@@ -0,0 +1,14 @@
+Tcpreplay is aimed at testing the performance of a Network Intrusion Detection
+System by replaying real background network traffic in which to hide attacks.
+
+Tcpreplay allows you to control the speed at which the traffic is replayed,
+and can replay arbitrary libpcap traces.
+
+Unlike programmatically-generated artificial traffic which doesn't exercise
+the application/protocol inspection that a NIDS performs, and doesn't
+reproduce the real-world anomalies that appear on production networks
+(asymmetric routes, traffic bursts/lulls, fragmentation, retransmissions,
+etc.), tcpreplay allows for exact replication of real traffic seen on real
+networks.
+
+WWW: http://www.anzen.com/research/nidsbench/
diff --git a/net/tcpreplay/pkg-plist b/net/tcpreplay/pkg-plist
new file mode 100644
index 000000000000..69ef82f2515c
--- /dev/null
+++ b/net/tcpreplay/pkg-plist
@@ -0,0 +1 @@
+sbin/tcpreplay