Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/netstat netstat: support new packet counters



details:   https://anonhg.NetBSD.org/src/rev/f3333a795219
branches:  trunk
changeset: 943170:f3333a795219
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Fri Aug 28 06:34:17 2020 +0000

description:
netstat: support new packet counters

diffstat:

 usr.bin/netstat/inet.c  |  11 +++++++++--
 usr.bin/netstat/inet6.c |  11 +++++++++--
 2 files changed, 18 insertions(+), 4 deletions(-)

diffs (64 lines):

diff -r 408ceccf0365 -r f3333a795219 usr.bin/netstat/inet.c
--- a/usr.bin/netstat/inet.c    Fri Aug 28 06:32:24 2020 +0000
+++ b/usr.bin/netstat/inet.c    Fri Aug 28 06:34:17 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: inet.c,v 1.111 2020/08/06 07:38:54 knakahara Exp $     */
+/*     $NetBSD: inet.c,v 1.112 2020/08/28 06:34:17 ozaki-r Exp $       */
 
 /*
  * Copyright (c) 1983, 1988, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "from: @(#)inet.c       8.4 (Berkeley) 4/20/94";
 #else
-__RCSID("$NetBSD: inet.c,v 1.111 2020/08/06 07:38:54 knakahara Exp $");
+__RCSID("$NetBSD: inet.c,v 1.112 2020/08/28 06:34:17 ozaki-r Exp $");
 #endif
 #endif /* not lint */
 
@@ -633,6 +633,13 @@
        p(IP_STAT_BADADDR, "\t%" PRIu64 " datagram%s with bad address in header\n");
        p(IP_STAT_PFILDROP_IN, "\t%" PRIu64 " input packet%s dropped by pfil\n");
        p(IP_STAT_PFILDROP_OUT, "\t%" PRIu64 " output packet%s dropped by pfil\n");
+       p(IP_STAT_IPSECDROP_IN, "\t%" PRIu64 " input packet%s dropped by IPsec\n");
+       p(IP_STAT_IPSECDROP_OUT, "\t%" PRIu64 " output packet%s dropped by IPsec\n");
+       p(IP_STAT_IFDROP, "\t%" PRIu64 " input packet%s dropped due to interface state\n");
+       p(IP_STAT_TIMXCEED, "\t%" PRIu64 " packet%s dropped due to TTL exceeded\n");
+       p(IP_STAT_IFNOADDR, "\t%" PRIu64 " output packet%s dropped (no IP address)\n");
+       p(IP_STAT_RTREJECT, "\t%" PRIu64 " output packet%s discarded due to reject route\n");
+       p(IP_STAT_BCASTDENIED, "\t%" PRIu64 " output packet%s dropped (broadcast prohibited)\n");
 #undef ps
 #undef p
 }
diff -r 408ceccf0365 -r f3333a795219 usr.bin/netstat/inet6.c
--- a/usr.bin/netstat/inet6.c   Fri Aug 28 06:32:24 2020 +0000
+++ b/usr.bin/netstat/inet6.c   Fri Aug 28 06:34:17 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: inet6.c,v 1.75 2020/08/06 07:38:54 knakahara Exp $     */
+/*     $NetBSD: inet6.c,v 1.76 2020/08/28 06:34:17 ozaki-r Exp $       */
 /*     BSDI inet.c,v 2.3 1995/10/24 02:19:29 prb Exp   */
 
 /*
@@ -64,7 +64,7 @@
 #if 0
 static char sccsid[] = "@(#)inet.c     8.4 (Berkeley) 4/20/94";
 #else
-__RCSID("$NetBSD: inet6.c,v 1.75 2020/08/06 07:38:54 knakahara Exp $");
+__RCSID("$NetBSD: inet6.c,v 1.76 2020/08/28 06:34:17 ozaki-r Exp $");
 #endif
 #endif /* not lint */
 
@@ -801,6 +801,13 @@
        p1(IP6_STAT_FORWARD_CACHEMISS, "\t%llu forward cache miss\n");
        p(IP6_STAT_PFILDROP_IN, "\t%llu input packet%s dropped by pfil\n");
        p(IP6_STAT_PFILDROP_OUT, "\t%llu output packet%s dropped by pfil\n");
+       p(IP6_STAT_IPSECDROP_IN, "\t%llu input packet%s dropped by IPsec\n");
+       p(IP6_STAT_IPSECDROP_OUT, "\t%llu output packet%s dropped by IPsec\n");
+       p(IP6_STAT_IFDROP, "\t%llu input packet%s dropped due to interface state\n");
+       p(IP6_STAT_IDROPPED, "\t%llu input packet%s dropped due to no bufs, etc.\n");
+       p(IP6_STAT_TIMXCEED, "\t%llu packet%s dropped due to hop limit exceeded\n");
+       p(IP6_STAT_TOOBIG, "\t%llu packet%s dropped (too big)\n");
+       p(IP6_STAT_RTREJECT, "\t%llu output packet%s discarded due to reject route\n");
 #undef p
 #undef p1
 }



Home | Main Index | Thread Index | Old Index