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

Diff for /src/usr.bin/systat/netstat.c between version 1.37 and 1.38

version 1.37, 2013/12/20 02:04:09 version 1.38, 2013/12/24 22:26:20
Line 232 
Line 232 
 read_ns(void)  read_ns(void)
 {  {
         struct inpcbtable pcbtable;          struct inpcbtable pcbtable;
         struct inpcb *head, *prev, *next;          struct inpcb *next;
         struct inpcb inpcb;          struct inpcb inpcb;
         struct socket sockb;          struct socket sockb;
         struct tcpcb tcpcb;          struct tcpcb tcpcb;
Line 262 
Line 262 
 again:  again:
         KREAD(off, &pcbtable, sizeof (struct inpcbtable));          KREAD(off, &pcbtable, sizeof (struct inpcbtable));
   
         prev = head = (struct inpcb *)&((struct inpcbtable *)off)->inpt_queue;  
         next = TAILQ_FIRST(&pcbtable.inpt_queue);          next = TAILQ_FIRST(&pcbtable.inpt_queue);
   
         while (next != head) {          while (next != NULL) {
                 KREAD(next, &inpcb, sizeof (inpcb));                  KREAD(next, &inpcb, sizeof (inpcb));
                 if (TAILQ_PREV(&inpcb, inpthead, inp_queue) != prev) {  
                         error("Kernel state in transition");  
                         return 0;  
                 }  
                 prev = next;  
                 next = TAILQ_NEXT(&inpcb, inp_queue);                  next = TAILQ_NEXT(&inpcb, inp_queue);
   
                 if (!aflag) {                  if (!aflag) {

Legend:
Removed from v.1.37  
changed lines
  Added in v.1.38