diff options
author | ru <ru@FreeBSD.org> | 2001-03-13 13:26:06 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2001-03-13 13:26:06 +0000 |
commit | e7537660da15b12ac3a6e5a2f6d88f50e7c159ec (patch) | |
tree | 1d7552245a3d5ccf12b1f91b3d655f35372b96f8 /usr.bin | |
parent | 3cf204f73d0d9a605286ef73cf6608c9da8f1249 (diff) | |
download | FreeBSD-src-e7537660da15b12ac3a6e5a2f6d88f50e7c159ec.zip FreeBSD-src-e7537660da15b12ac3a6e5a2f6d88f50e7c159ec.tar.gz |
Count and show incoming UDP datagrams with no checksum.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/netstat/inet.c | 1 | ||||
-rw-r--r-- | usr.bin/systat/ip.c | 38 |
2 files changed, 21 insertions, 18 deletions
diff --git a/usr.bin/netstat/inet.c b/usr.bin/netstat/inet.c index c14c7a2..a2c2259 100644 --- a/usr.bin/netstat/inet.c +++ b/usr.bin/netstat/inet.c @@ -476,6 +476,7 @@ udp_stats(off, name) p1a(udps_hdrops, "\t%lu with incomplete header\n"); p1a(udps_badlen, "\t%lu with bad data length field\n"); p1a(udps_badsum, "\t%lu with bad checksum\n"); + p1a(udps_nosum, "\t%lu with no checksum\n"); p1a(udps_noport, "\t%lu dropped due to no socket\n"); p(udps_noportbcast, "\t%lu broadcast/multicast datagram%s dropped due to no socket\n"); diff --git a/usr.bin/systat/ip.c b/usr.bin/systat/ip.c index d54c76d..6616b2a 100644 --- a/usr.bin/systat/ip.c +++ b/usr.bin/systat/ip.c @@ -83,12 +83,12 @@ static struct stat curstat, initstat, oldstat; 11999999999 - fragments dropped 999999999 total input packets 12999999999 - fragments timed out 999999999 - too short for header 13999999999 - packets reassembled ok 999999999 - invalid checksum -14999999999 packets forwarded 999999999 - invalid length -15999999999 - unreachable dests 999999999 - no socket for dest port -16999999999 - redirects generated 999999999 - no socket for broadcast -17999999999 option errors 999999999 - socket buffer full -18999999999 unwanted multicasts 999999999 total output packets -19999999999 delivered to upper layer +14999999999 packets forwarded 999999999 - no checksum +15999999999 - unreachable dests 999999999 - invalid length +16999999999 - redirects generated 999999999 - no socket for dest port +17999999999 option errors 999999999 - no socket for broadcast +18999999999 unwanted multicasts 999999999 - socket buffer full +19999999999 delivered to upper layer 999999999 total output packets --0123456789012345678901234567890123456789012345678901234567890123456789012345 --0 1 2 3 4 5 6 7 */ @@ -96,7 +96,7 @@ static struct stat curstat, initstat, oldstat; WINDOW * openip(void) { - return (subwin(stdscr, LINES-5-1, 0, 5, 0)); + return (subwin(stdscr, LINES-4-1, 0, 4, 0)); } void @@ -129,12 +129,12 @@ labelip(void) L(11, "- fragments dropped"); R(11, "total input packets"); L(12, "- fragments timed out"); R(12, "- too short for header"); L(13, "- packets reassembled ok"); R(13, "- invalid checksum"); - L(14, "packets forwarded"); R(14, "- invalid length"); - L(15, "- unreachable dests"); R(15, "- no socket for dest port"); - L(16, "- redirects generated"); R(16, "- no socket for broadcast"); - L(17, "option errors"); R(17, "- socket buffer full"); - L(18, "unwanted multicasts"); R(18, "total output packets"); - L(19, "delivered to upper layer"); + L(14, "packets forwarded"); R(14, "- no checksum"); + L(15, "- unreachable dests"); R(15, "- invalid length"); + L(16, "- redirects generated"); R(16, "- no socket for dest port"); + L(17, "option errors"); R(17, "- no socket for broadcast"); + L(18, "unwanted multicasts"); R(18, "- socket buffer full"); + L(19, "delivered to upper layer"); R(19, "total output packets"); #undef L #undef R } @@ -190,6 +190,7 @@ domode(struct stat *ret) DO(u.udps_ipackets); DO(u.udps_hdrops); DO(u.udps_badsum); + DO(u.udps_nosum); DO(u.udps_badlen); DO(u.udps_noport); DO(u.udps_noportbcast); @@ -233,16 +234,17 @@ showip(void) DO(i.ips_reassembled, 13, 0); DO(u.udps_badsum, 13, 35); DO(i.ips_forward, 14, 0); - DO(u.udps_badlen, 14, 35); + DO(u.udps_nosum, 14, 35); DO(i.ips_cantforward, 15, 0); - DO(u.udps_noport, 15, 35); + DO(u.udps_badlen, 15, 35); DO(i.ips_redirectsent, 16, 0); - DO(u.udps_noportbcast, 16, 35); + DO(u.udps_noport, 16, 35); DO(i.ips_badoptions, 17, 0); - DO(u.udps_fullsock, 17, 35); + DO(u.udps_noportbcast, 17, 35); DO(i.ips_notmember, 18, 0); - DO(u.udps_opackets, 18, 35); + DO(u.udps_fullsock, 18, 35); DO(i.ips_delivered, 19, 0); + DO(u.udps_opackets, 19, 35); #undef DO } |