Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src netstat(1) and ifmcstat(8): ifnet was renamed to ifnet_list, ...



details:   https://anonhg.NetBSD.org/src/rev/dc974ff82391
branches:  trunk
changeset: 329583:dc974ff82391
user:      rmind <rmind%NetBSD.org@localhost>
date:      Fri May 30 01:44:21 2014 +0000

description:
netstat(1) and ifmcstat(8): ifnet was renamed to ifnet_list, PR/48850.

diffstat:

 usr.bin/netstat/main.c       |  14 +++++++-------
 usr.sbin/ifmcstat/ifmcstat.c |  12 ++++++------
 2 files changed, 13 insertions(+), 13 deletions(-)

diffs (91 lines):

diff -r c389cffe5036 -r dc974ff82391 usr.bin/netstat/main.c
--- a/usr.bin/netstat/main.c    Fri May 30 01:43:20 2014 +0000
+++ b/usr.bin/netstat/main.c    Fri May 30 01:44:21 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.90 2014/04/28 15:41:15 christos Exp $       */
+/*     $NetBSD: main.c,v 1.91 2014/05/30 01:44:21 rmind Exp $  */
 
 /*
  * Copyright (c) 1983, 1988, 1993
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = "from: @(#)main.c       8.4 (Berkeley) 3/1/94";
 #else
-__RCSID("$NetBSD: main.c,v 1.90 2014/04/28 15:41:15 christos Exp $");
+__RCSID("$NetBSD: main.c,v 1.91 2014/05/30 01:44:21 rmind Exp $");
 #endif
 #endif /* not lint */
 
@@ -79,8 +79,8 @@
        { "_udbtable", 0, 0, 0, 0 },
 #define        N_UDPSTAT       5
        { "_udpstat", 0, 0, 0, 0 },     /* not available via kvm */
-#define        N_IFNET         6
-       { "_ifnet", 0, 0, 0, 0 },
+#define        N_IFNET_LIST            6
+       { "_ifnet_list", 0, 0, 0, 0 },
 #define        N_ICMPSTAT      7
        { "_icmpstat", 0, 0, 0, 0 },    /* not available via kvm */
 #define        N_RTSTAT        8
@@ -570,7 +570,7 @@
        }
        if (pflag) {
                if (iflag && tp->pr_istats)
-                       intpr(interval, nl[N_IFNET].n_value, tp->pr_istats);
+                       intpr(interval, nl[N_IFNET_LIST].n_value, tp->pr_istats);
                else if (tp->pr_stats)
                        (*tp->pr_stats)(nl[tp->pr_sindex].n_value,
                                tp->pr_name);
@@ -624,7 +624,7 @@
                        if (af != AF_UNSPEC)
                                goto protostat;
 
-                       intpr(interval, nl[N_IFNET].n_value, NULL);
+                       intpr(interval, nl[N_IFNET_LIST].n_value, NULL);
                        break;
                }
                if (rflag) {
@@ -723,7 +723,7 @@
        if (sflag) {
                if (iflag) {
                        if (tp->pr_istats)
-                               intpr(interval, nl[N_IFNET].n_value,
+                               intpr(interval, nl[N_IFNET_LIST].n_value,
                                      tp->pr_istats);
                        return;
                }
diff -r c389cffe5036 -r dc974ff82391 usr.sbin/ifmcstat/ifmcstat.c
--- a/usr.sbin/ifmcstat/ifmcstat.c      Fri May 30 01:43:20 2014 +0000
+++ b/usr.sbin/ifmcstat/ifmcstat.c      Fri May 30 01:44:21 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ifmcstat.c,v 1.12 2013/10/19 17:16:25 christos Exp $   */
+/*     $NetBSD: ifmcstat.c,v 1.13 2014/05/30 01:44:21 rmind Exp $      */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -65,8 +65,8 @@
 kvm_t  *kvmd;
 
 struct nlist nl[] = {
-#define        N_IFNET 0
-       { "_ifnet", 0, 0, 0, 0 },
+#define        N_IFNET_LIST    0
+       { "_ifnet_list", 0, 0, 0, 0 },
 #if !(defined(__FreeBSD__) && __FreeBSD__ >= 3)
 #define N_IN6_MK 1
        { "_in6_mk", 0, 0, 0, 0 },
@@ -149,11 +149,11 @@
                perror("kvm_nlist");
                exit(1);
        }
-       if (nl[N_IFNET].n_value == 0) {
-               printf("symbol %s not found\n", nl[N_IFNET].n_name);
+       if (nl[N_IFNET_LIST].n_value == 0) {
+               printf("symbol %s not found\n", nl[N_IFNET_LIST].n_name);
                exit(1);
        }
-       KREAD(nl[N_IFNET].n_value, &ifp, struct ifnet *);
+       KREAD(nl[N_IFNET_LIST].n_value, &ifp, struct ifnet *);
        while (ifp) {
                KREAD(ifp, &ifnet, struct ifnet);
                printf("%s:\n", if_indextoname(ifnet.if_index, ifnam));



Home | Main Index | Thread Index | Old Index