Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/netstat Use __arraycount() and PRIu64. Delete unnec...



details:   https://anonhg.NetBSD.org/src/rev/35bd713d5afb
branches:  trunk
changeset: 762841:35bd713d5afb
user:      dyoung <dyoung%NetBSD.org@localhost>
date:      Wed Mar 02 19:52:03 2011 +0000

description:
Use __arraycount() and PRIu64.  Delete unnecessary casts to unsigned
long long.

diffstat:

 usr.bin/netstat/inet.c |  364 ++++++++++++++++++++++++------------------------
 1 files changed, 182 insertions(+), 182 deletions(-)

diffs (truncated from 507 to 300 lines):

diff -r 4f3ea9217685 -r 35bd713d5afb usr.bin/netstat/inet.c
--- a/usr.bin/netstat/inet.c    Wed Mar 02 19:31:23 2011 +0000
+++ b/usr.bin/netstat/inet.c    Wed Mar 02 19:52:03 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: inet.c,v 1.94 2011/03/01 19:01:59 dyoung Exp $ */
+/*     $NetBSD: inet.c,v 1.95 2011/03/02 19:52:03 dyoung 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.94 2011/03/01 19:01:59 dyoung Exp $");
+__RCSID("$NetBSD: inet.c,v 1.95 2011/03/02 19:52:03 dyoung Exp $");
 #endif
 #endif /* not lint */
 
@@ -193,7 +193,7 @@
                if (sysctlnametomib(mibname, mib, &namelen) == -1)
                        err(1, "sysctlnametomib: %s", mibname);
 
