Date: Thu, 13 Dec 2007 01:44:45 +0200 From: Mykola Dzham <freebsd@levsha.org.ua> To: freebsd-net@freebsd.org Subject: netstat -iW strip interface name to 7 symbols Message-ID: <20071212234445.GB36903@expo.ukrweb.net>
next in thread | raw e-mail | index | archive | help
--a8Wt8u1KmwUX3Y2C Content-Type: text/plain; charset=us-ascii Content-Disposition: inline I use ifconfig vlanXXX name ... for setting interfaces names that make sense for me (for example name of parity on remote side on this link). But when i run netstat -iW interface names striped to 7 symbols, though "If -W is also present, print interface names using a wider field size". I think that 7 symbols is not enough wide: ifconfig ... name allow up to 16 symbols. Attached trivial patch expand interface name field to 16 chars, but my question is "is 7 symbol length is set specially?" -- Mykola Dzham, LEFT-(UANIC|RIPE) JID: levsha@jabber.net.ua --a8Wt8u1KmwUX3Y2C Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="netstat.if.patch" --- usr.bin/netstat/if.c.orig 2007-12-12 23:55:55.000000000 +0200 +++ usr.bin/netstat/if.c 2007-12-12 23:57:07.000000000 +0200 @@ -222,7 +222,7 @@ if (!pfunc) { if (Wflag) - printf("%-7.7s", "Name"); + printf("%-16.16s", "Name"); else printf("%-5.5s", "Name"); printf(" %5.5s %-13.13s %-17.17s %8.8s %5.5s", @@ -291,7 +291,7 @@ if (ifaddraddr == 0) { if (Wflag) - printf("%-7.7s", name); + printf("%-16.16s", name); else printf("%-5.5s", name); printf(" %5lu ", ifnet.if_mtu); @@ -312,7 +312,7 @@ continue; } if (Wflag) - printf("%-7.7s", name); + printf("%-16.16s", name); else printf("%-5.5s", name); printf(" %5lu ", ifnet.if_mtu); --a8Wt8u1KmwUX3Y2C--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071212234445.GB36903>