Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Nov 2000 18:19:13 -0800 (PST)
From:      "Christopher N. Harrell" <cnh@hal9000.ivmg.net>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/22558: new port -- net/tcpreplay
Message-ID:  <200011030219.eA32JDA89954@hal9000.ivmg.net>

next in thread | raw e-mail | index | archive | help

>Number:         22558
>Category:       ports
>Synopsis:       new port -- net/tcpreplay
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Nov 02 18:20:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Christopher N. Harrell
>Release:        FreeBSD 4.1.1-RELEASE i386
>Organization:
iVMG, Inc.
>Environment:

>Description:

>How-To-Repeat:

>Fix:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	tcpreplay
#	tcpreplay/Makefile
#	tcpreplay/files
#	tcpreplay/files/patch-Makefile.in
#	tcpreplay/files/patch-configure.in
#	tcpreplay/files/patch-tcpreplay.c
#	tcpreplay/distinfo
#	tcpreplay/pkg-comment
#	tcpreplay/pkg-descr
#	tcpreplay/pkg-plist
#
echo c - tcpreplay
mkdir -p tcpreplay > /dev/null 2>&1
echo x - tcpreplay/Makefile
sed 's/^X//' >tcpreplay/Makefile << 'END-of-tcpreplay/Makefile'
X# New ports collection makefile for:   tcpreplay
X# Date created:        2 November 2000
X# Whom:                cnh@ivmg.net
X#
X# $FreeBSD$
X#
X
XPORTNAME=		tcpreplay
XPORTVERSION=		1.0.1
XCATEGORIES=		net
XMASTER_SITES=		http://www.anzen.com/research/nidsbench/
X
XMAINTAINER=		ports@freebsd.org
X
XBUILD_DEPENDS=		${LOCALBASE}/lib/libnet.a:${PORTSDIR}/net/libnet
X
XUSE_AUTOCONF=		yes
XGNU_CONFIGURE=		yes
XEXTRACT_AFTER_ARGS=	| ${TAR} -xf - --exclude */libpcap-* --exclude */Libnet-*
X
XMAN8=			tcpreplay.8
X
X.include <bsd.port.mk>
END-of-tcpreplay/Makefile
echo c - tcpreplay/files
mkdir -p tcpreplay/files > /dev/null 2>&1
echo x - tcpreplay/files/patch-Makefile.in
sed 's/^X//' >tcpreplay/files/patch-Makefile.in << 'END-of-tcpreplay/files/patch-Makefile.in'
X--- Makefile.in.orig	Thu Nov  2 18:01:53 2000
X+++ Makefile.in	Thu Nov  2 18:04:49 2000
X@@ -9,22 +9,22 @@
X CC		= @CC@
X CFLAGS		= @CFLAGS@
X LDFLAGS		= @LDFLAGS@
X-DEFS		= @DEFS@
X+DEFS		= @DEFS@ `libnet-config --defines`
X INCS		= $(LNETINCS) $(PCAPINCS)
X LIBS		= @LIBS@ $(LNETLIBS) $(PCAPLIBS)
X 
X INSTALL		= @INSTALL@
X INSTALL_PROGRAM	= @INSTALL_PROGRAM@
X 
X-PCAPDIR		= libpcap-0.4
X-PCAPINCS	= -I$(PCAPDIR)
X-PCAPLIBS	= -L$(PCAPDIR) -lpcap
X-PCAPDEP		= $(PCAPDIR)/pcap.h $(PCAPDIR)/libpcap.a
X+# PCAPDIR		= libpcap-0.4
X+# PCAPINCS	= -I$(PCAPDIR)
X+PCAPLIBS	= -lpcap
X+# PCAPDEP		= $(PCAPDIR)/pcap.h $(PCAPDIR)/libpcap.a
X 
X-LNETDIR		= Libnet-0.99
X-LNETINCS	= -I$(LNETDIR)/include
X-LNETLIBS	= -L$(LNETDIR)/lib -lnet
X-LNETDEP		= $(LNETDIR)/include/libnet.h $(LNETDIR)/libnet.a
X+# LNETDIR		= Libnet-0.99
X+LNETINCS	= -I$(PREFIX)/include
X+LNETLIBS	= -L$(PREFIX)/lib `libnet-config --libs`
X+# LNETDEP		= $(LNETDIR)/include/libnet.h $(LNETDIR)/libnet.a
X 
X PROGRAMS	= tcpreplay
X 
END-of-tcpreplay/files/patch-Makefile.in
echo x - tcpreplay/files/patch-configure.in
sed 's/^X//' >tcpreplay/files/patch-configure.in << 'END-of-tcpreplay/files/patch-configure.in'
X--- configure.in.orig	Thu Nov  2 16:18:38 2000
X+++ configure.in	Thu Nov  2 16:18:52 2000
X@@ -29,7 +29,5 @@
X dnl Checks for library functions.
X AC_CHECK_FUNCS(gettimeofday)
X 
X-AC_CONFIG_SUBDIRS(Libnet-0.99 libpcap-0.4)
X-
X AC_CONFIG_HEADER(config.h)
X AC_OUTPUT(Makefile)
END-of-tcpreplay/files/patch-configure.in
echo x - tcpreplay/files/patch-tcpreplay.c
sed 's/^X//' >tcpreplay/files/patch-tcpreplay.c << 'END-of-tcpreplay/files/patch-tcpreplay.c'
X--- tcpreplay.c.orig	Wed May 19 13:00:35 1999
X+++ tcpreplay.c	Thu Nov  2 17:58:27 2000
X@@ -229,8 +229,8 @@
X   }
X 
X   while (write_status < 0) {
X-    write_status = write_link_layer((struct link_int *)user, interface,
X-				    data,pcap_hdr->caplen);
X+    write_status = libnet_write_link_layer((struct libnet_link_int *)user,
X+				    interface,data,pcap_hdr->caplen);
X #ifdef DEBUG
X     if (debug > 1) {
X       fprintf(stderr, "write_status = %i\n", write_status);
X@@ -255,7 +255,7 @@
X int main(int argc, char * argv[])
X {
X   pcap_t * in_file;
X-  struct link_int * write_if;
X+  struct libnet_link_int * write_if;
X   float Mrate = 0;
X   double starttime_local, startusec;
X   char ebuf[256];
X@@ -327,7 +327,7 @@
X   failed_writes  = 0;
X   pkts_sent = 0;
X   bytes_sent = 0;
X-  write_if = open_link_interface(interface,ebuf);
X+  write_if = libnet_open_link_interface(interface,ebuf);
X   if (write_if <= 0) {
X     fprintf(stderr, "output i/f: %s\n",ebuf);
X     exit(1);
END-of-tcpreplay/files/patch-tcpreplay.c
echo x - tcpreplay/distinfo
sed 's/^X//' >tcpreplay/distinfo << 'END-of-tcpreplay/distinfo'
XMD5 (tcpreplay-1.0.1.tar.gz) = 4b9335761e9202abfc175c06b169e991
END-of-tcpreplay/distinfo
echo x - tcpreplay/pkg-comment
sed 's/^X//' >tcpreplay/pkg-comment << 'END-of-tcpreplay/pkg-comment'
Xresend libpcap saved files (ala tcpdump -w)
END-of-tcpreplay/pkg-comment
echo x - tcpreplay/pkg-descr
sed 's/^X//' >tcpreplay/pkg-descr << 'END-of-tcpreplay/pkg-descr'
XTcpreplay is aimed at testing the performance of a Network Intrusion Detection
XSystem by replaying real background network traffic in which to hide attacks.
X
XTcpreplay allows you to control the speed at which the traffic is replayed,
Xand can replay arbitrary libpcap traces.
X
XUnlike programmatically-generated artificial traffic which doesn't exercise
Xthe application/protocol inspection that a NIDS performs, and doesn't
Xreproduce the real-world anomalies that appear on production networks
X(asymmetric routes, traffic bursts/lulls, fragmentation, retransmissions,
Xetc.), tcpreplay allows for exact replication of real traffic seen on real
Xnetworks. 
X
XWWW: http://www.anzen.com/research/nidsbench/
END-of-tcpreplay/pkg-descr
echo x - tcpreplay/pkg-plist
sed 's/^X//' >tcpreplay/pkg-plist << 'END-of-tcpreplay/pkg-plist'
Xsbin/tcpreplay
END-of-tcpreplay/pkg-plist
exit

>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200011030219.eA32JDA89954>