X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/04266081d5f37f466afb95b8e85fd07acb8352a8..d1cfb8207d6ffbde8eb0a0cfa5d4f00b2c0ba59f:/usr/src/usr.bin/netstat/inet.c diff --git a/usr/src/usr.bin/netstat/inet.c b/usr/src/usr.bin/netstat/inet.c index ba855d6914..3e5d251109 100644 --- a/usr/src/usr.bin/netstat/inet.c +++ b/usr/src/usr.bin/netstat/inet.c @@ -1,4 +1,4 @@ - /* +/* * Copyright (c) 1983, 1988 Regents of the University of California. * All rights reserved. * @@ -6,7 +6,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)inet.c 5.17 (Berkeley) %G%"; +static char sccsid[] = "@(#)inet.c 5.19 (Berkeley) %G%"; #endif /* not lint */ #include @@ -38,14 +38,15 @@ static char sccsid[] = "@(#)inet.c 5.17 (Berkeley) %G%"; #include #include #include +#include #include "netstat.h" struct inpcb inpcb; struct tcpcb tcpcb; struct socket sockb; -char *inetname __P((struct in_addr *)); -void inetprint __P((struct in_addr *, int, char *)); +char *inetname __P((struct in_addr *)); +void inetprint __P((struct in_addr *, int, char *)); /* * Print a summary of connections related to an Internet @@ -55,7 +56,7 @@ void inetprint __P((struct in_addr *, int, char *)); */ void protopr(off, name) - off_t off; + u_long off; char *name; { struct inpcb cb; @@ -73,7 +74,7 @@ protopr(off, name) return; while (inpcb.inp_next != (struct inpcb *)off) { next = inpcb.inp_next; - kread((off_t)next, (char *)&inpcb, sizeof (inpcb)); + kread((u_long)next, (char *)&inpcb, sizeof (inpcb)); if (inpcb.inp_prev != prev) { printf("???\n"); break; @@ -83,9 +84,9 @@ protopr(off, name) prev = next; continue; } - kread((off_t)inpcb.inp_socket, (char *)&sockb, sizeof (sockb)); + kread((u_long)inpcb.inp_socket, (char *)&sockb, sizeof (sockb)); if (istcp) { - kread((off_t)inpcb.inp_ppcb, + kread((u_long)inpcb.inp_ppcb, (char *)&tcpcb, sizeof (tcpcb)); } if (first) { @@ -127,7 +128,7 @@ protopr(off, name) */ void tcp_stats(off, name) - off_t off; + u_long off; char *name; { struct tcpstat tcpstat; @@ -196,7 +197,7 @@ tcp_stats(off, name) */ void udp_stats(off, name) - off_t off; + u_long off; char *name; { struct udpstat udpstat; @@ -224,7 +225,7 @@ udp_stats(off, name) */ void ip_stats(off, name) - off_t off; + u_long off; char *name; { struct ipstat ipstat; @@ -280,7 +281,7 @@ static char *icmpnames[] = { */ void icmp_stats(off, name) - off_t off; + u_long off; char *name; { struct icmpstat icmpstat;