From owner-freebsd-net@FreeBSD.ORG Fri Sep 10 19:46:51 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4751116A4CE for ; Fri, 10 Sep 2004 19:46:51 +0000 (GMT) Received: from burka.carrier.kiev.ua (burka.carrier.kiev.ua [193.193.193.107]) by mx1.FreeBSD.org (Postfix) with ESMTP id 83F7043D4C for ; Fri, 10 Sep 2004 19:46:50 +0000 (GMT) (envelope-from netch@lucky.net) Received: from burka.carrier.kiev.ua (netch@localhost [127.0.0.1]) by burka.carrier.kiev.ua with ESMTP id i8AJkgag090025; Fri, 10 Sep 2004 22:46:45 +0300 (EEST) (envelope-from netch@burka.carrier.kiev.ua) Received: (from netch@localhost) by burka.carrier.kiev.ua (8.12.11/8.12.11/Submit) id i8AJkgAQ090022; Fri, 10 Sep 2004 22:46:42 +0300 (EEST) (envelope-from netch) Date: Fri, 10 Sep 2004 22:46:42 +0300 From: Valentin Nechayev To: Max Laier Message-ID: <20040910194642.GC84228@lucky.net> References: <20040910191831.GP89036@lucky.net> <200409102130.20287.max@love2party.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200409102130.20287.max@love2party.net> X-42: On X-Verify-Sender: Address has been verified (burka.carrier.kiev.ua) cc: freebsd-net@freebsd.org Subject: Re: original interface name? (5.*) X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: netch@lucky.net List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Sep 2004 19:46:51 -0000 Fri, Sep 10, 2004 at 21:30:11, max wrote about "Re: original interface name? (5.*)": >> Hi, >> is there a stable way to determine original interface name (before >> any renaming) in 5.3? I.e. as driver + sequence number? > From inside the kernel you can use ifnet.if_dname + ifnet.if_dunit, from the > userland I don't know if it's possible to get a look at those fields. > In any way, I suggest not to do that. ifnet.if_xname is supposed to be *the* > name of the interface. There is no such thing as "original name". Having driver name one can determine essential capabilities of the interface, including VLAN support, possibility and allowed style of media specification, etc. Device number among with driver name are enough to determine needed information based on driver information and boot logs. It is pointless to use interface without such information, and it is pointless to do manual logging as the only source. > In any way, I suggest not to do that. What about good old principle "Tools, not policy"? -netch-