[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.125 and 1.126

version 1.125, 2013/10/24 09:33:20 version 1.126, 2013/12/20 02:04:09
Line 125 
Line 125 
         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 = head =
             (struct inpcb *)&CIRCLEQ_FIRST(&((struct inpcbtable *)off)->inpt_queue);              (struct inpcb *)&TAILQ_FIRST(&((struct inpcbtable *)off)->inpt_queue);
         next = CIRCLEQ_FIRST(&table.inpt_queue);          next = TAILQ_FIRST(&table.inpt_queue);
   
         while (next != head) {          while (next != head) {
                 kread((u_long)next, &inpcb, sizeof inpcb);                  kread((u_long)next, &inpcb, sizeof inpcb);
                 if (CIRCLEQ_PREV(&inpcb, inp_queue) != prev) {                  if (TAILQ_PREV(&inpcb, inpthead, inp_queue) != prev) {
                         printf("???\n");                          printf("???\n");
                         break;                          break;
                 }                  }
                 prev = next;                  prev = next;
                 next = CIRCLEQ_NEXT(&inpcb, inp_queue);                  next = TAILQ_NEXT(&inpcb, inp_queue);
   
                 switch (af) {                  switch (af) {
                 case AF_INET:                  case AF_INET:

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