From owner-freebsd-current@FreeBSD.ORG Tue Jul 1 03:45:00 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 44EB637B401 for ; Tue, 1 Jul 2003 03:45:00 -0700 (PDT) Received: from smtp-2.paradise.net.nz (smtp-2a.paradise.net.nz [202.0.32.195]) by mx1.FreeBSD.org (Postfix) with ESMTP id 33CD443FEA for ; Tue, 1 Jul 2003 03:44:59 -0700 (PDT) (envelope-from andy@fud.org.nz) Received: from [192.168.10.254] (203-79-110-29.cable.paradise.net.nz [203.79.110.29]) by smtp-2.paradise.net.nz (Postfix) with ESMTP id D11B69E35B for ; Tue, 1 Jul 2003 22:44:57 +1200 (NZST) From: Andrew Thompson To: current@freebsd.org Content-Type: text/plain Message-Id: <1057056311.721.4.camel@sambo.fud.org.nz> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.0 Date: 01 Jul 2003 22:45:11 +1200 Content-Transfer-Encoding: 7bit Subject: netstat X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jul 2003 10:45:00 -0000 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");