BSD 4_4_Lite1 release
[unix-history] / usr / src / usr.bin / netstat / inet.c
index 3bed296..099333e 100644 (file)
@@ -32,7 +32,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)inet.c     8.1 (Berkeley) 6/6/93";
+static char sccsid[] = "@(#)inet.c     8.4 (Berkeley) 4/20/94";
 #endif /* not lint */
 
 #include <sys/param.h>
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -169,6 +169,8 @@ tcp_stats(off, name)
     printf(m, tcpstat.f, plural(tcpstat.f))
 #define        p2(f1, f2, m) if (tcpstat.f1 || tcpstat.f2 || sflag <= 1) \
     printf(m, tcpstat.f1, plural(tcpstat.f1), tcpstat.f2, plural(tcpstat.f2))
     printf(m, tcpstat.f, plural(tcpstat.f))
 #define        p2(f1, f2, m) if (tcpstat.f1 || tcpstat.f2 || sflag <= 1) \
     printf(m, tcpstat.f1, plural(tcpstat.f1), tcpstat.f2, plural(tcpstat.f2))
+#define        p3(f, m) if (tcpstat.f || sflag <= 1) \
+    printf(m, tcpstat.f, plurales(tcpstat.f))
 
        p(tcps_sndtotal, "\t%d packet%s sent\n");
        p2(tcps_sndpack,tcps_sndbyte,
 
        p(tcps_sndtotal, "\t%d packet%s sent\n");
        p2(tcps_sndpack,tcps_sndbyte,
@@ -216,8 +218,12 @@ tcp_stats(off, name)
        p(tcps_keeptimeo, "\t%d keepalive timeout%s\n");
        p(tcps_keepprobe, "\t\t%d keepalive probe%s sent\n");
        p(tcps_keepdrops, "\t\t%d connection%s dropped by keepalive\n");
        p(tcps_keeptimeo, "\t%d keepalive timeout%s\n");
        p(tcps_keepprobe, "\t\t%d keepalive probe%s sent\n");
        p(tcps_keepdrops, "\t\t%d connection%s dropped by keepalive\n");
+       p(tcps_predack, "\t%d correct ACK header prediction%s\n");
+       p(tcps_preddat, "\t%d correct data packet header prediction%s\n");
+       p3(tcps_pcbcachemiss, "\t%d PCB cache miss%s\n");
 #undef p
 #undef p2
 #undef p
 #undef p2
+#undef p3
 }
 
 /*
 }
 
 /*
@@ -277,8 +283,8 @@ ip_stats(off, name)
 
        p(ips_total, "\t%u total packet%s received\n");
        p(ips_badsum, "\t%u bad header checksum%s\n");
 
        p(ips_total, "\t%u total packet%s received\n");
        p(ips_badsum, "\t%u bad header checksum%s\n");
-       p(ips_tooshort, "\t%u with size smaller than minimum\n");
-       p(ips_toosmall, "\t%u with data size < data length\n");
+       p(ips_toosmall, "\t%u with size smaller than minimum\n");
+       p(ips_tooshort, "\t%u with data size < data length\n");
        p(ips_badhlen, "\t%u with header length < data size\n");
        p(ips_badlen, "\t%u with data length < header length\n");
        p(ips_badoptions, "\t%u with bad options\n");
        p(ips_badhlen, "\t%u with header length < data size\n");
        p(ips_badlen, "\t%u with data length < header length\n");
        p(ips_badoptions, "\t%u with bad options\n");