netstat -ni display bug / issue
Mike Tancsa
mike at sentex.net
Mon Apr 14 10:46:31 PDT 2003
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 at sentex.net
Providing Internet since 1994 www.sentex.net
Cambridge, Ontario Canada www.sentex.net/mike
More information about the freebsd-stable
mailing list