=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/systat/netstat.c,v retrieving revision 1.21 retrieving revision 1.22 diff -c -r1.21 -r1.22 *** src/usr.bin/systat/netstat.c 2002/02/16 21:27:54 1.21 --- src/usr.bin/systat/netstat.c 2002/06/18 00:46:47 1.22 *************** *** 1,4 **** ! /* $OpenBSD: netstat.c,v 1.21 2002/02/16 21:27:54 millert Exp $ */ /* $NetBSD: netstat.c,v 1.3 1995/06/18 23:53:07 cgd Exp $ */ /*- --- 1,4 ---- ! /* $OpenBSD: netstat.c,v 1.22 2002/06/18 00:46:47 deraadt Exp $ */ /* $NetBSD: netstat.c,v 1.3 1995/06/18 23:53:07 cgd Exp $ */ /*- *************** *** 38,44 **** #if 0 static char sccsid[] = "@(#)netstat.c 8.1 (Berkeley) 6/6/93"; #endif ! static char rcsid[] = "$OpenBSD: netstat.c,v 1.21 2002/02/16 21:27:54 millert Exp $"; #endif /* not lint */ /* --- 38,44 ---- #if 0 static char sccsid[] = "@(#)netstat.c 8.1 (Berkeley) 6/6/93"; #endif ! static char rcsid[] = "$OpenBSD: netstat.c,v 1.22 2002/06/18 00:46:47 deraadt Exp $"; #endif /* not lint */ /* *************** *** 91,97 **** #define YMAX(w) ((w)->_maxy-1) WINDOW * ! opennetstat() { sethostent(1); setnetent(1); --- 91,97 ---- #define YMAX(w) ((w)->_maxy-1) WINDOW * ! opennetstat(void) { sethostent(1); setnetent(1); *************** *** 131,138 **** static int lastrow = 1; void ! closenetstat(w) ! WINDOW *w; { struct netinfo *p; --- 131,137 ---- static int lastrow = 1; void ! closenetstat(WINDOW *w) { struct netinfo *p; *************** *** 161,167 **** }; int ! initnetstat() { int ret; --- 160,166 ---- }; int ! initnetstat(void) { int ret; *************** *** 179,185 **** } void ! fetchnetstat() { struct inpcbtable pcbtable; struct inpcb *head, *prev, *next; --- 178,184 ---- } void ! fetchnetstat(void) { struct inpcbtable pcbtable; struct inpcb *head, *prev, *next; *************** *** 211,217 **** while (next != head) { KREAD(next, &inpcb, sizeof (inpcb)); if (inpcb.inp_queue.cqe_prev != prev) { ! printf("prev = %p, head = %p, next = %p, inpcb...prev = %p\n", prev, head, next, inpcb.inp_queue.cqe_prev); p = netcb.nif_forw; for (; p != (struct netinfo *)&netcb; p = p->nif_forw) p->nif_seen = 1; --- 210,217 ---- while (next != head) { KREAD(next, &inpcb, sizeof (inpcb)); if (inpcb.inp_queue.cqe_prev != prev) { ! printf("prev = %p, head = %p, next = %p, inpcb...prev = %p\n", ! prev, head, next, inpcb.inp_queue.cqe_prev); p = netcb.nif_forw; for (; p != (struct netinfo *)&netcb; p = p->nif_forw) p->nif_seen = 1; *************** *** 255,265 **** } static void ! enter(inp, so, state, proto) ! struct inpcb *inp; ! struct socket *so; ! int state; ! char *proto; { struct netinfo *p; --- 255,261 ---- } static void ! enter(struct inpcb *inp, struct socket *so, int state, char *proto) { struct netinfo *p; *************** *** 344,350 **** void ! labelnetstat() { if (namelist[X_TCBTABLE].n_type == 0) return; --- 340,346 ---- void ! labelnetstat(void) { if (namelist[X_TCBTABLE].n_type == 0) return; *************** *** 358,364 **** } void ! shownetstat() { struct netinfo *p, *q; --- 354,360 ---- } void ! shownetstat(void) { struct netinfo *p, *q; *************** *** 461,470 **** * If the nflag was specified, use numbers instead of names. */ static void ! inetprint(in, port, proto) ! struct in_addr *in; ! int port; ! char *proto; { struct servent *sp = 0; char line[80], *cp; --- 457,463 ---- * If the nflag was specified, use numbers instead of names. */ static void ! inetprint(struct in_addr *in, int port, char *proto) { struct servent *sp = 0; char line[80], *cp; *************** *** 489,498 **** #ifdef INET6 static void ! inet6print(in6, port, proto) ! struct in6_addr *in6; ! int port; ! char *proto; { struct servent *sp = 0; char line[80], *cp; --- 482,488 ---- #ifdef INET6 static void ! inet6print(struct in6_addr *in6, int port, char *proto) { struct servent *sp = 0; char line[80], *cp; *************** *** 522,529 **** * numeric value, otherwise try for symbolic name. */ static const char * ! inetname(in) ! struct in_addr in; { char *cp = 0; static char line[50]; --- 512,518 ---- * numeric value, otherwise try for symbolic name. */ static const char * ! inetname(struct in_addr in) { char *cp = 0; static char line[50]; *************** *** 560,567 **** #ifdef INET6 static const char * ! inet6name(in6) ! struct in6_addr *in6; { static char line[NI_MAXHOST]; struct sockaddr_in6 sin6; --- 549,555 ---- #ifdef INET6 static const char * ! inet6name(struct in6_addr *in6) { static char line[NI_MAXHOST]; struct sockaddr_in6 sin6; *************** *** 585,592 **** #endif int ! cmdnetstat(cmd, args) ! char *cmd, *args; { struct netinfo *p; --- 573,579 ---- #endif int ! cmdnetstat(char *cmd, char *args) { struct netinfo *p;