[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.5 and 1.6

version 1.5, 1996/06/16 12:42:29 version 1.6, 1996/06/18 09:58:05
Line 1 
Line 1 
 /*      $NetBSD: if.c,v 1.16.4.1 1996/06/04 20:27:06 cgd Exp $  */  /*      $NetBSD: if.c,v 1.16.4.2 1996/06/07 21:46:46 thorpej Exp $      */
   
 /*  /*
  * Copyright (c) 1983, 1988, 1993   * Copyright (c) 1983, 1988, 1993
Line 37 
Line 37 
 #if 0  #if 0
 static char sccsid[] = "from: @(#)if.c  8.2 (Berkeley) 2/21/94";  static char sccsid[] = "from: @(#)if.c  8.2 (Berkeley) 2/21/94";
 #else  #else
 static char *rcsid = "$NetBSD: if.c,v 1.16.4.1 1996/06/04 20:27:06 cgd Exp $";  static char *rcsid = "$NetBSD: if.c,v 1.16.4.2 1996/06/07 21:46:46 thorpej Exp $";
 #endif  #endif
 #endif /* not lint */  #endif /* not lint */
   
Line 295 
Line 295 
         for (off = firstifnet, ip = iftot; off;) {          for (off = firstifnet, ip = iftot; off;) {
                 if (kread(off, (char *)&ifnet, sizeof ifnet))                  if (kread(off, (char *)&ifnet, sizeof ifnet))
                         break;                          break;
                 ip->ift_name[0] = '(';                  bzero(ip->ift_name, sizeof(ip->ift_name));
                 bcopy(ifnet.if_xname, ip->ift_name + 1, IFNAMSIZ - 1);                  snprintf(ip->ift_name, IFNAMSIZ, "(%s)", ifnet.if_xname);
                 if (interface &&                  if (interface && strcmp(ifnet.if_xname, interface) == 0)
                     strcmp(ip->ift_name + 1, interface) == 0)  
                         interesting = ip;                          interesting = ip;
                 ip->ift_name[IFNAMSIZ - 1] = '\0';  
                 ip++;                  ip++;
                 if (ip >= iftot + MAXIF - 2)                  if (ip >= iftot + MAXIF - 2)
                         break;                          break;

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6