1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-26 05:02:18 +00:00

Import of net/nettest 09/11/92 release.

The nettest and nettestd commands invoke client and server
programs that are used for timing data throughput of vari-
ous  methods  of  interprocess communication.

PR:		ports/4817
Submitted by:	proot@iaces.com
This commit is contained in:
Justin M. Seger 1997-10-30 11:21:26 +00:00
parent 04f91952a3
commit e1bcde3528
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=8412
8 changed files with 217 additions and 0 deletions

23
net/nettest/Makefile Normal file
View File

@ -0,0 +1,23 @@
# New ports collection makefile for: nettest
# Date created: Mon Oct 20 14:30:06 CDT 1997
# Whom: proot@iaces.com
#
# $Id$
#
DISTNAME= nettest.92.11.09
PKGNAME= nettest-92.11.09
EXTRACT_SUFX= .tar.Z
CATEGORIES= net
NO_WRKSUBDIR= 1
MASTER_SITES= ftp://ftp.cray.com/src/nettest/
MAN8= nettest.8
MAINTAINER= proot@iaces.com
do-install:
$(INSTALL_PROGRAM) -s $(WRKSRC)/nettest $(PREFIX)/bin/nettest
$(INSTALL_PROGRAM) -s $(WRKSRC)/nettestd $(PREFIX)/bin/nettestd
$(INSTALL_MAN) $(WRKSRC)/nettest.8 $(PREFIX)/man/man8/nettest.8
.include <bsd.port.mk>

1
net/nettest/distinfo Normal file
View File

@ -0,0 +1 @@
MD5 (nettest.92.11.09.tar.Z) = d62f99153573327bd0f16e6f468efda0

View File

@ -0,0 +1,38 @@
*** Makefile.orig Thu Nov 5 16:03:14 1992
--- Makefile Mon Oct 20 12:50:14 1997
***************
*** 3,12 ****
FILES=README Makefile nettest.h nettest.c nettestd.c nettest.8
all:
! @if [ -f /bin/hostname -o -f /usr/bin/hostname ]; then \
! $(MAKE) `hostname`; \
! elif [ -f /bin/uname ]; then \
! $(MAKE) `uname -n`; \
else \
echo You must specify what machine you are on,;\
echo e.g. \"make sun\", \"make cray2\", \"make pyramid\", \"make xmp\";\
--- 3,10 ----
FILES=README Makefile nettest.h nettest.c nettestd.c nettest.8
all:
! @if [ -f /bin/uname -o -f /usr/bin/uname ]; then \
! $(MAKE) `uname -s`; \
else \
echo You must specify what machine you are on,;\
echo e.g. \"make sun\", \"make cray2\", \"make pyramid\", \"make xmp\";\
***************
*** 32,37 ****
--- 30,41 ----
INCLUDE="-I." \
DEFINES="-DWAIT3CODE -DNO_ISO" \
LIBS="" OPT="-O"
+
+ FreeBSD:
+ $(MAKE) objs \
+ INCLUDE="" \
+ DEFINES="-DWAIT3CODE -DBSD44 -DNAMEDPIPES -DNO_ISO" \
+ OPT="-O" LIBS="-lcompat"
4.4alpha:
$(MAKE) objs \

View File

