Date: Thu, 1 Aug 2002 10:19:35 -0700 From: Brooks Davis <brooks@one-eyed-alien.net> To: Bruce Evans <bde@zeta.org.au> Cc: Brooks Davis <brooks@one-eyed-alien.net>, "M. Warner Losh" <imp@bsdimp.com>, net@FreeBSD.ORG Subject: Re: switching to if_xname from if_name and if_unit Message-ID: <20020801101935.A28795@Odin.AC.HMC.Edu> In-Reply-To: <20020802015442.S2977-100000@gamplex.bde.org>; from bde@zeta.org.au on Fri, Aug 02, 2002 at 02:21:47AM %2B1000 References: <20020730113044.A7396@Odin.AC.HMC.Edu> <20020802015442.S2977-100000@gamplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] On Fri, Aug 02, 2002 at 02:21:47AM +1000, Bruce Evans wrote: > On Tue, 30 Jul 2002, Brooks Davis wrote: > > > I don't think it's stored elsewhere for pure pseudo interfaces like lo > > or gif though (except as "if_<name>" in the module decleration.) I > > don't see name that is consistantly associated with all interfaces. > > Right. I was a little confused about this, partly because device_get_name() > 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 -- 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 [-- Attachment #2 --] -----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-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020801101935.A28795>
