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

Diff for /src/usr.bin/netstat/inet6.c between version 1.39 and 1.40

version 1.39, 2009/07/17 14:21:37 version 1.40, 2009/11/05 20:50:14
Line 51 
Line 51 
 #include <netinet6/in6_var.h>  #include <netinet6/in6_var.h>
 #include <netinet6/pim6_var.h>  #include <netinet6/pim6_var.h>
 #include <netinet6/raw_ip6.h>  #include <netinet6/raw_ip6.h>
   #include <netinet6/ip6_divert.h>
   
 #include <arpa/inet.h>  #include <arpa/inet.h>
 #if 0  #if 0
Line 1028 
Line 1029 
                 printf("\t%llu delivered\n", (unsigned long long)delivered);                  printf("\t%llu delivered\n", (unsigned long long)delivered);
         p(rip6s_opackets, "\t%llu datagram%s output\n");          p(rip6s_opackets, "\t%llu datagram%s output\n");
 #undef p  #undef p
   }
   
   /*
    * Dump divert6 statistics structure.
    */
   void
   div6_stats(char *name)
   {
           struct div6stat div6stat;
           int mib[] = { CTL_NET, AF_INET6, IPPROTO_DIVERT, DIVERT6CTL_STATS };
           size_t len = sizeof(div6stat);
   
           if (sysctl(mib, sizeof(mib) / sizeof(mib[0]),
               &div6stat, &len, NULL, 0) == -1) {
                   if (errno != ENOPROTOOPT)
                           warn(name);
                   return;
           }
   
           printf("%s:\n", name);
   #define p(f, m) if (div6stat.f || sflag <= 1) \
       printf(m, div6stat.f, plural(div6stat.f))
   #define p1(f, m) if (div6stat.f || sflag <= 1) \
       printf(m, div6stat.f)
           p(divs_ipackets, "\t%lu total packet%s received\n");
           p1(divs_noport, "\t%lu dropped due to no socket\n");
           p1(divs_fullsock, "\t%lu dropped due to full socket buffers\n");
           p(divs_opackets, "\t%lu packet%s output\n");
           p1(divs_errors, "\t%lu errors\n");
   #undef p
   #undef p1
 }  }
   
 /*  /*

Legend:
Removed from v.1.39  
changed lines
  Added in v.1.40