-               if (prog_sysctl(mib, sizeof(mib) / sizeof(*mib),
+               if (prog_sysctl(mib, __arraycount(mib),
                    NULL, &size, NULL, 0) == -1)
                        err(1, "sysctl (query)");
 
@@ -204,7 +204,7 @@
                mib[6] = sizeof(*pcblist);
                mib[7] = size / sizeof(*pcblist);
 
-               if (prog_sysctl(mib, sizeof(mib) / sizeof(*mib),
+               if (prog_sysctl(mib, __arraycount(mib),
                    pcblist, &size, NULL, 0) == -1)
                        err(1, "sysctl (copy)");
 
@@ -299,102 +299,102 @@
        printf ("%s:\n", name);
 
 #define        ps(f, m) if (tcpstat[f] || sflag <= 1) \
-    printf(m, (unsigned long long)tcpstat[f])
+    printf(m, tcpstat[f])
 #define        p(f, m) if (tcpstat[f] || sflag <= 1) \
-    printf(m, (unsigned long long)tcpstat[f], plural(tcpstat[f]))
+    printf(m, tcpstat[f], plural(tcpstat[f]))
 #define        p2(f1, f2, m) if (tcpstat[f1] || tcpstat[f2] || sflag <= 1) \
-    printf(m, (unsigned long long)tcpstat[f1], plural(tcpstat[f1]), \
-    (unsigned long long)tcpstat[f2], plural(tcpstat[f2]))
+    printf(m, tcpstat[f1], plural(tcpstat[f1]), \
+    tcpstat[f2], plural(tcpstat[f2]))
 #define        p2s(f1, f2, m) if (tcpstat[f1] || tcpstat[f2] || sflag <= 1) \
-    printf(m, (unsigned long long)tcpstat[f1], plural(tcpstat[f1]), \
-    (unsigned long long)tcpstat[f2])
+    printf(m, tcpstat[f1], plural(tcpstat[f1]), \
+    tcpstat[f2])
 #define        p3(f, m) if (tcpstat[f] || sflag <= 1) \
-    printf(m, (unsigned long long)tcpstat[f], plurales(tcpstat[f]))
+    printf(m, tcpstat[f], plurales(tcpstat[f]))
 
-       p(TCP_STAT_SNDTOTAL, "\t%llu packet%s sent\n");
+       p(TCP_STAT_SNDTOTAL, "\t%" PRIu64 " packet%s sent\n");
        p2(TCP_STAT_SNDPACK,TCP_STAT_SNDBYTE,
-               "\t\t%llu data packet%s (%llu byte%s)\n");
+               "\t\t%" PRIu64 " data packet%s (%" PRIu64 " byte%s)\n");
        p2(TCP_STAT_SNDREXMITPACK, TCP_STAT_SNDREXMITBYTE,
-               "\t\t%llu data packet%s (%llu byte%s) retransmitted\n");
+               "\t\t%" PRIu64 " data packet%s (%" PRIu64 " byte%s) retransmitted\n");
        p2s(TCP_STAT_SNDACKS, TCP_STAT_DELACK,
-               "\t\t%llu ack-only packet%s (%llu delayed)\n");
-       p(TCP_STAT_SNDURG, "\t\t%llu URG only packet%s\n");
-       p(TCP_STAT_SNDPROBE, "\t\t%llu window probe packet%s\n");
-       p(TCP_STAT_SNDWINUP, "\t\t%llu window update packet%s\n");
-       p(TCP_STAT_SNDCTRL, "\t\t%llu control packet%s\n");
+               "\t\t%" PRIu64 " ack-only packet%s (%" PRIu64 " delayed)\n");
+       p(TCP_STAT_SNDURG, "\t\t%" PRIu64 " URG only packet%s\n");
+       p(TCP_STAT_SNDPROBE, "\t\t%" PRIu64 " window probe packet%s\n");
+       p(TCP_STAT_SNDWINUP, "\t\t%" PRIu64 " window update packet%s\n");
+       p(TCP_STAT_SNDCTRL, "\t\t%" PRIu64 " control packet%s\n");
        p(TCP_STAT_SELFQUENCH,
-           "\t\t%llu send attempt%s resulted in self-quench\n");
-       p(TCP_STAT_RCVTOTAL, "\t%llu packet%s received\n");
+           "\t\t%" PRIu64 " send attempt%s resulted in self-quench\n");
+       p(TCP_STAT_RCVTOTAL, "\t%" PRIu64 " packet%s received\n");
        p2(TCP_STAT_RCVACKPACK, TCP_STAT_RCVACKBYTE,
-               "\t\t%llu ack%s (for %llu byte%s)\n");
-       p(TCP_STAT_RCVDUPACK, "\t\t%llu duplicate ack%s\n");
-       p(TCP_STAT_RCVACKTOOMUCH, "\t\t%llu ack%s for unsent data\n");
+               "\t\t%" PRIu64 " ack%s (for %" PRIu64 " byte%s)\n");
+       p(TCP_STAT_RCVDUPACK, "\t\t%" PRIu64 " duplicate ack%s\n");
+       p(TCP_STAT_RCVACKTOOMUCH, "\t\t%" PRIu64 " ack%s for unsent data\n");
        p2(TCP_STAT_RCVPACK, TCP_STAT_RCVBYTE,
-               "\t\t%llu packet%s (%llu byte%s) received in-sequence\n");
+               "\t\t%" PRIu64 " packet%s (%" PRIu64 " byte%s) received in-sequence\n");
        p2(TCP_STAT_RCVDUPPACK, TCP_STAT_RCVDUPBYTE,
-               "\t\t%llu completely duplicate packet%s (%llu byte%s)\n");
-       p(TCP_STAT_PAWSDROP, "\t\t%llu old duplicate packet%s\n");
+               "\t\t%" PRIu64 " completely duplicate packet%s (%" PRIu64 " byte%s)\n");
+       p(TCP_STAT_PAWSDROP, "\t\t%" PRIu64 " old duplicate packet%s\n");
        p2(TCP_STAT_RCVPARTDUPPACK, TCP_STAT_RCVPARTDUPBYTE,
-               "\t\t%llu packet%s with some dup. data (%llu byte%s duped)\n");
+               "\t\t%" PRIu64 " packet%s with some dup. data (%" PRIu64 " byte%s duped)\n");
        p2(TCP_STAT_RCVOOPACK, TCP_STAT_RCVOOBYTE,
-               "\t\t%llu out-of-order packet%s (%llu byte%s)\n");
+               "\t\t%" PRIu64 " out-of-order packet%s (%" PRIu64 " byte%s)\n");
        p2(TCP_STAT_RCVPACKAFTERWIN, TCP_STAT_RCVBYTEAFTERWIN,
-               "\t\t%llu packet%s (%llu byte%s) of data after window\n");
-       p(TCP_STAT_RCVWINPROBE, "\t\t%llu window probe%s\n");
-       p(TCP_STAT_RCVWINUPD, "\t\t%llu window update packet%s\n");
-       p(TCP_STAT_RCVAFTERCLOSE, "\t\t%llu packet%s received after close\n");
-       p(TCP_STAT_RCVBADSUM, "\t\t%llu discarded for bad checksum%s\n");
-       p(TCP_STAT_RCVBADOFF, "\t\t%llu discarded for bad header offset field%s\n");
-       ps(TCP_STAT_RCVSHORT, "\t\t%llu discarded because packet too short\n");
-       p(TCP_STAT_CONNATTEMPT, "\t%llu connection request%s\n");
-       p(TCP_STAT_ACCEPTS, "\t%llu connection accept%s\n");
+               "\t\t%" PRIu64 " packet%s (%" PRIu64 " byte%s) of data after window\n");
+       p(TCP_STAT_RCVWINPROBE, "\t\t%" PRIu64 " window probe%s\n");
+       p(TCP_STAT_RCVWINUPD, "\t\t%" PRIu64 " window update packet%s\n");
+       p(TCP_STAT_RCVAFTERCLOSE, "\t\t%" PRIu64 " packet%s received after close\n");
+       p(TCP_STAT_RCVBADSUM, "\t\t%" PRIu64 " discarded for bad checksum%s\n");
+       p(TCP_STAT_RCVBADOFF, "\t\t%" PRIu64 " discarded for bad header offset field%s\n");
+       ps(TCP_STAT_RCVSHORT, "\t\t%" PRIu64 " discarded because packet too short\n");
+       p(TCP_STAT_CONNATTEMPT, "\t%" PRIu64 " connection request%s\n");
+       p(TCP_STAT_ACCEPTS, "\t%" PRIu64 " connection accept%s\n");
        p(TCP_STAT_CONNECTS,
-               "\t%llu connection%s established (including accepts)\n");
+               "\t%" PRIu64 " connection%s established (including accepts)\n");
        p2(TCP_STAT_CLOSED, TCP_STAT_DROPS,
-               "\t%llu connection%s closed (including %llu drop%s)\n");
-       p(TCP_STAT_CONNDROPS, "\t%llu embryonic connection%s dropped\n");
-       p(TCP_STAT_DELAYED_FREE, "\t%llu delayed free%s of tcpcb\n");
+               "\t%" PRIu64 " connection%s closed (including %" PRIu64 " drop%s)\n");
+       p(TCP_STAT_CONNDROPS, "\t%" PRIu64 " embryonic connection%s dropped\n");
+       p(TCP_STAT_DELAYED_FREE, "\t%" PRIu64 " delayed free%s of tcpcb\n");
        p2(TCP_STAT_RTTUPDATED, TCP_STAT_SEGSTIMED,
-               "\t%llu segment%s updated rtt (of %llu attempt%s)\n");
-       p(TCP_STAT_REXMTTIMEO, "\t%llu retransmit timeout%s\n");
+               "\t%" PRIu64 " segment%s updated rtt (of %" PRIu64 " attempt%s)\n");
+       p(TCP_STAT_REXMTTIMEO, "\t%" PRIu64 " retransmit timeout%s\n");
        p(TCP_STAT_TIMEOUTDROP,
-               "\t\t%llu connection%s dropped by rexmit timeout\n");
+               "\t\t%" PRIu64 " connection%s dropped by rexmit timeout\n");
        p2(TCP_STAT_PERSISTTIMEO, TCP_STAT_PERSISTDROPS,
-          "\t%llu persist timeout%s (resulting in %llu dropped "
+          "\t%" PRIu64 " persist timeout%s (resulting in %" PRIu64 " dropped "
                "connection%s)\n");
