Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Jul 2013 21:37:47 +0000 (UTC)
From:      Hiroki Sato <hrs@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r323362 - in head/net: . packetdrill packetdrill/files
Message-ID:  <201307202137.r6KLbl5l042399@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hrs
Date: Sat Jul 20 21:37:46 2013
New Revision: 323362
URL: http://svnweb.freebsd.org/changeset/ports/323362

Log:
  Add net/packetdrill, a network stack testing tool.
  
  The packetdrill scripting tool enables quick, precise tests for entire
  TCP/UDP/IPv4/IPv6 network stacks, from the system call layer down to
  the NIC hardware. packetdrill currently works on Linux, FreeBSD,
  OpenBSD, and NetBSD. It can test network stack behavior over physical
  NICs on a LAN, or on a single machine using a tun virtual network
  device.

Added:
  head/net/packetdrill/
  head/net/packetdrill/Makefile   (contents, props changed)
  head/net/packetdrill/distinfo   (contents, props changed)
  head/net/packetdrill/files/
  head/net/packetdrill/files/Makefile   (contents, props changed)
  head/net/packetdrill/files/Makefile.checksum_test   (contents, props changed)
  head/net/packetdrill/files/Makefile.inc   (contents, props changed)
  head/net/packetdrill/files/Makefile.libpd   (contents, props changed)
  head/net/packetdrill/files/Makefile.packet_parser_test   (contents, props changed)
  head/net/packetdrill/files/Makefile.packet_to_string_test   (contents, props changed)
  head/net/packetdrill/files/Makefile.packetdrill   (contents, props changed)
  head/net/packetdrill/pkg-descr   (contents, props changed)
  head/net/packetdrill/pkg-plist   (contents, props changed)
Modified:
  head/net/Makefile

Modified: head/net/Makefile
==============================================================================
--- head/net/Makefile	Sat Jul 20 21:34:14 2013	(r323361)
+++ head/net/Makefile	Sat Jul 20 21:37:46 2013	(r323362)
@@ -789,6 +789,7 @@
     SUBDIR += p5-ZConf-Bookmarks
     SUBDIR += p5-ZeroMQ
     SUBDIR += p5-perl-ldap
+    SUBDIR += packetdrill
     SUBDIR += packter-agent
     SUBDIR += panoptis
     SUBDIR += paris-traceroute

Added: head/net/packetdrill/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/packetdrill/Makefile	Sat Jul 20 21:37:46 2013	(r323362)
@@ -0,0 +1,43 @@
+# $FreeBSD$
+
+PORTNAME=	packetdrill
+PORTVERSION=	0.0.20130626
+CATEGORIES=	net ipv6
+MASTER_SITES=	LOCAL/hrs
+DISTNAME=	${PORTNAME}-77954df72a78
+
+MAINTAINER=	hrs@FreeBSD.org
+COMMENT=	Network stack testing tool
+
+LICENSE=	GPLv2
+
+USES=		bison
+MAKE_ENV+=	PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
+		PTHREAD_LIBS="${PTHREAD_LIBS}"
+MAKE_JOBS_SAFE=	yes
+PORTDOCS=	README
+PORTEXAMPLES=	fr-4pkt-sack-bsd.pkt fr-4pkt-sack-linux.pkt
+
+OPTIONS_DEFINE=	DOCS EXAMPLES
+OPTIONS_DEFAULT=DOCS EXAMPLES
+
+.include <bsd.port.options.mk>
+
+pre-build:
+	${INSTALL_DATA} ${FILESDIR}/Makefile ${FILESDIR}/Makefile.inc ${WRKSRC}
+.for F in libpd packetdrill checksum_test packet_parser_test packet_to_string_test
+	${MKDIR} ${WRKSRC}/${F}
+	${INSTALL_DATA} ${FILESDIR}/Makefile.${F} ${WRKSRC}/${F}/Makefile
+.endfor
+
+post-install:
+.if ${PORT_OPTIONS:MEXAMPLES}
+	@${MKDIR} ${EXAMPLESDIR}
+	cd ${WRKSRC}/examples && ${INSTALL_DATA} ${PORTEXAMPLES} ${EXAMPLESDIR}
+.endif
+.if ${PORT_OPTIONS:MDOCS}
+	@${MKDIR} ${DOCSDIR}
+	cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
+.endif
+
+.include <bsd.port.mk>

Added: head/net/packetdrill/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/packetdrill/distinfo	Sat Jul 20 21:37:46 2013	(r323362)
@@ -0,0 +1,2 @@
+SHA256 (packetdrill-77954df72a78.tar.gz) = 0a022fb2a0c02f6f01f52e05380ddb47aef8580727330f11f8eeed60e94d50e5
+SIZE (packetdrill-77954df72a78.tar.gz) = 130523

