=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/netstat/Attic/ns.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- src/usr.bin/netstat/Attic/ns.c 1996/06/26 05:37:25 1.2 +++ src/usr.bin/netstat/Attic/ns.c 1997/06/29 20:18:03 1.3 @@ -1,4 +1,4 @@ -/* $OpenBSD: ns.c,v 1.2 1996/06/26 05:37:25 deraadt Exp $ */ +/* $OpenBSD: ns.c,v 1.3 1997/06/29 20:18:03 millert Exp $ */ /* $NetBSD: ns.c,v 1.8 1995/10/03 21:42:46 thorpej Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "from: @(#)ns.c 8.1 (Berkeley) 6/6/93"; #else -static char *rcsid = "$OpenBSD: ns.c,v 1.2 1996/06/26 05:37:25 deraadt Exp $"; +static char *rcsid = "$OpenBSD: ns.c,v 1.3 1997/06/29 20:18:03 millert Exp $"; #endif #endif /* not lint */ @@ -140,8 +140,8 @@ first = 0; } if (Aflag) - printf("%8x ", ppcb); - printf("%-5.5s %6d %6d ", name, sockb.so_rcv.sb_cc, + printf("%8lx ", ppcb); + printf("%-5.5s %6ld %6ld ", 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)); @@ -157,7 +157,7 @@ } } #define ANY(x,y,z) \ - ((x) ? printf("\t%d %s%s%s -- %s\n",x,y,plural(x),z,"x") : 0) + ((x) ? printf("\t%ld %s%s%s -- %s\n",x,y,plural(x),z,"x") : 0) /* * Dump SPP statistics structure. @@ -174,18 +174,23 @@ return; kread(off, (char *)&spp_istat, sizeof (spp_istat)); printf("%s:\n", name); - ANY(spp_istat.nonucn, "connection", " dropped due to no new sockets "); - ANY(spp_istat.gonawy, "connection", " terminated due to our end dying"); - ANY(spp_istat.nonucn, "connection", + ANY((long)spp_istat.nonucn, "connection", + " dropped due to no new sockets "); + ANY((long)spp_istat.gonawy, "connection", + " terminated due to our end dying"); + ANY((long)spp_istat.nonucn, "connection", " dropped due to inability to connect"); - ANY(spp_istat.noconn, "connection", + ANY((long)spp_istat.noconn, "connection", " dropped due to inability to connect"); - ANY(spp_istat.notme, "connection", + ANY((long)spp_istat.notme, "connection", " incompleted due to mismatched id's"); - ANY(spp_istat.wrncon, "connection", " dropped due to mismatched id's"); - ANY(spp_istat.bdreas, "packet", " dropped out of sequence"); - ANY(spp_istat.lstdup, "packet", " duplicating the highest packet"); - ANY(spp_istat.notyet, "packet", " refused as exceeding allocation"); + ANY((long)spp_istat.wrncon, "connection", + " dropped due to mismatched id's"); + ANY((long)spp_istat.bdreas, "packet", " dropped out of sequence"); + ANY((long)spp_istat.lstdup, "packet", + " duplicating the highest packet"); + ANY((long)spp_istat.notyet, "packet", + " refused as exceeding allocation"); ANY(sppstat.spps_connattempt, "connection", " initiated"); ANY(sppstat.spps_accepts, "connection", " accepted"); ANY(sppstat.spps_connects, "connection", " established");