=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/netstat/Attic/iso.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- src/usr.bin/netstat/Attic/iso.c 2002/05/27 01:50:36 1.10 +++ src/usr.bin/netstat/Attic/iso.c 2003/02/01 01:51:31 1.11 @@ -1,4 +1,4 @@ -/* $OpenBSD: iso.c,v 1.10 2002/05/27 01:50:36 deraadt Exp $ */ +/* $OpenBSD: iso.c,v 1.11 2003/02/01 01:51:31 deraadt Exp $ */ /* $NetBSD: iso.c,v 1.12 1995/10/03 21:42:38 thorpej Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "from: @(#)iso.c 8.1 (Berkeley) 6/6/93"; #else -static char *rcsid = "$OpenBSD: iso.c,v 1.10 2002/05/27 01:50:36 deraadt Exp $"; +static char *rcsid = "$OpenBSD: iso.c,v 1.11 2003/02/01 01:51:31 deraadt Exp $"; #endif #endif /* not lint */ @@ -120,9 +120,7 @@ * Dump esis stats */ void -esis_stats(off, name) - u_long off; - char *name; +esis_stats(u_long off, char *name) { struct esis_stat esis_stat; @@ -149,9 +147,7 @@ * Dump clnp statistics structure. */ void -clnp_stats(off, name) - u_long off; - char *name; +clnp_stats(u_long off, char *name) { struct clnp_stat clnp_stat; @@ -184,9 +180,7 @@ * Dump CLTP statistics structure. */ void -cltp_stats(off, name) - u_long off; - char *name; +cltp_stats(u_long off, char *name) { struct cltpstat cltpstat; @@ -220,9 +214,7 @@ * -a (all) flag is specified. */ void -iso_protopr(off, name) - u_long off; - char *name; +iso_protopr(u_long off, char *name) { struct isopcb cb; struct isopcb *prev, *next; @@ -257,9 +249,7 @@ } void -iso_protopr1(kern_addr, istp) - u_long kern_addr; - int istp; +iso_protopr1(u_long kern_addr, int istp) { if (first) { printf("Active ISO net connections"); @@ -284,10 +274,10 @@ printf("%-5.5s %6ld %6ld ", "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"); + hexprint(tpcb.tp_lsuffixlen, tpcb.tp_lsuffix, "()"); + printf("\t"); } else if (isopcb.isop_laddr == 0) - printf("*.*\t"); + printf("*.*\t"); else { if ((char *)isopcb.isop_laddr == ((char *)kern_addr) + _offsetof(struct isopcb, isop_sladdr)) @@ -312,9 +302,7 @@ } void -tp_protopr(off, name) - u_long off; - char *name; +tp_protopr(u_long off, char *name) { extern char *tp_sstring[]; struct tp_ref *tpr, *tpr_base; @@ -358,8 +346,7 @@ } void -tp_inproto(pcb) - u_long pcb; +tp_inproto(u_long pcb) { struct inpcb inpcb; @@ -381,8 +368,7 @@ #ifdef notdef char * -isonetname(iso) - struct iso_addr *iso; +isonetname(struct iso_addr *iso) { struct sockaddr_iso sa; struct iso_hostent *ihe = 0; @@ -413,11 +399,7 @@ } static void -isonetprint(iso, sufx, sufxlen, islocal) - struct iso_addr *iso; - char *sufx; - u_short sufxlen; - int islocal; +isonetprint(struct iso_addr *iso, char *sufx, u_short sufxlen, int islocal) { struct iso_hostent *iso_getserventrybytsel(), *ihe; struct iso_hostent Ihe; @@ -457,9 +439,6 @@ } } else snprintf(cp, line + sizeof line - cp, "*"); - /* - fprintf(stdout, Aflag?" %-18.18s":" %-22.22s", line); - */ if (strlen(line) > Alen ) { fprintf(stdout, " %s", line); @@ -472,9 +451,7 @@ #ifdef notdef static void -x25_protopr(off, name) - u_long off; - char *name; +x25_protopr(u_long off, char *name) { static char *xpcb_states[] = { "CLOSED", @@ -546,8 +523,7 @@ struct tp_stat tp_stat; void -tp_stats(off, name) - caddr_t off, name; +tp_stats(caddr_t off, char *name) { if (off == 0) { printf("TP not configured\n\n"); @@ -561,9 +537,7 @@ #define OUT stdout static void -tprintstat(s, indent) - struct tp_stat *s; - int indent; +tprintstat(struct tp_stat *s, int indent) { fprintf(OUT, "%*sReceiving:\n",indent," "); @@ -806,9 +780,7 @@ #endif static void -isonetprint(siso, islocal) - struct sockaddr_iso *siso; - int islocal; +isonetprint(struct sockaddr_iso *siso, int islocal) { hexprint(siso->siso_nlen, siso->siso_addr.isoa_genaddr, "{}"); if (siso->siso_tlen || siso->siso_slen || siso->siso_plen) @@ -823,9 +795,7 @@ static char hexlist[] = "0123456789abcdef", obuf[128]; static void -hexprint(n, buf, delim) - int n; - char *buf, *delim; +hexprint(int n, char *buf, char *delim) { u_char *in = (u_char *)buf, *top = in + n; char *out = obuf;