diff options
author | thorpej <thorpej> | 1997-12-14 23:59:26 +0000 |
---|---|---|
committer | thorpej <thorpej> | 1997-12-14 23:59:26 +0000 |
commit | cc4e74ff5d4327a63605c7057cd51a28c95d52fe (patch) | |
tree | 8aa7ff3fd276c5f619ab46f715a9137d23a09a05 /net | |
parent | db9fc32b8626ac8d3d312f5fcc67d974fa2f47ff (diff) | |
download | pkgsrc-cc4e74ff5d4327a63605c7057cd51a28c95d52fe.tar.gz |
Add a package for TTCP, the canonical TCP testing tool.
Diffstat (limited to 'net')
-rw-r--r-- | net/ttcp/Makefile | 24 | ||||
-rw-r--r-- | net/ttcp/files/md5 | 1 | ||||
-rw-r--r-- | net/ttcp/patches/patch-aa | 15 | ||||
-rw-r--r-- | net/ttcp/patches/patch-ab | 95 | ||||
-rw-r--r-- | net/ttcp/pkg/COMMENT | 1 | ||||
-rw-r--r-- | net/ttcp/pkg/DESCR | 2 | ||||
-rw-r--r-- | net/ttcp/pkg/PLIST | 3 |
7 files changed, 141 insertions, 0 deletions
diff --git a/net/ttcp/Makefile b/net/ttcp/Makefile new file mode 100644 index 00000000000..ac65ad9b29c --- /dev/null +++ b/net/ttcp/Makefile @@ -0,0 +1,24 @@ +# $NetBSD: Makefile,v 1.1 1997/12/14 23:59:26 thorpej Exp $ +# +# New ports collection makefile for: ttcp +# Version required: ??? +# Date created: 14 December 1997 +# Whom: thorpej +# + +DISTNAME= ttcp +CATEGORIES= net +MASTER_SITES= http://www.ccci.com/tools/ttcp/ +DISTFILES= ttcp.tar + +EXTRACT_CMD= mkdir ttcp; tar +EXTRACT_SUFX= .tar +EXTRACT_BEFORE_ARGS=-C ttcp -xf + +MAINTAINER= thorpej@NetBSD.ORG + +post-install: + ${INSTALL_PROGRAM} ${WRKSRC}/ttcp ${PREFIX}/bin + ${INSTALL_MAN} ${WRKSRC}/ttcp.1 ${PREFIX}/man/man1 + +.include <bsd.port.mk> diff --git a/net/ttcp/files/md5 b/net/ttcp/files/md5 new file mode 100644 index 00000000000..28b7631fcab --- /dev/null +++ b/net/ttcp/files/md5 @@ -0,0 +1 @@ +MD5 (ttcp.tar) = 51e52c3f2ad20248af8f92089c962020 diff --git a/net/ttcp/patches/patch-aa b/net/ttcp/patches/patch-aa new file mode 100644 index 00000000000..5257b6cb07e --- /dev/null +++ b/net/ttcp/patches/patch-aa @@ -0,0 +1,15 @@ +*** /dev/null Sun Dec 14 18:38:40 1997 +--- Makefile Sun Dec 14 18:39:35 1997 +*************** +*** 0 **** +--- 1,10 ---- ++ # $NetBSD: patch-aa,v 1.1 1997/12/14 23:59:28 thorpej Exp $ ++ ++ all: ++ cc -O -o ttcp ttcp.c ++ ++ # pkgsrc Makefile handles this ++ install: ++ ++ clean: ++ rm -f ttcp diff --git a/net/ttcp/patches/patch-ab b/net/ttcp/patches/patch-ab new file mode 100644 index 00000000000..cdc653984dc --- /dev/null +++ b/net/ttcp/patches/patch-ab @@ -0,0 +1,95 @@ +*** ttcp.c.orig Sun Dec 14 18:24:05 1997 +--- ttcp.c Sun Dec 14 18:25:43 1997 +*************** +*** 285,291 **** + err("socket"); + mes("socket"); + +! if (bind(fd, &sinme, sizeof(sinme)) < 0) + err("bind"); + + #if defined(SO_SNDBUF) || defined(SO_RCVBUF) +--- 285,291 ---- + err("socket"); + mes("socket"); + +! if (bind(fd, (struct sockaddr *)&sinme, sizeof(sinme)) < 0) + err("bind"); + + #if defined(SO_SNDBUF) || defined(SO_RCVBUF) +*************** +*** 326,332 **** + mes("nodelay"); + } + #endif +! if(connect(fd, &sinhim, sizeof(sinhim) ) < 0) + err("connect"); + mes("connect"); + } else { +--- 326,332 ---- + mes("nodelay"); + } + #endif +! if(connect(fd, (struct sockaddr *)&sinhim, sizeof(sinhim) ) < 0) + err("connect"); + mes("connect"); + } else { +*************** +*** 348,358 **** + } + fromlen = sizeof(frominet); + domain = AF_INET; +! if((fd=accept(fd, &frominet, &fromlen) ) < 0) + err("accept"); + { struct sockaddr_in peer; + int peerlen = sizeof(peer); +! if (getpeername(fd, (struct sockaddr_in *) &peer, + &peerlen) < 0) { + err("getpeername"); + } +--- 348,358 ---- + } + fromlen = sizeof(frominet); + domain = AF_INET; +! if((fd=accept(fd, (struct sockaddr *)&frominet, &fromlen) ) < 0) + err("accept"); + { struct sockaddr_in peer; + int peerlen = sizeof(peer); +! if (getpeername(fd, (struct sockaddr *) &peer, + &peerlen) < 0) { + err("getpeername"); + } +*************** +*** 752,758 **** + int len = sizeof(from); + register int cnt; + if( udp ) { +! cnt = recvfrom( fd, buf, count, 0, &from, &len ); + numCalls++; + } else { + if( b_flag ) +--- 752,758 ---- + int len = sizeof(from); + register int cnt; + if( udp ) { +! cnt = recvfrom( fd, buf, count, 0, (struct sockaddr *)&from, &len ); + numCalls++; + } else { + if( b_flag ) +*************** +*** 782,788 **** + register int cnt; + if( udp ) { + again: +! cnt = sendto( fd, buf, count, 0, &sinhim, sizeof(sinhim) ); + numCalls++; + if( cnt<0 && errno == ENOBUFS ) { + delay(18000); +--- 782,788 ---- + register int cnt; + if( udp ) { + again: +! cnt = sendto( fd, buf, count, 0, (struct sockaddr *)&sinhim, sizeof(sinhim) ); + numCalls++; + if( cnt<0 && errno == ENOBUFS ) { + delay(18000); diff --git a/net/ttcp/pkg/COMMENT b/net/ttcp/pkg/COMMENT new file mode 100644 index 00000000000..eec5e3e1ed4 --- /dev/null +++ b/net/ttcp/pkg/COMMENT @@ -0,0 +1 @@ +a TCP testing tool diff --git a/net/ttcp/pkg/DESCR b/net/ttcp/pkg/DESCR new file mode 100644 index 00000000000..a933679e82b --- /dev/null +++ b/net/ttcp/pkg/DESCR @@ -0,0 +1,2 @@ +TTCP (Test TCP) is the canonical TCP testing and performance measuring +tool. diff --git a/net/ttcp/pkg/PLIST b/net/ttcp/pkg/PLIST new file mode 100644 index 00000000000..160c51c9af0 --- /dev/null +++ b/net/ttcp/pkg/PLIST @@ -0,0 +1,3 @@ +@comment $NetBSD: PLIST,v 1.1 1997/12/14 23:59:30 thorpej Exp $ +bin/ttcp +man/man1/ttcp.1 |