-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a package for TTCP, the canonical TCP testing tool.
- Loading branch information
Showing
7 changed files
with
141 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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= [email protected] | ||
|
||
post-install: | ||
${INSTALL_PROGRAM} ${WRKSRC}/ttcp ${PREFIX}/bin | ||
${INSTALL_MAN} ${WRKSRC}/ttcp.1 ${PREFIX}/man/man1 | ||
|
||
.include <bsd.port.mk> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
MD5 (ttcp.tar) = 51e52c3f2ad20248af8f92089c962020 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
a TCP testing tool |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
TTCP (Test TCP) is the canonical TCP testing and performance measuring | ||
tool. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
@comment $NetBSD: PLIST,v 1.1 1997/12/14 23:59:30 thorpej Exp $ | ||
bin/ttcp | ||
man/man1/ttcp.1 |