diff options
author | jdp <jdp@FreeBSD.org> | 2002-07-24 03:02:43 +0000 |
---|---|---|
committer | jdp <jdp@FreeBSD.org> | 2002-07-24 03:02:43 +0000 |
commit | 86b3836232069126cbad3fccd52778f5adc4a676 (patch) | |
tree | 23efb20689613024e75cb76a8367533e47d49173 /usr.bin/netstat | |
parent | ccc9f3815e7af0c92ecbd5c93328262a5a5f246e (diff) | |
download | FreeBSD-src-86b3836232069126cbad3fccd52778f5adc4a676.zip FreeBSD-src-86b3836232069126cbad3fccd52778f5adc4a676.tar.gz |
Widen struct sockbuf's sb_timeo member to int from short. With
non-default but reasonable values of hz this member overflowed,
breaking NFS over UDP.
Also, as long as I'm plowing up struct sockbuf ... Change certain
members from u_long/long to u_int/int in order to reduce wasted
space on 64-bit machines. This change was requested by Andrew
Gallatin.
Netstat and systat need to be rebuilt. I am incrementing
__FreeBSD_version in case any ports need to change.
Diffstat (limited to 'usr.bin/netstat')
-rw-r--r-- | usr.bin/netstat/atalk.c | 2 | ||||
-rw-r--r-- | usr.bin/netstat/inet.c | 2 | ||||
-rw-r--r-- | usr.bin/netstat/ipx.c | 2 | ||||
-rw-r--r-- | usr.bin/netstat/iso.c | 6 | ||||
-rw-r--r-- | usr.bin/netstat/netgraph.c | 2 | ||||
-rw-r--r-- | usr.bin/netstat/ns.c | 2 | ||||
-rw-r--r-- | usr.bin/netstat/unix.c | 2 |
7 files changed, 9 insertions, 9 deletions
diff --git a/usr.bin/netstat/atalk.c b/usr.bin/netstat/atalk.c index 45e465c..0d9cc17 100644 --- a/usr.bin/netstat/atalk.c +++ b/usr.bin/netstat/atalk.c @@ -246,7 +246,7 @@ atalkprotopr(u_long off __unused, char *name, int af __unused) } if (Aflag) printf("%8lx ", (u_long) this); - printf("%-5.5s %6lu %6lu ", name, sockb.so_rcv.sb_cc, + printf("%-5.5s %6u %6u ", name, sockb.so_rcv.sb_cc, sockb.so_snd.sb_cc); printf(Aflag?" %-18.18s":" %-22.22s", atalk_print( (struct sockaddr *)&ddpcb.ddp_lsat,7)); diff --git a/usr.bin/netstat/inet.c b/usr.bin/netstat/inet.c index f72fa98..39b77c1 100644 --- a/usr.bin/netstat/inet.c +++ b/usr.bin/netstat/inet.c @@ -250,7 +250,7 @@ protopr(u_long proto, /* for sysctl version we pass proto # */ so->so_incqlen, so->so_qlimit); printf("%-14.14s ", buf); } else { - printf("%6ld %6ld ", + printf("%6u %6u ", so->so_rcv.sb_cc, so->so_snd.sb_cc); } diff --git a/usr.bin/netstat/ipx.c b/usr.bin/netstat/ipx.c index e7a0155..f334257 100644 --- a/usr.bin/netstat/ipx.c +++ b/usr.bin/netstat/ipx.c @@ -134,7 +134,7 @@ ipxprotopr(u_long off, char *name, int af __unused) } if (Aflag) printf("%8lx ", ppcb); - printf("%-5.5s %6ld %6ld ", name, sockb.so_rcv.sb_cc, + printf("%-5.5s %6u %6u ", name, sockb.so_rcv.sb_cc, sockb.so_snd.sb_cc); printf(Aflag?" %-18.18s":" %-22.22s", ipx_prpr(&ipxpcb.ipxp_laddr)); printf(Aflag?" %-18.18s":" %-22.22s", ipx_prpr(&ipxpcb.ipxp_faddr)); diff --git a/usr.bin/netstat/iso.c b/usr.bin/netstat/iso.c index 387c633..682aadc 100644 --- a/usr.bin/netstat/iso.c +++ b/usr.bin/netstat/iso.c @@ -263,7 +263,7 @@ iso_protopr1(u_long kern_addr, int istp) if (Aflag) printf("%8x ", (sockb.so_pcb ? (void *)sockb.so_pcb : (void *)kern_addr)); - printf("%-5.5s %6d %6d ", "tp", sockb.so_rcv.sb_cc, sockb.so_snd.sb_cc); + printf("%-5.5s %6u %6u ", "tp", sockb.so_rcv.sb_cc, sockb.so_snd.sb_cc); if (istp && tpcb.tp_lsuffixlen) { hexprint(tpcb.tp_lsuffixlen, tpcb.tp_lsuffix, "()"); printf("\t"); @@ -345,7 +345,7 @@ tp_inproto(u_long pcb) return; if (Aflag) printf("%8x ", pcb); - printf("%-5.5s %6d %6d ", "tpip", + printf("%-5.5s %6u %6u ", "tpip", sockb.so_rcv.sb_cc, sockb.so_snd.sb_cc); inetprint(&inpcb.inp_laddr, inpcb.inp_lport, "tp"); inetprint(&inpcb.inp_faddr, inpcb.inp_fport, "tp"); @@ -494,7 +494,7 @@ x25_protopr(u_long off, char *name, int af __unused) "Local Address", "Foreign Address", "(state)"); first = 0; } - printf("%-5.5s %6d %6d ", name, sockb.so_rcv.sb_cc, + printf("%-5.5s %6u %6u ", name, sockb.so_rcv.sb_cc, sockb.so_snd.sb_cc); isonetprint(&xpcb.x_laddr.siso_addr, &xpcb.x_lport, sizeof(xpcb.x_lport), 1); diff --git a/usr.bin/netstat/netgraph.c b/usr.bin/netstat/netgraph.c index fb032e8..e536063 100644 --- a/usr.bin/netstat/netgraph.c +++ b/usr.bin/netstat/netgraph.c @@ -159,7 +159,7 @@ netgraphprotopr(u_long off, char *name, int af __unused) /* Show socket */ if (Aflag) printf("%8lx ", (u_long) this); - printf("%-5.5s %6lu %6lu ", + printf("%-5.5s %6u %6u ", name, sockb.so_rcv.sb_cc, sockb.so_snd.sb_cc); /* Get ngsock structure */ diff --git a/usr.bin/netstat/ns.c b/usr.bin/netstat/ns.c index 1b924be..4a9944a 100644 --- a/usr.bin/netstat/ns.c +++ b/usr.bin/netstat/ns.c @@ -136,7 +136,7 @@ nsprotopr(u_long off, char *name, int af __unused) } if (Aflag) printf("%8x ", ppcb); - printf("%-5.5s %6d %6d ", name, sockb.so_rcv.sb_cc, + printf("%-5.5s %6u %6u ", name, sockb.so_rcv.sb_cc, sockb.so_snd.sb_cc); printf(" %-22.22s", ns_prpr(&nspcb.nsp_laddr)); printf(" %-22.22s", ns_prpr(&nspcb.nsp_faddr)); diff --git a/usr.bin/netstat/unix.c b/usr.bin/netstat/unix.c index abc2a5d..5698ede 100644 --- a/usr.bin/netstat/unix.c +++ b/usr.bin/netstat/unix.c @@ -146,7 +146,7 @@ unixdomainpr(struct xunpcb *xunp, struct xsocket *so) "Inode", "Conn", "Refs", "Nextref"); first = 0; } - printf("%8lx %-6.6s %6ld %6ld %8lx %8lx %8lx %8lx", + printf("%8lx %-6.6s %6u %6u %8lx %8lx %8lx %8lx", (long)so->so_pcb, socktype[so->so_type], so->so_rcv.sb_cc, so->so_snd.sb_cc, (long)unp->unp_vnode, (long)unp->unp_conn, |