[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.126 and 1.127

version 1.126, 2013/12/20 02:04:09 version 1.127, 2013/12/23 22:39:50
Line 110 
Line 110 
 protopr(u_long off, char *name, int af, u_int tableid, u_long pcbaddr)  protopr(u_long off, char *name, int af, u_int tableid, u_long pcbaddr)
 {  {
         struct inpcbtable table;          struct inpcbtable table;
         struct inpcb *head, *next, *prev;          struct inpcb *prev, *next;
         struct inpcb inpcb;          struct inpcb inpcb;
         int istcp, israw, isany;          int istcp, israw, isany;
         int addrlen = 22;          int addrlen = 22;
Line 124 
Line 124 
         istcp = strcmp(name, "tcp") == 0;          istcp = strcmp(name, "tcp") == 0;
         israw = strncmp(name, "ip", 2) == 0;          israw = strncmp(name, "ip", 2) == 0;
         kread(off, &table, sizeof table);          kread(off, &table, sizeof table);
         prev = head =          prev = next = TAILQ_FIRST(&table.inpt_queue);
             (struct inpcb *)&TAILQ_FIRST(&((struct inpcbtable *)off)->inpt_queue);  
         next = TAILQ_FIRST(&table.inpt_queue);  
   
         while (next != head) {          while (next != NULL) {
                 kread((u_long)next, &inpcb, sizeof inpcb);                  kread((u_long)next, &inpcb, sizeof inpcb);
                 if (TAILQ_PREV(&inpcb, inpthead, inp_queue) != prev) {                  if (TAILQ_PREV(&inpcb, inpthead, inp_queue) != prev) {
                         printf("???\n");                          printf("???\n");

Legend:
Removed from v.1.126  
changed lines
  Added in v.1.127