From owner-freebsd-net Thu Aug 1 10:19:43 2002 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 C622637B400 for ; Thu, 1 Aug 2002 10:19:40 -0700 (PDT) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4612743E42 for ; Thu, 1 Aug 2002 10:19:40 -0700 (PDT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (IDENT:brdavis@localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.12.3/8.12.3) with ESMTP id g71HJZpO031218; Thu, 1 Aug 2002 10:19:36 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.12.3/8.12.3/Submit) id g71HJZhh031217; Thu, 1 Aug 2002 10:19:35 -0700 Date: Thu, 1 Aug 2002 10:19:35 -0700 From: Brooks Davis To: Bruce Evans Cc: Brooks Davis , "M. Warner Losh" , net@FreeBSD.ORG Subject: Re: switching to if_xname from if_name and if_unit Message-ID: <20020801101935.A28795@Odin.AC.HMC.Edu> References: <20020730113044.A7396@Odin.AC.HMC.Edu> <20020802015442.S2977-100000@gamplex.bde.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="G4iJoqBmSsgzjUCe" Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20020802015442.S2977-100000@gamplex.bde.org>; from bde@zeta.org.au on Fri, Aug 02, 2002 at 02:21:47AM +1000 X-Virus-Scanned: by amavisd-milter (http://amavis.org/) on odin.ac.hmc.edu Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org --G4iJoqBmSsgzjUCe Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Aug 02, 2002 at 02:21:47AM +1000, Bruce Evans wrote: > On Tue, 30 Jul 2002, Brooks Davis wrote: >=20 > > I don't think it's stored elsewhere for pure pseudo interfaces like lo > > or gif though (except as "if_" in the module decleration.) I > > don't see name that is consistantly associated with all interfaces. >=20 > Right. I was a little confused about this, partly because device_get_nam= e() > only applies to device_t's. I just checked that there is no newbus > device for typical synthetic devices like tun* and tap*. There is > (kernel) dev_t, but it is not always accessible. However, you could > make it accessible by storing it in *ifp and/or *scp and then access its > name using devtoname(xxp->xx_devp). A pointer would take a bit less space > than the proposed if_xname size on most machines and be more flexible. Unfortunatly, there aren't even dev_t's for some devices like gif* since they don't need a dev to interact with user processes. They do end up with one, but it's created if if_attach based on if_name and if_unit so it's not any help (it also has the wrong name since it lives in /dev/net). I think we're stuck with giving interfaces names independent of their devices. -- 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 --G4iJoqBmSsgzjUCe Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE9SW2mXY6L6fI4GtQRAmdCAJ9vif/+xZwsi3s4LMMpX8oZO5nhDwCgxN5s XkGeD5tDS7eZFngLs7+VNA4= =4aCN -----END PGP SIGNATURE----- --G4iJoqBmSsgzjUCe-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message