[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.38 and 1.39

version 1.38, 2013/12/24 22:26:20 version 1.39, 2013/12/25 01:46:00
Line 232 
Line 232 
 read_ns(void)  read_ns(void)
 {  {
         struct inpcbtable pcbtable;          struct inpcbtable pcbtable;
         struct inpcb *next;          struct inpcb *next, *prev;
         struct inpcb inpcb;          struct inpcb inpcb, prevpcb;
         struct socket sockb;          struct socket sockb;
         struct tcpcb tcpcb;          struct tcpcb tcpcb;
         void *off;          void *off;
Line 262 
Line 262 
 again:  again:
         KREAD(off, &pcbtable, sizeof (struct inpcbtable));          KREAD(off, &pcbtable, sizeof (struct inpcbtable));
   
           prev = NULL;
         next = TAILQ_FIRST(&pcbtable.inpt_queue);          next = TAILQ_FIRST(&pcbtable.inpt_queue);
   
         while (next != NULL) {          while (next != NULL) {
                 KREAD(next, &inpcb, sizeof (inpcb));                  KREAD(next, &inpcb, sizeof (inpcb));
                   if (prev != NULL) {
                           KREAD(prev, &prevpcb, sizeof (prevpcb));
                           if (TAILQ_NEXT(&prevpcb, inp_queue) != next) {
                                   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.38  
changed lines
  Added in v.1.39