From owner-freebsd-net@FreeBSD.ORG Thu Dec 13 00:35:10 2007 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A16916A418 for ; Thu, 13 Dec 2007 00:35:10 +0000 (UTC) (envelope-from freebsd@levsha.org.ua) Received: from expo.ukrweb.net (expo.ukrweb.net [193.125.78.116]) by mx1.freebsd.org (Postfix) with ESMTP id 2572213C461 for ; Thu, 13 Dec 2007 00:35:10 +0000 (UTC) (envelope-from freebsd@levsha.org.ua) Received: from levsha by expo.ukrweb.net with local (Exim 4.68 (FreeBSD)) (envelope-from ) id 1J2bFt-000Axn-Hg for freebsd-net@freebsd.org; Thu, 13 Dec 2007 01:44:45 +0200 Date: Thu, 13 Dec 2007 01:44:45 +0200 From: Mykola Dzham To: freebsd-net@freebsd.org Message-ID: <20071212234445.GB36903@expo.ukrweb.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="a8Wt8u1KmwUX3Y2C" Content-Disposition: inline X-Operating-System: FreeBSD/5.4-RELEASE-p6 (i386) User-Agent: Mutt/1.5.6i Subject: netstat -iW strip interface name to 7 symbols X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Dec 2007 00:35:10 -0000 --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--