Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Apr 2003 13:51:59 -0400
From:      Mike Tancsa <mike@sentex.net>
To:        stable@freebsd.org
Subject:   netstat -ni display bug / issue
Message-ID:  <5.2.0.9.0.20030414130939.074679c0@marble.sentex.ca>

next in thread | raw e-mail | index | archive | help
Hi,
	I noticed that with netstat if you have more than 9 vlan interfaces, you 
will never see netstat -ni displayed properly as the interface name column 
is truncated to 6 chars.  e.g. vlan10 will get displayed as vlan1

Is it possible to update the main source code so that it will display the 
full interface name (as well as the status of the interface) ?

e.g.

diff -u if.c.prev if.c
--- if.c.prev   Mon Apr 14 13:41:19 2003
+++ if.c        Mon Apr 14 13:41:29 2003
@@ -268,7 +268,7 @@
                 drops = ifnet.if_snd.ifq_drops;

                 if (ifaddraddr == 0) {
-                       printf("%-5.5s %-5lu ", name, ifnet.if_mtu);
+                       printf("%-7.7s %-5lu ", name, ifnet.if_mtu);
                         printf("%-13.13s ", "none");
                         printf("%-15.15s ", "none");
                 } else {
@@ -285,7 +285,7 @@
                                     (u_long)TAILQ_NEXT(&ifaddr.ifa, ifa_link);
                                 continue;
                         }
-                       printf("%-5.5s %-5lu ", name, ifnet.if_mtu);
+                       printf("%-7.7s %-5lu ", name, ifnet.if_mtu);
                         switch (sa->sa_family) {
                         case AF_UNSPEC:
                                 printf("%-13.13s ", "none");

--------------------------------------------------------------------
Mike Tancsa,                          	          tel +1 519 651 3400
Sentex Communications,     			  mike@sentex.net
Providing Internet since 1994                    www.sentex.net
Cambridge, Ontario Canada			  www.sentex.net/mike



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5.2.0.9.0.20030414130939.074679c0>