summaryrefslogtreecommitdiff
path: root/benchmarks/nettest/patches
diff options
context:
space:
mode:
authorcjep <cjep>2003-04-11 17:07:23 +0000
committercjep <cjep>2003-04-11 17:07:23 +0000
commitfbed3356fbd8fe2e7a2d915e51b92a253b8e18e3 (patch)
tree2374b3b590b1f1c9ab9de1c5d04f73282ba405e5 /benchmarks/nettest/patches
parent0c11c48e7c853303b79c0933980a59a444ed7884 (diff)
downloadpkgsrc-fbed3356fbd8fe2e7a2d915e51b92a253b8e18e3.tar.gz
Re-import of Nettest 92.11.09 into the NetBSD packages collection
as benchmarks/nettest (originally in net). The nettest and nettestd commands perform client and server performance tests for various types of interprocess communication. These tests time the data throughput of pipes and UNIX domain, TCP, and UDP socket connections. Supplied by Brian Ginsbach in PR#18985. Thanks!
Diffstat (limited to 'benchmarks/nettest/patches')
-rw-r--r--benchmarks/nettest/patches/patch-aa30
-rw-r--r--benchmarks/nettest/patches/patch-ab61
-rw-r--r--benchmarks/nettest/patches/patch-ac65
-rw-r--r--benchmarks/nettest/patches/patch-ad57
4 files changed, 213 insertions, 0 deletions
diff --git a/benchmarks/nettest/patches/patch-aa b/benchmarks/nettest/patches/patch-aa
new file mode 100644
index 00000000000..c5fc0d174de
--- /dev/null
+++ b/benchmarks/nettest/patches/patch-aa
@@ -0,0 +1,30 @@
+$NetBSD: patch-aa,v 1.1.1.1 2003/04/11 17:07:23 cjep Exp $
+
+--- Makefile.orig 1992-11-05 22:03:14.000000000 +0000
++++ Makefile
+@@ -3,10 +3,8 @@ MAKE=make
+ 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`; \
++ @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\";\
+@@ -33,6 +31,12 @@ unicos60 unicos61:
+ DEFINES="-DWAIT3CODE -DNO_ISO" \
+ LIBS="" OPT="-O"
+
++NetBSD:
++ $(MAKE) objs \
++ INCLUDE="" \
++ DEFINES="-DWAIT3CODE -DBSD44 -DNAMEDPIPES -DNO_ISO -DNONVOID_SETPGRP" \
++ OPT="-O" LIBS="-lcompat"
++
+ 4.4alpha:
+ $(MAKE) objs \
+ INCLUDE="" \
diff --git a/benchmarks/nettest/patches/patch-ab b/benchmarks/nettest/patches/patch-ab
new file mode 100644
index 00000000000..3a1682057f3
--- /dev/null
+++ b/benchmarks/nettest/patches/patch-ab
@@ -0,0 +1,61 @@
+$NetBSD: patch-ab,v 1.1.1.1 2003/04/11 17:07:23 cjep Exp $
+
+--- nettest.8.orig 1992-11-09 18:36:26.000000000 +0000
++++ nettest.8
+@@ -39,7 +39,7 @@
+ .QE
+ .SH SYNOPSIS
+ .QS
+-\*C/etc/nettest\fR
++\*Cnettest\fR
+ \%[\*C-c\fR]
+ \%[\*C-C\fR]
+ \%[\*C-d\fR]
+@@ -55,7 +55,7 @@
+ \%[\*C-w\fR]
+ \%[\fIhost\fR\ [\fIcount\fR\ [\fIsize\fR\ [\fIport\fR]]]]
+ .br
+-\*C/etc/nettest\fR
++\*Cnettest\fR
+ \%[\*C-c\fR]
+ \%[\*C-C\fR]
+ \%[\*C-d\fR]
+@@ -67,7 +67,7 @@
+ \%[\*C-w\fR]
+ \%[\fIcount\fR\ [\fIsize\fR\ [\fIfilename\fR]]]
+ .br
+-\*C/etc/nettest\fR
++\*Cnettest\fR
+ \%[\*C-c\fR]
+ \%[\*C-C\fR]
+ \%[\*C-d\fR]
+@@ -77,24 +77,24 @@
+ \%\*C-p\ file\fR\ \fIwritefile\ readfile\fR
+ \%[\fIcount\fR\ [\fIsize\fR]]
+ .br
+-\*C/etc/nettest\fR
++\*Cnettest\fR
+ \%\*C-V\fR
+ .sp
+-\*C/etc/nettestd\fR
++\*Cnettestd\fR
+ \%[\*C-d\fR]
+ \%[\*C-p\ tcp\fR|\*Cudp\fR|\*Ciso\fR]
+ \%[\fIport\fR]
+ .br
+-\*C/etc/nettestd\fR
++\*Cnettestd\fR
+ \%[\*C-d\fR]
+ \%\*C-p\ unix\fR|\*Cunixd\fR|\*Cpipe\fR
+ \%[\fIfilename\fR]
+ .br
+-\*C/etc/nettestd\fR
++\*Cnettestd\fR
+ \%[\*C-d\fR]
+ \%\*C-p\ file\fR\ \fIreadfile\ writefile\fR
+ .br
+-\*C/etc/nettestd\fR
++\*Cnettestd\fR
+ \%\*C-V\fR
+ .QE
+ .SH DESCRIPTION
diff --git a/benchmarks/nettest/patches/patch-ac b/benchmarks/nettest/patches/patch-ac
new file mode 100644
index 00000000000..5472285ee22
--- /dev/null
+++ b/benchmarks/nettest/patches/patch-ac
@@ -0,0 +1,65 @@
+$NetBSD: patch-ac,v 1.1.1.1 2003/04/11 17:07:23 cjep Exp $
+
+--- nettest.c.orig 1992-11-05 21:52:58.000000000 +0000
++++ nettest.c
+@@ -92,7 +92,11 @@ int kbufsize = 0;
+ 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
+@@ -126,7 +130,8 @@ struct sockaddr_iso to_s = {sizeof(to_s)
+
+ void do_children(), do_stream(), usage(), do_dgram(), prtimes();
+
+-int read(), recv();
++int read();
++ssize_t recv();
+
+ int (*rfunc)() = read;
+
+@@ -550,7 +555,11 @@ main(argc, argv)
+ 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,8 +1169,8 @@ do_dgram(s)
+ *data = 0;
+ for (i = 0; i < nchunks; i++) {
+ ret = mesghdr ? sendmsg(s, &outmsg, 0)
+- : sendto(s, data, chunksize, 0, (caddr_t)&name,
+- namesize);
++ : sendto(s, data, chunksize, 0,
++ (struct sockaddr *)&name, namesize);
+
+ if (ret < 0) {
+ perror(mesghdr ? "sendmsg" : "sendto");
+@@ -1397,12 +1406,13 @@ parsetos(name, proto)
+ register char *c;
+ int tos;
+
++#undef IP_TOS
+ #ifdef IP_TOS
+ struct tosent *tosp;
+
+- tosp = gettosbyname(name, proto);
++ tosp = (struct tosent *)gettosbyname(name, proto);
+ if (tosp) {
+- tos = tosp->t_tos;
++ tos = (int)tosp->t_tos;
+ } else {
+ #endif
+ for (c = name; *c; c++) {
diff --git a/benchmarks/nettest/patches/patch-ad b/benchmarks/nettest/patches/patch-ad
new file mode 100644
index 00000000000..4cf4ef65208
--- /dev/null
+++ b/benchmarks/nettest/patches/patch-ad
@@ -0,0 +1,57 @@
+$NetBSD: patch-ad,v 1.1.1.1 2003/04/11 17:07:23 cjep Exp $
+
+--- nettestd.c.orig 1992-11-05 21:52:58.000000000 +0000
++++ nettestd.c
+@@ -107,7 +107,8 @@ union {
+ } name;
+ int namesize;
+
+-int read(), recv();
++int read();
++ssize_t recv();
+ int (*rfunc)() = read;
+
+ main(argc, argv)
+@@ -271,7 +272,11 @@ char **argv;
+ # endif
+ #endif
+ if (daemon) {
++#ifdef NONVOID_SETPGRP
++ if (setpgrp(0, getpid()) < 0)
++#else
+ if (setpgrp() < 0)
++#endif
+ perror("setpgrp");
+ if ((c = open(_PATH_TTY, O_RDWR)) >= 0) {
+ (void)ioctl(c, TIOCNOTTY, (char *)0);
+@@ -416,7 +421,7 @@ char **argv;
+ )
+ error("setsockopt (IP_OPTIONS)");
+ #endif
+- if (bind(s, (char *)&name, namesize) < 0) {
++ if (bind(s, (struct sockaddr *)&name, namesize) < 0) {
+ error("bind");
+ exit(1);
+ }
+@@ -447,10 +452,10 @@ register int s;
+ #endif
+ listen(s, 5);
+
+- signal(SIGCHLD, dochild);
++ signal(SIGCHLD, (void *)dochild);
+ for (;;) {
+ namesize = sizeof(name);
+- s2 = accept(s, (char *)&name, &namesize);
++ s2 = accept(s, (struct sockaddr *)&name, &namesize);
+ if (s2 < 0) {
+ extern int errno;
+ if (errno == EINTR)
+@@ -723,7 +728,7 @@ int s;
+ #endif
+ {
+ namesize = sizeof(name.d_inet);
+- t = recvfrom(s, data, MAXSIZE, 0, (char *)&name.d_inet,
++ t = recvfrom(s, data, MAXSIZE, 0, (struct sockaddr *)&name.d_inet,
+ &namesize);
+ }
+ if (t < 0) {