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

Diff for /src/usr.bin/netstat/if.c between version 1.24 and 1.25

version 1.24, 2001/07/18 17:17:39 version 1.25, 2001/08/26 09:42:04
Line 95 
Line 95 
                 struct ipx_ifaddr ipx;                  struct ipx_ifaddr ipx;
                 struct iso_ifaddr iso;                  struct iso_ifaddr iso;
         } ifaddr;          } ifaddr;
           u_long total;
         u_long ifaddraddr;          u_long ifaddraddr;
         struct sockaddr *sa;          struct sockaddr *sa;
         struct ifnet_head ifhead;       /* TAILQ_HEAD */          struct ifnet_head ifhead;       /* TAILQ_HEAD */
Line 153 
Line 154 
                         *cp = '\0';                          *cp = '\0';
                         ifaddraddr = (u_long)ifnet.if_addrlist.tqh_first;                          ifaddraddr = (u_long)ifnet.if_addrlist.tqh_first;
                 }                  }
   
                   if (qflag) {
                           total = ifnet.if_ibytes + ifnet.if_obytes +
                               ifnet.if_ipackets + ifnet.if_ierrors +
                               ifnet.if_opackets + ifnet.if_oerrors +
                               ifnet.if_collisions;
                           if (tflag)
                                   total += ifnet.if_timer;
                           if (dflag)
                                   total += ifnet.if_snd.ifq_drops;
                           if (total == 0) {
                                   ifaddraddr = 0;
                                   continue;
                           }
                   }
   
                 printf("%-7.7s %-5ld ", name, ifnet.if_mtu);                  printf("%-7.7s %-5ld ", name, ifnet.if_mtu);
                 if (ifaddraddr == 0) {                  if (ifaddraddr == 0) {
                         printf("%-11.11s ", "none");                          printf("%-11.11s ", "none");

Legend:
Removed from v.1.24  
changed lines
  Added in v.1.25