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

Diff for /src/usr.bin/systat/if.c between version 1.16 and 1.17

version 1.16, 2009/08/13 23:45:35 version 1.17, 2009/11/23 01:51:41
Line 39 
Line 39 
         struct ifcount  ifs_cur;          struct ifcount  ifs_cur;
         struct ifcount  ifs_old;          struct ifcount  ifs_old;
         struct ifcount  ifs_now;          struct ifcount  ifs_now;
           char            ifs_flag;
 } *ifstats;  } *ifstats;
   
 static  int nifs = 0;  static  int nifs = 0;
Line 187 
Line 188 
         struct sockaddr_dl *sdl;          struct sockaddr_dl *sdl;
         char *buf, *next, *lim;          char *buf, *next, *lim;
         static int s = -1;          static int s = -1;
         int mib[6];          int mib[6], i;
         size_t need;          size_t need;
   
         mib[0] = CTL_NET;          mib[0] = CTL_NET;
Line 270 
Line 271 
                 UPDATE(ifc_co, ifm_data.ifi_collisions);                  UPDATE(ifc_co, ifm_data.ifi_collisions);
                 ifs->ifs_cur.ifc_flags = ifm.ifm_flags;                  ifs->ifs_cur.ifc_flags = ifm.ifm_flags;
                 ifs->ifs_cur.ifc_state = ifm.ifm_data.ifi_link_state;                  ifs->ifs_cur.ifc_state = ifm.ifm_data.ifi_link_state;
                   ifs->ifs_flag++;
         }          }
   
           /* remove unreferenced interfaces */
           for (i = 0; i < nifs; i++) {
                   ifs = &ifstats[i];
                   if (ifs->ifs_flag)
                           ifs->ifs_flag = 0;
                   else
                           ifs->ifs_name[0] = '\0';
           }
   
         free(buf);          free(buf);
 }  }
   

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17