mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-13 23:36:08 +00:00
e1bcde3528
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
78 lines
1.6 KiB
Plaintext
78 lines
1.6 KiB
Plaintext
*** 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++) {
|