summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorJustin M. Seger <jseger@FreeBSD.org>1997-10-30 11:21:26 +0000
committerJustin M. Seger <jseger@FreeBSD.org>1997-10-30 11:21:26 +0000
commite1bcde352801d426dae03984d29ff1770cde78ba (patch)
tree011b69f7a36086e267ee14b36a55b1f645327ddd /net
parentActivate tkref. (diff)
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
Notes
Notes: svn path=/head/; revision=8412
Diffstat (limited to 'net')
-rw-r--r--net/nettest/Makefile23
-rw-r--r--net/nettest/distinfo1
-rw-r--r--net/nettest/files/patch-aa38
-rw-r--r--net/nettest/files/patch-ab77
-rw-r--r--net/nettest/files/patch-ac59
-rw-r--r--net/nettest/pkg-comment1
-rw-r--r--net/nettest/pkg-descr15
-rw-r--r--net/nettest/pkg-plist3
8 files changed, 217 insertions, 0 deletions
diff --git a/net/nettest/Makefile b/net/nettest/Makefile
new file mode 100644
index 000000000000..7dd389b05a5e
--- /dev/null
+++ b/net/nettest/Makefile
@@ -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>
diff --git a/net/nettest/distinfo b/net/nettest/distinfo
new file mode 100644
index 000000000000..42b952642ecd
--- /dev/null
+++ b/net/nettest/distinfo
@@ -0,0 +1 @@
+MD5 (nettest.92.11.09.tar.Z) = d62f99153573327bd0f16e6f468efda0
diff --git a/net/nettest/files/patch-aa b/net/nettest/files/patch-aa
new file mode 100644
index 000000000000..fd16c80ee55a
--- /dev/null
+++ b/net/nettest/files/patch-aa
@@ -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 \
diff --git a/net/nettest/files/patch-ab b/net/nettest/files/patch-ab
new file mode 100644
index 000000000000..86333d7523cb
--- /dev/null
+++ b/net/nettest/files/patch-ab
@@ -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++) {
diff --git a/net/nettest/files/patch-ac b/net/nettest/files/patch-ac
new file mode 100644
index 000000000000..4ed2ce3e7e95
--- /dev/null
+++ b/net/nettest/files/patch-ac
@@ -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) {
diff --git a/net/nettest/pkg-comment b/net/nettest/pkg-comment
new file mode 100644
index 000000000000..7052abb0f7d0
--- /dev/null
+++ b/net/nettest/pkg-comment
@@ -0,0 +1 @@
+Performs client and server functions for timing data throughput.
diff --git a/net/nettest/pkg-descr b/net/nettest/pkg-descr
new file mode 100644
index 000000000000..3f9b23a042b8
--- /dev/null
+++ b/net/nettest/pkg-descr
@@ -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.
diff --git a/net/nettest/pkg-plist b/net/nettest/pkg-plist
new file mode 100644
index 000000000000..5de932561ece
--- /dev/null
+++ b/net/nettest/pkg-plist
@@ -0,0 +1,3 @@
+bin/nettest
+bin/nettestd
+man/man8/nettest.8.gz