ipx.c (160789) | ipx.c (171465) |
---|---|
1/* 2 * Copyright (c) 2004, Robert N. M. Watson 3 * Copyright (c) 1983, 1988, 1993 4 * The Regents of the University of California. All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 25 unchanged lines hidden (view full) --- 34 35#if 0 36#ifndef lint 37static char sccsid[] = "@(#)ns.c 8.1 (Berkeley) 6/6/93"; 38#endif /* not lint */ 39#endif 40 41#include <sys/cdefs.h> | 1/* 2 * Copyright (c) 2004, Robert N. M. Watson 3 * Copyright (c) 1983, 1988, 1993 4 * The Regents of the University of California. All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 25 unchanged lines hidden (view full) --- 34 35#if 0 36#ifndef lint 37static char sccsid[] = "@(#)ns.c 8.1 (Berkeley) 6/6/93"; 38#endif /* not lint */ 39#endif 40 41#include <sys/cdefs.h> |
42__FBSDID("$FreeBSD: head/usr.bin/netstat/ipx.c 160789 2006-07-28 16:16:40Z yar $"); | 42__FBSDID("$FreeBSD: head/usr.bin/netstat/ipx.c 171465 2007-07-16 17:15:55Z jhb $"); |
43 44#include <sys/param.h> 45#include <sys/queue.h> 46#include <sys/socket.h> 47#include <sys/socketvar.h> 48#include <sys/protosw.h> 49 50#include <net/route.h> --- 26 unchanged lines hidden (view full) --- 77/* 78 * Print a summary of connections related to a Network Systems 79 * protocol. For SPX, also give state of connection. 80 * Listening processes (aflag) are suppressed unless the 81 * -a (all) flag is specified. 82 */ 83 84void | 43 44#include <sys/param.h> 45#include <sys/queue.h> 46#include <sys/socket.h> 47#include <sys/socketvar.h> 48#include <sys/protosw.h> 49 50#include <net/route.h> --- 26 unchanged lines hidden (view full) --- 77/* 78 * Print a summary of connections related to a Network Systems 79 * protocol. For SPX, also give state of connection. 80 * Listening processes (aflag) are suppressed unless the 81 * -a (all) flag is specified. 82 */ 83 84void |
85ipxprotopr(u_long off, const char *name, int af1 __unused) | 85ipxprotopr(u_long off, const char *name, int af1 __unused, int proto __unused) |
86{ 87 struct ipxpcbhead cb; 88 struct ipxpcb *ipxp; 89 struct ipxpcb ipxpcb; 90 struct spxpcb spxpcb; 91 struct socket sockb; 92 static int first = 1; 93 int isspx; --- 56 unchanged lines hidden (view full) --- 150 if (x || sflag <= 1) printf("\t%u %s%s%s\n", x, y, plural(x), z) 151#define ANYl(x,y,z) \ 152 if (x || sflag <= 1) printf("\t%lu %s%s%s\n", x, y, plural(x), z) 153 154/* 155 * Dump SPX statistics structure. 156 */ 157void | 86{ 87 struct ipxpcbhead cb; 88 struct ipxpcb *ipxp; 89 struct ipxpcb ipxpcb; 90 struct spxpcb spxpcb; 91 struct socket sockb; 92 static int first = 1; 93 int isspx; --- 56 unchanged lines hidden (view full) --- 150 if (x || sflag <= 1) printf("\t%u %s%s%s\n", x, y, plural(x), z) 151#define ANYl(x,y,z) \ 152 if (x || sflag <= 1) printf("\t%lu %s%s%s\n", x, y, plural(x), z) 153 154/* 155 * Dump SPX statistics structure. 156 */ 157void |
158spx_stats(u_long off, const char *name, int af1 __unused) | 158spx_stats(u_long off, const char *name, int af1 __unused, int proto __unused) |
159{ 160 struct spx_istat spx_istat; 161#define spxstat spx_istat.newstats 162 163 if (off == 0) 164 return; 165 kread(off, (char *)&spx_istat, sizeof (spx_istat)); 166 printf("%s:\n", name); --- 59 unchanged lines hidden (view full) --- 226 ANYl(spxstat.spxs_rcvackbyte, "byte", " acked by rcvd acks"); 227 ANYl(spxstat.spxs_rcvwinupd, "rcvd window update packet", ""); 228} 229 230/* 231 * Dump IPX statistics structure. 232 */ 233void | 159{ 160 struct spx_istat spx_istat; 161#define spxstat spx_istat.newstats 162 163 if (off == 0) 164 return; 165 kread(off, (char *)&spx_istat, sizeof (spx_istat)); 166 printf("%s:\n", name); --- 59 unchanged lines hidden (view full) --- 226 ANYl(spxstat.spxs_rcvackbyte, "byte", " acked by rcvd acks"); 227 ANYl(spxstat.spxs_rcvwinupd, "rcvd window update packet", ""); 228} 229 230/* 231 * Dump IPX statistics structure. 232 */ 233void |
234ipx_stats(u_long off, const char *name, int af1 __unused) | 234ipx_stats(u_long off, const char *name, int af1 __unused, int proto __unused) |
235{ 236 struct ipxstat ipxstat; 237 238 if (off == 0) 239 return; 240 kread(off, (char *)&ipxstat, sizeof (ipxstat)); 241 printf("%s:\n", name); 242 ANYl(ipxstat.ipxs_total, "total packet", " received"); --- 26 unchanged lines hidden (view full) --- 269 {-1, 0, 0}, 270}; 271 272/* 273 * Dump IPX Error statistics structure. 274 */ 275/*ARGSUSED*/ 276void | 235{ 236 struct ipxstat ipxstat; 237 238 if (off == 0) 239 return; 240 kread(off, (char *)&ipxstat, sizeof (ipxstat)); 241 printf("%s:\n", name); 242 ANYl(ipxstat.ipxs_total, "total packet", " received"); --- 26 unchanged lines hidden (view full) --- 269 {-1, 0, 0}, 270}; 271 272/* 273 * Dump IPX Error statistics structure. 274 */ 275/*ARGSUSED*/ 276void |
277ipxerr_stats(u_long off, const char *name, int af __unused) | 277ipxerr_stats(u_long off, const char *name, int af __unused, int proto __unused) |
278{ 279 struct ipx_errstat ipx_errstat; 280 int j; 281 int histoprint = 1; 282 int z; 283 284 if (off == 0) 285 return; --- 66 unchanged lines hidden --- | 278{ 279 struct ipx_errstat ipx_errstat; 280 int j; 281 int histoprint = 1; 282 int z; 283 284 if (off == 0) 285 return; --- 66 unchanged lines hidden --- |