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

Diff for /src/usr.bin/netstat/Attic/atalk.c between version 1.14 and 1.15

version 1.14, 2005/03/30 06:45:34 version 1.15, 2007/12/14 18:35:46
Line 44 
Line 44 
 #include <sys/socketvar.h>  #include <sys/socketvar.h>
 #include <sys/mbuf.h>  #include <sys/mbuf.h>
 #include <sys/protosw.h>  #include <sys/protosw.h>
   #include <sys/sysctl.h>
 #include <netdb.h>  #include <netdb.h>
   
 #include <net/route.h>  #include <net/route.h>
Line 305 
Line 306 
  * Dump DDP statistics structure.   * Dump DDP statistics structure.
  */   */
 void  void
 ddp_stats(u_long off, char *name)  ddp_stats(char *name)
 {  {
         struct ddpstat  ddpstat;          struct ddpstat  ddpstat;
           int mib[] = { CTL_NET, AF_APPLETALK, ATPROTO_DDP, DDPCTL_STATS };
           size_t len = sizeof(ddpstat);
   
         if (off == 0)          if (sysctl(mib, sizeof(mib) / sizeof(mib[0]),
               &ddpstat, &len, NULL, 0) == -1) {
                   if (errno != ENOPROTOOPT)
                           warn(name);
                 return;                  return;
         if (kread(off, &ddpstat, sizeof(ddpstat)) < 0)          }
                 return;  
         printf("%s:\n", name);          printf("%s:\n", name);
         p(ddps_short, "\t%ld packet%s with short headers\n");          p(ddps_short, "\t%ld packet%s with short headers\n");
         p(ddps_long, "\t%ld packet%s with long headers\n");          p(ddps_long, "\t%ld packet%s with long headers\n");

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15