Date: 01 Jul 2003 22:45:11 +1200 From: Andrew Thompson <andy@fud.org.nz> To: current@freebsd.org Subject: netstat Message-ID: <1057056311.721.4.camel@sambo.fud.org.nz>
next in thread | raw e-mail | index | archive | help
Hi,
Is there any reason that the interface name in netstat is truncated at 5
chars? I have a box with ~100 vlans so the interface name gets chopped
after vlan9.
Here is a patch to increase it to 7 chars. Any probs?
thanks,
Andy
--- usr.bin/netstat/if.c.orig Tue Jul 1 22:37:14 2003
+++ usr.bin/netstat/if.c Tue Jul 1 22:38:59 2003
@@ -188,7 +188,7 @@
return;
if (!pfunc) {
- printf("%-5.5s %5.5s %-13.13s %-17.17s %8.8s %5.5s",
+ printf("%-7.7s %5.5s %-13.13s %-17.17s %8.8s %5.5s",
"Name", "Mtu", "Network", "Address", "Ipkts",
"Ierrs");
if (bflag)
printf(" %10.10s","Ibytes");
@@ -254,7 +254,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("%-17.17s ", "none");
} else {
@@ -271,7 +271,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");
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1057056311.721.4.camel>
