From owner-freebsd-net@FreeBSD.ORG Fri Sep 10 19:34:40 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 0820B16A4CE for ; Fri, 10 Sep 2004 19:34:40 +0000 (GMT) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id D7F3F43D5C for ; Fri, 10 Sep 2004 19:34:39 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id i8AJYkR2005389; Fri, 10 Sep 2004 12:34:46 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id i8AJYku3005388; Fri, 10 Sep 2004 12:34:46 -0700 Date: Fri, 10 Sep 2004 12:34:46 -0700 From: Brooks Davis To: Max Laier Message-ID: <20040910193446.GC28085@odin.ac.hmc.edu> References: <20040910191831.GP89036@lucky.net> <200409102130.20287.max@love2party.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ZmUaFz6apKcXQszQ" Content-Disposition: inline In-Reply-To: <200409102130.20287.max@love2party.net> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu cc: netch@lucky.net 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 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:34:40 -0000 --ZmUaFz6apKcXQszQ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 10, 2004 at 09:30:11PM +0200, Max Laier wrote: > On Friday 10 September 2004 21:18, Valentin Nechayev wrote: > > Hi, > > is there a stable way to determine original interface name (before > > any renaming) in 5.3? I.e. as driver + sequence number? >=20 > From inside the kernel you can use ifnet.if_dname + ifnet.if_dunit, from = the=20 > userland I don't know if it's possible to get a look at those fields. >=20 > In any way, I suggest not to do that. ifnet.if_xname is supposed to be *t= he*=20 > name of the interface. There is no such thing as "original name". Yes, for that matter, the name should not be considered to be a reliable handle to an interface unless you know it won't change. This means it's OK for rc.conf or ifconfig, but not OK for a long running, general purpose monitoring program. In 6-CURRENT, and hopefully 5.3, the correct unique identification of an interface will be its index and the value of ifi_epoch. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --ZmUaFz6apKcXQszQ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFBQgHVXY6L6fI4GtQRAnaPAKC/IivPwR3ixhHdmDq5WbftElmfoACcCXO9 xCdUSJGUxvx75CRZnq7LbUU= =0Wum -----END PGP SIGNATURE----- --ZmUaFz6apKcXQszQ--