diff options
Diffstat (limited to 'usr.bin/netstat')
-rw-r--r-- | usr.bin/netstat/inet.c | 12 | ||||
-rw-r--r-- | usr.bin/netstat/sctp.c | 8 |
2 files changed, 15 insertions, 5 deletions
diff --git a/usr.bin/netstat/inet.c b/usr.bin/netstat/inet.c index 139ff9294fde..7014f02032c2 100644 --- a/usr.bin/netstat/inet.c +++ b/usr.bin/netstat/inet.c @@ -904,7 +904,7 @@ void udp_stats(u_long off, const char *name, int af1 __unused, int proto __unused) { struct udpstat udpstat; - uint64_t delivered; + uint64_t delivered, noportbmcast; #ifdef INET6 if (udp_done != 0) @@ -937,8 +937,11 @@ udp_stats(u_long off, const char *name, int af1 __unused, int proto __unused) "{N:/with no checksum}\n"); p1a(udps_noport, "{:dropped-no-socket/%ju} " "{N:/dropped due to no socket}\n"); - p(udps_noportbcast, "{:dropped-broadcast-multicast/%ju} " - "{N:/broadcast\\/multicast datagram%s undelivered}\n"); + noportbmcast = udpstat.udps_noportmcast + udpstat.udps_noportbcast; + if (noportbmcast || sflag <= 1) + xo_emit("\t{:dropped-broadcast-multicast/%ju} " + "{N:/broadcast\\/multicast datagram%s undelivered}\n", + (uintmax_t)noportbmcast, plural(noportbmcast)); p1a(udps_fullsock, "{:dropped-full-socket-buffer/%ju} " "{N:/dropped due to full socket buffers}\n"); p1a(udpps_pcbhashmiss, "{:not-for-hashed-pcb/%ju} " @@ -948,11 +951,10 @@ udp_stats(u_long off, const char *name, int af1 __unused, int proto __unused) udpstat.udps_badlen - udpstat.udps_badsum - udpstat.udps_noport - - udpstat.udps_noportbcast - udpstat.udps_fullsock; if (delivered || sflag <= 1) xo_emit("\t{:delivered-packets/%ju} {N:/delivered}\n", - (uint64_t)delivered); + (uintmax_t)delivered); p(udps_opackets, "{:output-packets/%ju} {N:/datagram%s output}\n"); /* the next statistic is cumulative in udps_noportbcast */ p(udps_filtermcast, "{:multicast-source-filter-matches/%ju} " diff --git a/usr.bin/netstat/sctp.c b/usr.bin/netstat/sctp.c index c3abac407327..08cfc31c12c9 100644 --- a/usr.bin/netstat/sctp.c +++ b/usr.bin/netstat/sctp.c @@ -622,6 +622,10 @@ sctp_stats(u_long off, const char *name, int af1 __unused, int proto __unused) "{N:/fast path receives all one chunk}\n"); p1a(sctps_recvexpressm, "\t\t{:receives-fast-path-multipart/%ju} " "{N:/fast path multi-part data}\n"); + p1a(sctps_recvswcrc, "\t\t{:performed-receive-crc32c-computation/%ju} " + "{N:/performed receive crc32c computation}\n"); + p1a(sctps_recvhwcrc, "\t\t{:performed-receive-crc32c-offloading/%ju} " + "{N:/performed receive crc32c offloading}\n"); /* * output statistics @@ -648,6 +652,10 @@ sctp_stats(u_long off, const char *name, int af1 __unused, int proto __unused) "{N:/output AUTH chunk%s}\n"); p1a(sctps_senderrors, "\t\t{:send-errors/%ju} " "{N:/ip_output error counter}\n"); + p1a(sctps_sendswcrc, "\t\t{:performed-receive-crc32c-computation/%ju} " + "{N:/performed transmit crc32c computation}\n"); + p1a(sctps_sendhwcrc, "\t\t{:performed-transmit-crc32c-offloading/%ju} " + "{N:/performed transmit crc32c offloading}\n"); /* * PCKDROPREP statistics |