-       p(TCP_STAT_KEEPTIMEO, "\t%llu keepalive timeout%s\n");
-       p(TCP_STAT_KEEPPROBE, "\t\t%llu keepalive probe%s sent\n");
-       p(TCP_STAT_KEEPDROPS, "\t\t%llu connection%s dropped by keepalive\n");
-       p(TCP_STAT_PREDACK, "\t%llu correct ACK header prediction%s\n");
-       p(TCP_STAT_PREDDAT, "\t%llu correct data packet header prediction%s\n");
-       p3(TCP_STAT_PCBHASHMISS, "\t%llu PCB hash miss%s\n");
-       ps(TCP_STAT_NOPORT, "\t%llu dropped due to no socket\n");
-       p(TCP_STAT_CONNSDRAINED, "\t%llu connection%s drained due to memory "
+       p(TCP_STAT_KEEPTIMEO, "\t%" PRIu64 " keepalive timeout%s\n");
+       p(TCP_STAT_KEEPPROBE, "\t\t%" PRIu64 " keepalive probe%s sent\n");
+       p(TCP_STAT_KEEPDROPS, "\t\t%" PRIu64 " connection%s dropped by keepalive\n");
+       p(TCP_STAT_PREDACK, "\t%" PRIu64 " correct ACK header prediction%s\n");
+       p(TCP_STAT_PREDDAT, "\t%" PRIu64 " correct data packet header prediction%s\n");
+       p3(TCP_STAT_PCBHASHMISS, "\t%" PRIu64 " PCB hash miss%s\n");
+       ps(TCP_STAT_NOPORT, "\t%" PRIu64 " dropped due to no socket\n");
+       p(TCP_STAT_CONNSDRAINED, "\t%" PRIu64 " connection%s drained due to memory "
                "shortage\n");
-       p(TCP_STAT_PMTUBLACKHOLE, "\t%llu PMTUD blackhole%s detected\n");
+       p(TCP_STAT_PMTUBLACKHOLE, "\t%" PRIu64 " PMTUD blackhole%s detected\n");
 
-       p(TCP_STAT_BADSYN, "\t%llu bad connection attempt%s\n");
-       ps(TCP_STAT_SC_ADDED, "\t%llu SYN cache entries added\n");
-       p(TCP_STAT_SC_COLLISIONS, "\t\t%llu hash collision%s\n");
-       ps(TCP_STAT_SC_COMPLETED, "\t\t%llu completed\n");
-       ps(TCP_STAT_SC_ABORTED, "\t\t%llu aborted (no space to build PCB)\n");
-       ps(TCP_STAT_SC_TIMED_OUT, "\t\t%llu timed out\n");
-       ps(TCP_STAT_SC_OVERFLOWED, "\t\t%llu dropped due to overflow\n");
-       ps(TCP_STAT_SC_BUCKETOVERFLOW, "\t\t%llu dropped due to bucket overflow\n");
-       ps(TCP_STAT_SC_RESET, "\t\t%llu dropped due to RST\n");
-       ps(TCP_STAT_SC_UNREACH, "\t\t%llu dropped due to ICMP unreachable\n");
-       ps(TCP_STAT_SC_DELAYED_FREE, "\t\t%llu delayed free of SYN cache "
+       p(TCP_STAT_BADSYN, "\t%" PRIu64 " bad connection attempt%s\n");
+       ps(TCP_STAT_SC_ADDED, "\t%" PRIu64 " SYN cache entries added\n");
+       p(TCP_STAT_SC_COLLISIONS, "\t\t%" PRIu64 " hash collision%s\n");
+       ps(TCP_STAT_SC_COMPLETED, "\t\t%" PRIu64 " completed\n");
+       ps(TCP_STAT_SC_ABORTED, "\t\t%" PRIu64 " aborted (no space to build PCB)\n");
+       ps(TCP_STAT_SC_TIMED_OUT, "\t\t%" PRIu64 " timed out\n");
+       ps(TCP_STAT_SC_OVERFLOWED, "\t\t%" PRIu64 " dropped due to overflow\n");
+       ps(TCP_STAT_SC_BUCKETOVERFLOW, "\t\t%" PRIu64 " dropped due to bucket overflow\n");
+       ps(TCP_STAT_SC_RESET, "\t\t%" PRIu64 " dropped due to RST\n");
+       ps(TCP_STAT_SC_UNREACH, "\t\t%" PRIu64 " dropped due to ICMP unreachable\n");
+       ps(TCP_STAT_SC_DELAYED_FREE, "\t\t%" PRIu64 " delayed free of SYN cache "
                "entries\n");
-       p(TCP_STAT_SC_RETRANSMITTED, "\t%llu SYN,ACK%s retransmitted\n");
-       p(TCP_STAT_SC_DUPESYN, "\t%llu duplicate SYN%s received for entries "
+       p(TCP_STAT_SC_RETRANSMITTED, "\t%" PRIu64 " SYN,ACK%s retransmitted\n");
+       p(TCP_STAT_SC_DUPESYN, "\t%" PRIu64 " duplicate SYN%s received for entries "
                "already in the cache\n");
-       p(TCP_STAT_SC_DROPPED, "\t%llu SYN%s dropped (no route or no space)\n");
-       p(TCP_STAT_BADSIG, "\t%llu packet%s with bad signature\n");
-       p(TCP_STAT_GOODSIG, "\t%llu packet%s with good signature\n");
+       p(TCP_STAT_SC_DROPPED, "\t%" PRIu64 " SYN%s dropped (no route or no space)\n");
+       p(TCP_STAT_BADSIG, "\t%" PRIu64 " packet%s with bad signature\n");
+       p(TCP_STAT_GOODSIG, "\t%" PRIu64 " packet%s with good signature\n");
 
-       p(TCP_STAT_ECN_SHS, "\t%llu sucessful ECN handshake%s\n");
-       p(TCP_STAT_ECN_CE, "\t%llu packet%s with ECN CE bit\n");
-       p(TCP_STAT_ECN_ECT, "\t%llu packet%s ECN ECT(0) bit\n");
+       p(TCP_STAT_ECN_SHS, "\t%" PRIu64 " successful ECN handshake%s\n");
+       p(TCP_STAT_ECN_CE, "\t%" PRIu64 " packet%s with ECN CE bit\n");
+       p(TCP_STAT_ECN_ECT, "\t%" PRIu64 " packet%s ECN ECT(0) bit\n");
 #undef p
 #undef ps
 #undef p2
@@ -425,20 +425,20 @@
        printf ("%s:\n", name);
 
 #define        ps(f, m) if (udpstat[f] || sflag <= 1) \
-    printf(m, (unsigned long long)udpstat[f])
+    printf(m, udpstat[f])
 #define        p(f, m) if (udpstat[f] || sflag <= 1) \
-    printf(m, (unsigned long long)udpstat[f], plural(udpstat[f]))
+    printf(m, udpstat[f], plural(udpstat[f]))
 #define        p3(f, m) if (udpstat[f] || sflag <= 1) \
-    printf(m, (unsigned long long)udpstat[f], plurales(udpstat[f]))
+    printf(m, udpstat[f], plurales(udpstat[f]))
 
-       p(UDP_STAT_IPACKETS, "\t%llu datagram%s received\n");
-       ps(UDP_STAT_HDROPS, "\t%llu with incomplete header\n");
-       ps(UDP_STAT_BADLEN, "\t%llu with bad data length field\n");
-       ps(UDP_STAT_BADSUM, "\t%llu with bad checksum\n");
-       ps(UDP_STAT_NOPORT, "\t%llu dropped due to no socket\n");
+       p(UDP_STAT_IPACKETS, "\t%" PRIu64 " datagram%s received\n");
+       ps(UDP_STAT_HDROPS, "\t%" PRIu64 " with incomplete header\n");
+       ps(UDP_STAT_BADLEN, "\t%" PRIu64 " with bad data length field\n");
+       ps(UDP_STAT_BADSUM, "\t%" PRIu64 " with bad checksum\n");
+       ps(UDP_STAT_NOPORT, "\t%" PRIu64 " dropped due to no socket\n");
        p(UDP_STAT_NOPORTBCAST,
-         "\t%llu broadcast/multicast datagram%s dropped due to no socket\n");
-       ps(UDP_STAT_FULLSOCK, "\t%llu dropped due to full socket buffers\n");
+         "\t%" PRIu64 " broadcast/multicast datagram%s dropped due to no socket\n");
+       ps(UDP_STAT_FULLSOCK, "\t%" PRIu64 " dropped due to full socket buffers\n");
        delivered = udpstat[UDP_STAT_IPACKETS] -
                    udpstat[UDP_STAT_HDROPS] -
                    udpstat[UDP_STAT_BADLEN] -
@@ -447,9 +447,9 @@
                    udpstat[UDP_STAT_NOPORTBCAST] -
                    udpstat[UDP_STAT_FULLSOCK];
        if (delivered || sflag <= 1)
-               printf("\t%llu delivered\n", (unsigned long long)delivered);
-       p3(UDP_STAT_PCBHASHMISS, "\t%llu PCB hash miss%s\n");
-       p(UDP_STAT_OPACKETS, "\t%llu datagram%s output\n");
+               printf("\t%" PRIu64 " delivered\n", delivered);
+       p3(UDP_STAT_PCBHASHMISS, "\t%" PRIu64 " PCB hash miss%s\n");
+       p(UDP_STAT_OPACKETS, "\t%" PRIu64 " datagram%s output\n");
 
 #undef ps
 #undef p
@@ -478,42 +478,42 @@
        printf("%s:\n", name);
 
 #define        ps(f, m) if (ipstat[f] || sflag <= 1) \
-    printf(m, (unsigned long long)ipstat[f])
+    printf(m, ipstat[f])
 #define        p(f, m) if (ipstat[f] || sflag <= 1) \
-    printf(m, (unsigned long long)ipstat[f], plural(ipstat[f]))
+    printf(m, ipstat[f], plural(ipstat[f]))
 
-       p(IP_STAT_TOTAL, "\t%llu total packet%s received\n");
-       p(IP_STAT_BADSUM, "\t%llu bad header checksum%s\n");
-       ps(IP_STAT_TOOSMALL, "\t%llu with size smaller than minimum\n");
-       ps(IP_STAT_TOOSHORT, "\t%llu with data size < data length\n");
-       ps(IP_STAT_TOOLONG, "\t%llu with length > max ip packet size\n");
-       ps(IP_STAT_BADHLEN, "\t%llu with header length < data size\n");
-       ps(IP_STAT_BADLEN, "\t%llu with data length < header length\n");
-       ps(IP_STAT_BADOPTIONS, "\t%llu with bad options\n");
-       ps(IP_STAT_BADVERS, "\t%llu with incorrect version number\n");
-       p(IP_STAT_FRAGMENTS, "\t%llu fragment%s received\n");
-       p(IP_STAT_FRAGDROPPED, "\t%llu fragment%s dropped (dup or out of space)\n");
-       p(IP_STAT_RCVMEMDROP, "\t%llu fragment%s dropped (out of ipqent)\n");
-       p(IP_STAT_BADFRAGS, "\t%llu malformed fragment%s dropped\n");
-       p(IP_STAT_FRAGTIMEOUT, "\t%llu fragment%s dropped after timeout\n");
-       p(IP_STAT_REASSEMBLED, "\t%llu packet%s reassembled ok\n");
-       p(IP_STAT_DELIVERED, "\t%llu packet%s for this host\n");
-       p(IP_STAT_NOPROTO, "\t%llu packet%s for unknown/unsupported protocol\n");
-       p(IP_STAT_FORWARD, "\t%llu packet%s forwarded");
-       p(IP_STAT_FASTFORWARD, " (%llu packet%s fast forwarded)");
+       p(IP_STAT_TOTAL, "\t%" PRIu64 " total packet%s received\n");
+       p(IP_STAT_BADSUM, "\t%" PRIu64 " bad header checksum%s\n");
+       ps(IP_STAT_TOOSMALL, "\t%" PRIu64 " with size smaller than minimum\n");
+       ps(IP_STAT_TOOSHORT, "\t%" PRIu64 " with data size < data length\n");
+       ps(IP_STAT_TOOLONG, "\t%" PRIu64 " with length > max ip packet size\n");
+       ps(IP_STAT_BADHLEN, "\t%" PRIu64 " with header length < data size\n");
+       ps(IP_STAT_BADLEN, "\t%" PRIu64 " with data length < header length\n");
+       ps(IP_STAT_BADOPTIONS, "\t%" PRIu64 " with bad options\n");
+       ps(IP_STAT_BADVERS, "\t%" PRIu64 " with incorrect version number\n");
+       p(IP_STAT_FRAGMENTS, "\t%" PRIu64 " fragment%s received\n");
+       p(IP_STAT_FRAGDROPPED, "\t%" PRIu64 " fragment%s dropped (dup or out of space)\n");
+       p(IP_STAT_RCVMEMDROP, "\t%" PRIu64 " fragment%s dropped (out of ipqent)\n");
+       p(IP_STAT_BADFRAGS, "\t%" PRIu64 " malformed fragment%s dropped\n");
+       p(IP_STAT_FRAGTIMEOUT, "\t%" PRIu64 " fragment%s dropped after timeout\n");
+       p(IP_STAT_REASSEMBLED, "\t%" PRIu64 " packet%s reassembled ok\n");
+       p(IP_STAT_DELIVERED, "\t%" PRIu64 " packet%s for this host\n");
+       p(IP_STAT_NOPROTO, "\t%" PRIu64 " packet%s for unknown/unsupported protocol\n");
+       p(IP_STAT_FORWARD, "\t%" PRIu64 " packet%s forwarded");



Home | Main Index | Thread Index | Old Index