From owner-freebsd-bugs@FreeBSD.ORG Tue Oct 25 09:10:02 2011 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C4A1106566B for ; Tue, 25 Oct 2011 09:10:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id E94918FC13 for ; Tue, 25 Oct 2011 09:10:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p9P9A11x091077 for ; Tue, 25 Oct 2011 09:10:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p9P9A1HP091076; Tue, 25 Oct 2011 09:10:01 GMT (envelope-from gnats) Resent-Date: Tue, 25 Oct 2011 09:10:01 GMT Resent-Message-Id: <201110250910.p9P9A1HP091076@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Dennis Yusupoff Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DB505106566C for ; Tue, 25 Oct 2011 09:07:05 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id CB9058FC14 for ; Tue, 25 Oct 2011 09:07:05 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p9P975HU074117 for ; Tue, 25 Oct 2011 09:07:05 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id p9P974mr074116; Tue, 25 Oct 2011 09:07:04 GMT (envelope-from nobody) Message-Id: <201110250907.p9P974mr074116@red.freebsd.org> Date: Tue, 25 Oct 2011 09:07:04 GMT From: Dennis Yusupoff To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: bin/161986: Interface auto-width in "netstat -rn" X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2011 09:10:02 -0000 >Number: 161986 >Category: bin >Synopsis: Interface auto-width in "netstat -rn" >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Oct 25 09:10:01 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Dennis Yusupoff >Release: 7,8 and 9 >Organization: SmartTelecom >Environment: No matter :) >Description: Currently there are two version of "netstat -rn" - "wide" and "usual". Wide is turning on by option "-W" and show additional information about routes (only for IPv4 family, as I understand route.c) - MTU and the full interface name(limited, however, by 8 symbols). In "usual" mode Netif limited by 6 symbols, which definitly isn't enough for VLAN interfaces: === netstat -rn| head -n6 Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default 217.119.16.33 UGS 0 2147187618 em0 10.1.0.0/16 10.78.77.9 UG1 0 0 vlan30 === === netstat -Wrn| head -n6 Routing tables Internet: Destination Gateway Flags Refs Use Mtu Netif Expire default 217.119.16.33 UGS 0 2147115775 1500 em0 10.1.0.0/16 10.78.77.9 UG1 0 0 1500 vlan3050 === I think, that truncating Netif is absolutely incorrect and easily confusing most FreeBSD users. So I propose: 1. Limit wid_if by getting width of longest netif name (i.e. automatically, on-the-fly) 2.1 Show full netif by default or: 2.2 Add special "truncated" symbol at the end of Netif, for example ">", like that: === Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default 217.119.16.33 UGS 0 2147187618 em0 10.1.0.0/16 10.78.77.9 UG1 0 0 vlan30> === >How-To-Repeat: >Fix: Don't know C as should, but it looks like it might be easily patch route.c >Release-Note: >Audit-Trail: >Unformatted: