Add a package for TTCP, the canonical TCP testing tool.

This commit is contained in:
thorpej 1997-12-14 23:59:26 +00:00
parent cff5a54e45
commit eb200b69a4
7 changed files with 141 additions and 0 deletions

24
net/ttcp/Makefile Normal file
View file

@ -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>

1
net/ttcp/files/md5 Normal file
View file

@ -0,0 +1 @@
MD5 (ttcp.tar) = 51e52c3f2ad20248af8f92089c962020

15
net/ttcp/patches/patch-aa Normal file
View file

@ -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

95
net/ttcp/patches/patch-ab Normal file
View file

@ -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);

1
net/ttcp/pkg/COMMENT Normal file
View file

@ -0,0 +1 @@
a TCP testing tool

2
net/ttcp/pkg/DESCR Normal file
View file

@ -0,0 +1,2 @@
TTCP (Test TCP) is the canonical TCP testing and performance measuring
tool.

3
net/ttcp/pkg/PLIST Normal file
View file

@ -0,0 +1,3 @@
@comment $NetBSD: PLIST,v 1.1 1997/12/14 23:59:30 thorpej Exp $
bin/ttcp
man/man1/ttcp.1