[BACK]Return to inet.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / netstat

Diff for /src/usr.bin/netstat/inet.c between version 1.9 and 1.10

version 1.9, 1997/02/21 02:46:49 version 1.10, 1997/02/21 09:09:50
Line 68 
Line 68 
 #include <netinet/tcp_debug.h>  #include <netinet/tcp_debug.h>
 #include <netinet/udp.h>  #include <netinet/udp.h>
 #include <netinet/udp_var.h>  #include <netinet/udp_var.h>
   #include <netinet/ip_ah.h>
   #include <netinet/ip_esp.h>
   #include <netinet/ip_ip4.h>
   
 #include <arpa/inet.h>  #include <arpa/inet.h>
 #include <netdb.h>  #include <netdb.h>
Line 575 
Line 578 
                     C(inp->s_addr >> 16), C(inp->s_addr >> 8), C(inp->s_addr));                      C(inp->s_addr >> 16), C(inp->s_addr >> 8), C(inp->s_addr));
         }          }
         return (line);          return (line);
   }
   
   /*
    * Dump AH statistics structure.
    */
   void
   ah_stats(off, name)
           u_long off;
           char *name;
   {
           struct ahstat ahstat;
   
           if (off == 0)
                   return;
           kread(off, (char *)&ahstat, sizeof (ahstat));
           printf("%s:\n", name);
   
   #define p(f, m) if (ahstat.f || sflag <= 1) \
       printf(m, ahstat.f, plural(ahstat.f))
   
           p(ahs_hdrops, "\t%u packet%s shorter than header shows\n");
           p(ahs_notdb, "\t%u packet%s for which no TDB was found\n");
           p(ahs_badkcr, "\t%u input packet%s that failed to be processed\n");
           p(ahs_badauth, "\t%u packet%s that failed verification received\n");
           p(ahs_noxform, "\t%u packet%s for which no XFORM was set in TDB received\n");
           p(ahs_qfull, "\t%u packet%s were dropeed due to full output queue\n");
           p(ahs_wrap, "\t%u packet%s where counter wrapping was detected\n");
           p(ahs_replay, "\t%u possibly replayed packet%s received\n");
           p(ahs_badauthl, "\t%u packet%s with bad authenticator length received\n");
   #undef p
   }
   
   /*
    * Dump ESP statistics structure.
    */
   void
   esp_stats(off, name)
           u_long off;
           char *name;
   {
           struct espstat espstat;
   
           if (off == 0)
                   return;
           kread(off, (char *)&espstat, sizeof (espstat));
           printf("%s:\n", name);
   
   #define p(f, m) if (espstat.f || sflag <= 1) \
       printf(m, espstat.f, plural(espstat.f))
   
           p(esps_hdrops, "\t%u packet%s shorter than header shows\n");
           p(esps_notdb, "\t%u packet%s for which no TDB was found\n");
           p(esps_badkcr, "\t%u input packet%s that failed to be processed\n");
           p(esps_badauth, "\t%u packet%s that failed verification received\n");
           p(esps_noxform, "\t%u packet%s for which no XFORM was set in TDB received\n");
           p(esps_qfull, "\t%u packet%s were dropeed due to full output queue\n");
           p(esps_wrap, "\t%u packet%s where counter wrapping was detected\n");
           p(esps_replay, "\t%u possibly replayed packet%s received\n");
           p(esps_badilen, "\t%u packet%s with payload not a multiple of 8 received\n");
   
   #undef p
   }
   
   /*
    * Dump ESP statistics structure.
    */
   void
   ip4_stats(off, name)
           u_long off;
           char *name;
   {
           struct ip4stat ip4stat;
   
           if (off == 0)
                   return;
           kread(off, (char *)&ip4stat, sizeof (ip4stat));
           printf("%s:\n", name);
   
   #define p(f, m) if (ip4stat.f || sflag <= 1) \
       printf(m, ip4stat.f, plural(ip4stat.f))
   
           p(ip4s_ipackets, "\t%u total input packet%s\n");
           p(ip4s_hdrops, "\t%u packet%s shorter than header shows\n");
           p(ip4s_notip4, "\t%u packet%s with internal header not IPv4 received\n");
           p(ip4s_qfull, "\t%u packet%s were dropeed due to full output queue\n");
   
   #undef p
 }  }

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10