[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.115 and 1.116

version 1.115, 2011/03/02 21:51:14 version 1.116, 2011/03/15 13:10:31
Line 114 
Line 114 
         struct inpcb *head, *next, *prev;          struct inpcb *head, *next, *prev;
         struct inpcb inpcb;          struct inpcb inpcb;
         int istcp, israw, isany;          int istcp, israw, isany;
           int addrlen = 22;
         int first = 1;          int first = 1;
         char *name0;          char *name0;
         char namebuf[20];          char namebuf[20];
Line 180 
Line 181 
                         if (aflag)                          if (aflag)
                                 printf(" (including servers)");                                  printf(" (including servers)");
                         putchar('\n');                          putchar('\n');
                         if (Aflag)                          if (Aflag) {
                                 printf("%-*.*s %-7.7s %-6.6s %-6.6s  %-18.18s %-18.18s %s\n",                                  addrlen = 18;
                                     PLEN, PLEN, "PCB", "Proto", "Recv-Q",                                  printf("%-*.*s ", PLEN, PLEN, "PCB");
                                     "Send-Q", "Local Address",                          }
                                     "Foreign Address", "(state)");                          printf("%-7.7s %-6.6s %-6.6s ",
                         else                              "Proto", "Recv-Q", "Send-Q");
                                 printf("%-7.7s %-6.6s %-6.6s  %-22.22s %-22.22s %s\n",                          if (Bflag && istcp)
                                     "Proto", "Recv-Q", "Send-Q",                                  printf("%-6.6s %-6.6s %-6.6s ",
                                     "Local Address", "Foreign Address",                                      "Recv-W", "Send-W", "Cgst-W");
                                     "(state)");                          printf(" %-*.*s %-*.*s %s\n",
                               addrlen, addrlen, "Local Address",
                               addrlen, addrlen, "Foreign Address", "(state)");
                         first = 0;                          first = 0;
                 }                  }
                 if (Aflag) {                  if (Aflag) {
Line 204 
Line 207 
                         name = namebuf;                          name = namebuf;
                 } else                  } else
                         name = name0;                          name = name0;
                 printf("%-7.7s %6ld %6ld ", name, sockb.so_rcv.sb_cc,                  printf("%-7.7s %6lu %6lu ",
                     sockb.so_snd.sb_cc);                      name, sockb.so_rcv.sb_cc, sockb.so_snd.sb_cc);
                   if (Bflag && istcp)
                           printf("%6lu %6lu %6lu ", tcpcb.rcv_wnd, tcpcb.snd_wnd,
                               (tcpcb.t_state == TCPS_ESTABLISHED) ?
                               tcpcb.snd_cwnd : 0);
   
                 if (inpcb.inp_flags & INP_IPV6) {                  if (inpcb.inp_flags & INP_IPV6) {
                         inet6print(&inpcb.inp_laddr6, (int)inpcb.inp_lport,                          inet6print(&inpcb.inp_laddr6, (int)inpcb.inp_lport,
                             name);                              name);

Legend:
Removed from v.1.115  
changed lines
  Added in v.1.116