=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/netstat/Attic/ns.c,v retrieving revision 1.2 retrieving revision 1.3 diff -c -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 **** ! /* $OpenBSD: ns.c,v 1.2 1996/06/26 05:37:25 deraadt Exp $ */ /* $NetBSD: ns.c,v 1.8 1995/10/03 21:42:46 thorpej Exp $ */ /* --- 1,4 ---- ! /* $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,44 **** #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 $"; #endif #endif /* not lint */ --- 38,44 ---- #if 0 static char sccsid[] = "from: @(#)ns.c 8.1 (Berkeley) 6/6/93"; #else ! static char *rcsid = "$OpenBSD: ns.c,v 1.3 1997/06/29 20:18:03 millert Exp $"; #endif #endif /* not lint */ *************** *** 140,147 **** first = 0; } if (Aflag) ! printf("%8x ", ppcb); ! printf("%-5.5s %6d %6d ", 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)); --- 140,147 ---- first = 0; } if (Aflag) ! 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,163 **** } } #define ANY(x,y,z) \ ! ((x) ? printf("\t%d %s%s%s -- %s\n",x,y,plural(x),z,"x") : 0) /* * Dump SPP statistics structure. --- 157,163 ---- } } #define ANY(x,y,z) \ ! ((x) ? printf("\t%ld %s%s%s -- %s\n",x,y,plural(x),z,"x") : 0) /* * Dump SPP statistics structure. *************** *** 174,191 **** 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", " dropped due to inability to connect"); ! ANY(spp_istat.noconn, "connection", " dropped due to inability to connect"); ! ANY(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(sppstat.spps_connattempt, "connection", " initiated"); ANY(sppstat.spps_accepts, "connection", " accepted"); ANY(sppstat.spps_connects, "connection", " established"); --- 174,196 ---- return; kread(off, (char *)&spp_istat, sizeof (spp_istat)); printf("%s:\n", name); ! 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((long)spp_istat.noconn, "connection", " dropped due to inability to connect"); ! ANY((long)spp_istat.notme, "connection", " incompleted due to mismatched id's"); ! 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");