@ -0,0 +1,77 @@
*** nettest.c.orig Thu Nov 5 15:52:58 1992
--- nettest.c Mon Oct 20 12:50:20 1997
***************
*** 92,98 ****
--- 92,102 ----
int nodelay = 0;
int mesghdr = 0;
+ #ifdef BSD44
+ clock_t times();
+ #else
long times();
+ #endif
#if !defined(CRAY) && !defined(SYSV)
#define GETTIMES(a, b) ftime(&a); times(&b);
#define TIMETYPE struct timeb
***************
*** 550,556 ****
--- 554,564 ----
shutdown(s, 2);
exit(0);
}
+ #ifdef BSD44
+ if (connect(s, (struct sockaddr *)&name, namesize) < 0) {
+ #else
if (connect(s, (char *)&name, namesize) < 0) {
+ #endif
perror("connect");
exit(1);
}
***************
*** 1160,1167 ****
*data = 0;
for (i = 0; i < nchunks; i++) {
ret = mesghdr ? sendmsg(s, &outmsg, 0)
! : sendto(s, data, chunksize, 0, (caddr_t)&name,
! namesize);
if (ret < 0) {
perror(mesghdr ? "sendmsg" : "sendto");
--- 1168,1175 ----
*data = 0;
for (i = 0; i < nchunks; i++) {
ret = mesghdr ? sendmsg(s, &outmsg, 0)
! : sendto(s, data, chunksize, 0,
! (struct sockaddr *)&name, namesize);
if (ret < 0) {
perror(mesghdr ? "sendmsg" : "sendto");
***************
*** 1397,1408 ****
register char *c;
int tos;
#ifdef IP_TOS
struct tosent *tosp;
! tosp = gettosbyname(name, proto);
if (tosp) {
! tos = tosp->t_tos;
} else {
#endif
for (c = name; *c; c++) {
--- 1405,1417 ----
register char *c;
int tos;
+ #undef IP_TOS
#ifdef IP_TOS
struct tosent *tosp;
! tosp = (struct tosent *)gettosbyname(name, proto);
if (tosp) {
! tos = (int)tosp->t_tos;
} else {
#endif
for (c = name; *c; c++) {

View File

@ -0,0 +1,59 @@
*** nettestd.c.orig Thu Nov 5 15:52:58 1992
--- nettestd.c Mon Oct 20 13:28:06 1997
***************
*** 416,422 ****
)
error("setsockopt (IP_OPTIONS)");
#endif
! if (bind(s, (char *)&name, namesize) < 0) {
error("bind");
exit(1);
}
--- 416,422 ----
)
error("setsockopt (IP_OPTIONS)");
#endif
! if (bind(s, (struct sockaddr *)&name, namesize) < 0) {
error("bind");
exit(1);
}
***************
*** 447,456 ****
#endif
listen(s, 5);
! signal(SIGCHLD, dochild);
for (;;) {
namesize = sizeof(name);
! s2 = accept(s, (char *)&name, &namesize);
if (s2 < 0) {
extern int errno;
if (errno == EINTR)
--- 447,456 ----
#endif
listen(s, 5);
! signal(SIGCHLD, (void *)dochild);
for (;;) {
namesize = sizeof(name);
! s2 = accept(s, (struct sockaddr *)&name, &namesize);
if (s2 < 0) {
extern int errno;
if (errno == EINTR)
***************
*** 723,729 ****
#endif
{
namesize = sizeof(name.d_inet);
! t = recvfrom(s, data, MAXSIZE, 0, (char *)&name.d_inet,
&namesize);
}
if (t < 0) {
--- 723,729 ----
#endif
{
namesize = sizeof(name.d_inet);
! t = recvfrom(s, data, MAXSIZE, 0, (struct sockaddr *)&name.d_inet,
&namesize);
}
if (t < 0) {

1
net/nettest/pkg-comment Normal file
View File

@ -0,0 +1 @@
Performs client and server functions for timing data throughput.

15
net/nettest/pkg-descr Normal file
View File

@ -0,0 +1,15 @@
The nettest and nettestd commands invoke client and server
programs that are used for timing data throughput of vari-
ous methods of interprocess communication. For TCP and
OSI connections, the nettest program establishes a connec-
tion with the nettestd program, and then it does count
writes of size bytes, followed by count reads of size
bytes. For UDP, the nettest program performs only writes;
reads are not performed. The nettestd program, if used
with UDP connections, reads the data packets and prints a
message for each data packet it receives. The number and
size of the reads and writes may not correlate with the
number and size of the actual data packets that are trans-
ferred; it depends on the protocol that is chosen. If you
append an optional k (or K) to the size, count, or bufsize
value, the number specified is multiplied by 1024.

3
net/nettest/pkg-plist Normal file
View File

@ -0,0 +1,3 @@
bin/nettest
bin/nettestd
man/man8/nettest.8.gz