Added: head/net/packetdrill/files/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/packetdrill/files/Makefile	Sat Jul 20 21:37:46 2013	(r323362)
@@ -0,0 +1,5 @@
+# $FreeBSD$
+
+SUBDIR=	libpd packetdrill checksum_test packet_parser_test packet_to_string_test
+
+.include <bsd.subdir.mk>

Added: head/net/packetdrill/files/Makefile.checksum_test
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/packetdrill/files/Makefile.checksum_test	Sat Jul 20 21:37:46 2013	(r323362)
@@ -0,0 +1,5 @@
+# $FreeBSD$
+
+PROG=	checksum_test
+
+.include <bsd.prog.mk>

Added: head/net/packetdrill/files/Makefile.inc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/packetdrill/files/Makefile.inc	Sat Jul 20 21:37:46 2013	(r323362)
@@ -0,0 +1,12 @@
+# $FreeBSD$
+
+PREFIX?=	/usr/local
+BINDIR?=	${PREFIX}/bin
+
+NO_MAN=
+
+.PATH: ${.CURDIR}/..
+
+CFLAGS+=	-I${.CURDIR}/.. -I${.CURDIR} ${PTHREAD_CFLAGS}
+PTHREAD_LIBS?=	-pthread
+LDADD=	${.CURDIR}/../libpd/libpd.a ${PTHREAD_LIBS} -lpcap

Added: head/net/packetdrill/files/Makefile.libpd
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/packetdrill/files/Makefile.libpd	Sat Jul 20 21:37:46 2013	(r323362)
@@ -0,0 +1,28 @@
+# $FreeBSD$
+
+LIB=	pd
+SRCS=	checksum.c code.c config.c hash.c hash_map.c			\
+	ip_address.c netdev.c net_utils.c packet.c			\
+	packet_socket_linux.c packet_socket_pcap.c packet_checksum.c	\
+	packet_parser.c packet_to_string.c symbols_linux.c		\
+	symbols_freebsd.c symbols_openbsd.c symbols_netbsd.c		\
+	icmp_packet.c ip_packet.c tcp_packet.c udp_packet.c run.c	\
+	run_command.c run_packet.c run_system_call.c script.c		\
+	socket.c system.c tcp_options.c tcp_options_iterator.c		\
+	tcp_options_to_string.c logging.c types.c lexer.c parser.c	\
+	fmemopen.c open_memstream.c link_layer.c wire_conn.c		\
+	wire_protocol.c wire_client.c wire_client_netdev.c		\
+	wire_server.c wire_server_netdev.c
+
+.PATH: ${.CURDIR}/..
+
+parser.c: parser.y
+	bison --output=${.TARGET} --defines=parser.h --report=state ${.IMPSRC}
+
+lexer.c: parser.c
+
+CLEANFILES=	parser.h parser.c parser.output lexer.c
+
+install:
+
+.include <bsd.lib.mk>

Added: head/net/packetdrill/files/Makefile.packet_parser_test
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/packetdrill/files/Makefile.packet_parser_test	Sat Jul 20 21:37:46 2013	(r323362)
@@ -0,0 +1,5 @@
+# $FreeBSD$
+
+PROG=	packet_parser_test
+
+.include <bsd.prog.mk>

Added: head/net/packetdrill/files/Makefile.packet_to_string_test
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/packetdrill/files/Makefile.packet_to_string_test	Sat Jul 20 21:37:46 2013	(r323362)
@@ -0,0 +1,5 @@
+# $FreeBSD$
+
+PROG=	packet_to_string_test
+
+.include <bsd.prog.mk>

Added: head/net/packetdrill/files/Makefile.packetdrill
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/packetdrill/files/Makefile.packetdrill	Sat Jul 20 21:37:46 2013	(r323362)
@@ -0,0 +1,5 @@
+# $FreeBSD$
+
+PROG=	packetdrill
+
+.include <bsd.prog.mk>

Added: head/net/packetdrill/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/packetdrill/pkg-descr	Sat Jul 20 21:37:46 2013	(r323362)
@@ -0,0 +1,8 @@
+The packetdrill scripting tool enables quick, precise tests for entire
+TCP/UDP/IPv4/IPv6 network stacks, from the system call layer down to
+the NIC hardware. packetdrill currently works on Linux, FreeBSD,
+OpenBSD, and NetBSD. It can test network stack behavior over physical
+NICs on a LAN, or on a single machine using a tun virtual network
+device.
+
+WWW: https://code.google.com/p/packetdrill/

Added: head/net/packetdrill/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/packetdrill/pkg-plist	Sat Jul 20 21:37:46 2013	(r323362)
@@ -0,0 +1,5 @@
+@comment $FreeBSD$
+bin/packetdrill
+bin/checksum_test
+bin/packet_parser_test
+bin/packet_to_string_test



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