From owner-freebsd-stable@FreeBSD.ORG Tue Nov 18 13:08:22 2008 Return-Path: Delivered-To: freebsd-stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 887551065672 for ; Tue, 18 Nov 2008 13:08:22 +0000 (UTC) (envelope-from cpghost@cordula.ws) Received: from fw.farid-hajji.net (fw.farid-hajji.net [213.146.115.42]) by mx1.freebsd.org (Postfix) with ESMTP id E625E8FC08 for ; Tue, 18 Nov 2008 13:08:21 +0000 (UTC) (envelope-from cpghost@cordula.ws) Received: from phenom.cordula.ws (phenom [192.168.254.60]) by fw.farid-hajji.net (Postfix) with ESMTP id E389535F35; Tue, 18 Nov 2008 14:05:09 +0100 (CET) Date: Tue, 18 Nov 2008 14:09:55 +0100 From: cpghost To: Gavin Atkinson Message-ID: <20081118130955.GA958@phenom.cordula.ws> References: <5FD58BCD6B4C409DA7E7C30150FB10C7@multiplay.co.uk> <20081117.233619.85395429.sthaug@nethelp.no> <20081118081153.GQ51761@server.vk2pj.dyndns.org> <20081118.103424.74710091.sthaug@nethelp.no> <20081118113811.GB1136@phenom.cordula.ws> <1227012486.23755.20.camel@buffy.york.ac.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1227012486.23755.20.camel@buffy.york.ac.uk> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-stable@FreeBSD.org, sthaug@nethelp.no Subject: Re: ifconfig(8) interface description field X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2008 13:08:22 -0000 On Tue, Nov 18, 2008 at 12:48:06PM +0000, Gavin Atkinson wrote: > On Tue, 2008-11-18 at 12:38 +0100, cpghost wrote: > > On Tue, Nov 18, 2008 at 10:34:24AM +0100, sthaug@nethelp.no wrote: > > > > >Oh yeah, since we're in wishful thinking mode, I want interface > > > > >descriptions too... > > > > > > > > Have you looked at the 'name' and 'group' keywords in ifconfig(8)? > > > > If this isn't what you want, please expand on your wish. > > > > > > It is not what I want. > > > > > > On routers, switches and lots of other boxes from most vendors you can > > > associate a description string with each interface - where interface > > > can be a physical port, or for instance a VLAN based interface. This > > > description string is useful to document things like > > > > > > - what is the box at the other end of the cable connected to this port > > > - what is the port at the other end of the cable connected to this port > > > - what is the circuit id for the circuit this port is connected to > > > - what is this port used for > > > > > > etc. Typical example, from one of our switches (Cisco syntax): > > > > > > interface GigabitEthernet0/12 > > > description TO: fs1.td ID: BTN-11510092 TXT: gi1/0/7 EoSDH 50 Mbps > > > switchport trunk allowed vlan 123,770,1024,1500,1504,1528,1536 > > > > > > showing the first three points I mentioned above. > > > > > > Such a description string is can normally be retrieved using SNMP. > > > > Yes, that's a very useful addition. I'm administering a lot of Cisco > > boxes, and this desc field has been extremely useful over the years. > > > > Maybe an ifi_desc field could be added to: > > > > /usr/src/sys/net/if.h:struct if_data > > > > and some glue so that ifconfig(8) can read and write to it? > > How long should this field be at most? > > Patches already existfor one method of implementing this, see PR > kern/83622. > > Gavin Ah yes, that was exactly what I was thinking of! Thank you for the hint! -cpghost. -- Cordula's Web. http://www.cordula.ws/