[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.123 and 1.124

version 1.123, 2013/04/18 15:43:22 version 1.124, 2013/08/18 16:32:24
Line 258 
Line 258 
         if (sysctl(mib, sizeof(mib) / sizeof(mib[0]),          if (sysctl(mib, sizeof(mib) / sizeof(mib[0]),
             &tcpstat, &len, NULL, 0) == -1) {              &tcpstat, &len, NULL, 0) == -1) {
                 if (errno != ENOPROTOOPT)                  if (errno != ENOPROTOOPT)
                         warn(name);                          warn("%s", name);
                 return;                  return;
         }          }
   
Line 389 
Line 389 
         if (sysctl(mib, sizeof(mib) / sizeof(mib[0]),          if (sysctl(mib, sizeof(mib) / sizeof(mib[0]),
             &udpstat, &len, NULL, 0) == -1) {              &udpstat, &len, NULL, 0) == -1) {
                 if (errno != ENOPROTOOPT)                  if (errno != ENOPROTOOPT)
                         warn(name);                          warn("%s", name);
                 return;                  return;
         }          }
   
Line 435 
Line 435 
         if (sysctl(mib, sizeof(mib) / sizeof(mib[0]),          if (sysctl(mib, sizeof(mib) / sizeof(mib[0]),
             &ipstat, &len, NULL, 0) == -1) {              &ipstat, &len, NULL, 0) == -1) {
                 if (errno != ENOPROTOOPT)                  if (errno != ENOPROTOOPT)
                         warn(name);                          warn("%s", name);
                 return;                  return;
         }          }
   
Line 494 
Line 494 
         if (sysctl(mib, sizeof(mib) / sizeof(mib[0]),          if (sysctl(mib, sizeof(mib) / sizeof(mib[0]),
             &divstat, &len, NULL, 0) == -1) {              &divstat, &len, NULL, 0) == -1) {
                 if (errno != ENOPROTOOPT)                  if (errno != ENOPROTOOPT)
                         warn(name);                          warn("%s", name);
                 return;                  return;
         }          }
   
Line 570 
Line 570 
         if (sysctl(mib, sizeof(mib) / sizeof(mib[0]),          if (sysctl(mib, sizeof(mib) / sizeof(mib[0]),
             &icmpstat, &len, NULL, 0) == -1) {              &icmpstat, &len, NULL, 0) == -1) {
                 if (errno != ENOPROTOOPT)                  if (errno != ENOPROTOOPT)
                         warn(name);                          warn("%s", name);
                 return;                  return;
         }          }
   
Line 628 
Line 628 
         if (sysctl(mib, sizeof(mib) / sizeof(mib[0]),          if (sysctl(mib, sizeof(mib) / sizeof(mib[0]),
             &igmpstat, &len, NULL, 0) == -1) {              &igmpstat, &len, NULL, 0) == -1) {
                 if (errno != ENOPROTOOPT)                  if (errno != ENOPROTOOPT)
                         warn(name);                          warn("%s", name);
                 return;                  return;
         }          }
   
Line 664 
Line 664 
         if (sysctl(mib, sizeof(mib) / sizeof(mib[0]),          if (sysctl(mib, sizeof(mib) / sizeof(mib[0]),
             &pimstat, &len, NULL, 0) == -1) {              &pimstat, &len, NULL, 0) == -1) {
                 if (errno != ENOPROTOOPT)                  if (errno != ENOPROTOOPT)
                         warn(name);                          warn("%s", name);
                 return;                  return;
         }          }
   
Line 858 
Line 858 
         if (sysctl(mib, sizeof(mib) / sizeof(mib[0]),          if (sysctl(mib, sizeof(mib) / sizeof(mib[0]),
             &ahstat, &len, NULL, 0) == -1) {              &ahstat, &len, NULL, 0) == -1) {
                 if (errno != ENOPROTOOPT)                  if (errno != ENOPROTOOPT)
                         warn(name);                          warn("%s", name);
                 return;                  return;
         }          }
   
Line 904 
Line 904 
         if (sysctl(mib, sizeof(mib) / sizeof(mib[0]),          if (sysctl(mib, sizeof(mib) / sizeof(mib[0]),
             &etheripstat, &len, NULL, 0) == -1) {              &etheripstat, &len, NULL, 0) == -1) {
                 if (errno != ENOPROTOOPT)                  if (errno != ENOPROTOOPT)
                         warn(name);                          warn("%s", name);
                 return;                  return;
         }          }
   
Line 937 
Line 937 
         if (sysctl(mib, sizeof(mib) / sizeof(mib[0]),          if (sysctl(mib, sizeof(mib) / sizeof(mib[0]),
             &espstat, &len, NULL, 0) == -1) {              &espstat, &len, NULL, 0) == -1) {
                 if (errno != ENOPROTOOPT)                  if (errno != ENOPROTOOPT)
                         warn(name);                          warn("%s", name);
                 return;                  return;
         }          }
   
Line 984 
Line 984 
         if (sysctl(mib, sizeof(mib) / sizeof(mib[0]),          if (sysctl(mib, sizeof(mib) / sizeof(mib[0]),
             &ipipstat, &len, NULL, 0) == -1) {              &ipipstat, &len, NULL, 0) == -1) {
                 if (errno != ENOPROTOOPT)                  if (errno != ENOPROTOOPT)
                         warn(name);                          warn("%s", name);
                 return;                  return;
         }          }
   
Line 1018 
Line 1018 
         if (sysctl(mib, sizeof(mib) / sizeof(mib[0]),          if (sysctl(mib, sizeof(mib) / sizeof(mib[0]),
             &carpstat, &len, NULL, 0) == -1) {              &carpstat, &len, NULL, 0) == -1) {
                 if (errno != ENOPROTOOPT)                  if (errno != ENOPROTOOPT)
                         warn(name);                          warn("%s", name);
                 return;                  return;
         }          }
   
Line 1060 
Line 1060 
         if (sysctl(mib, sizeof(mib) / sizeof(mib[0]),          if (sysctl(mib, sizeof(mib) / sizeof(mib[0]),
             &pfsyncstat, &len, NULL, 0) == -1) {              &pfsyncstat, &len, NULL, 0) == -1) {
                 if (errno != ENOPROTOOPT)                  if (errno != ENOPROTOOPT)
                         warn(name);                          warn("%s", name);
                 return;                  return;
         }          }
   
Line 1103 
Line 1103 
         if (sysctl(mib, sizeof(mib) / sizeof(mib[0]), &flowstats, &len,          if (sysctl(mib, sizeof(mib) / sizeof(mib[0]), &flowstats, &len,
             NULL, 0) == -1) {              NULL, 0) == -1) {
                 if (errno != ENOPROTOOPT)                  if (errno != ENOPROTOOPT)
                         warn(name);                          warn("%s", name);
                 return;                  return;
         }          }
   
Line 1134 
Line 1134 
         if (sysctl(mib, sizeof(mib) / sizeof(mib[0]),          if (sysctl(mib, sizeof(mib) / sizeof(mib[0]),
             &ipcompstat, &len, NULL, 0) == -1) {              &ipcompstat, &len, NULL, 0) == -1) {
                 if (errno != ENOPROTOOPT)                  if (errno != ENOPROTOOPT)
                         warn(name);                          warn("%s", name);
                 return;                  return;
         }          }
   
Line 1178 
Line 1178 
 #define pll(fmt, v, sep) printf(#v " " fmt sep, (long long) so.v);  #define pll(fmt, v, sep) printf(#v " " fmt sep, (long long) so.v);
 #define pp(fmt, v, sep) printf(#v " " fmt sep, hideroot ? 0 : so.v);  #define pp(fmt, v, sep) printf(#v " " fmt sep, hideroot ? 0 : so.v);
         printf("socket %#lx\n ", hideroot ? 0 : off);          printf("socket %#lx\n ", hideroot ? 0 : off);
         p("%#0.4x", so_type, "\n ");          p("%#.4x", so_type, "\n ");
         p("%#0.4x", so_options, "\n ");          p("%#.4x", so_options, "\n ");
         p("%d", so_linger, "\n ");          p("%d", so_linger, "\n ");
         p("%#0.4x", so_state, "\n ");          p("%#.4x", so_state, "\n ");
         pp("%p", so_pcb, ", ");          pp("%p", so_pcb, ", ");
         pp("%p", so_proto, ", ");          pp("%p", so_proto, ", ");
         pp("%p", so_head, "\n ");          pp("%p", so_head, "\n ");
Line 1232 
Line 1232 
         p("%lu", sb_mbmax, ", ");          p("%lu", sb_mbmax, ", ");
         p("%ld", sb_lowat, "\n ");          p("%ld", sb_lowat, "\n ");
         printf("%s ", name);          printf("%s ", name);
         p("%#0.8x", sb_flagsintr, ", ");          p("%#.8x", sb_flagsintr, ", ");
         p("%#0.4x", sb_flags, ", ");          p("%#.4x", sb_flags, ", ");
         p("%u", sb_timeo, "\n ");          p("%u", sb_timeo, "\n ");
 #undef  p  #undef  p
 }  }
Line 1253 
Line 1253 
 #define p(fmt, v, sep) printf(#v " " fmt sep, proto.v);  #define p(fmt, v, sep) printf(#v " " fmt sep, proto.v);
 #define pp(fmt, v, sep) printf(#v " " fmt sep, hideroot ? 0 : proto.v);  #define pp(fmt, v, sep) printf(#v " " fmt sep, hideroot ? 0 : proto.v);
         printf("protosw %#lx\n ", hideroot ? 0 : off);          printf("protosw %#lx\n ", hideroot ? 0 : off);
         p("%#0.4x", pr_type, "\n ");          p("%#.4x", pr_type, "\n ");
         pp("%p", pr_domain, "\n ");          pp("%p", pr_domain, "\n ");
         p("%d", pr_protocol, "\n ");          p("%d", pr_protocol, "\n ");
         p("%#0.4x", pr_flags, "\n");          p("%#.4x", pr_flags, "\n");
 #undef  p  #undef  p
 #undef  pp  #undef  pp
   
Line 1280 
Line 1280 
 #define p(fmt, v, sep) printf(#v " " fmt sep, dom.v);  #define p(fmt, v, sep) printf(#v " " fmt sep, dom.v);
         printf("domain %#lx\n ", hideroot ? 0 : off);          printf("domain %#lx\n ", hideroot ? 0 : off);
         p("%d", dom_family, "\n ");          p("%d", dom_family, "\n ");
         printf("dom_name %.*s\n", sizeof(name), name);          printf("dom_name %.*s\n", (int)sizeof(name), name);
 #undef  p  #undef  p
   
         switch (dom.dom_family) {          switch (dom.dom_family) {
Line 1330 
Line 1330 
         p("%u", inp_lport, "\n ");          p("%u", inp_lport, "\n ");
         pp("%p", inp_socket, ", ");          pp("%p", inp_socket, ", ");
         pp("%p", inp_ppcb, "\n ");          pp("%p", inp_ppcb, "\n ");
         p("%#0.8x", inp_flags, "\n ");          p("%#.8x", inp_flags, "\n ");
         p("%d", inp_hops, "\n ");          p("%d", inp_hops, "\n ");
         p("%u", inp_seclevel[0], ", ");          p("%u", inp_seclevel[0], ", ");
         p("%u", inp_seclevel[1], ", ");          p("%u", inp_seclevel[1], ", ");

Legend:
Removed from v.1.123  
changed lines
  Added in v.1.124