Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Jul 2002 00:58:01 -0500
From:      Jonathan Lemon <jlemon@flugsvamp.com>
To:        Brooks Davis <brooks@one-eyed-alien.net>
Cc:        net@FreeBSD.ORG
Subject:   Re: switching to if_xname from if_name and if_unit
Message-ID:  <20020727005801.D6547@prism.flugsvamp.com>
In-Reply-To: <20020726211050.A30598@Odin.AC.HMC.Edu>
References:  <20020726211050.A30598@Odin.AC.HMC.Edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jul 26, 2002 at 09:10:50PM -0700, Brooks Davis wrote:
> [Bcc to -arch for interested people not on -net]
> 
> NetBSD and OpenBSD have replaced the "char *if_name" and "int if_unit"
> members of struct ifnet with "char if_xname[IFNAMESIZ]".  I propose that
> we follow suit.
> 

Note that the unit/name appears to be stored at three places right now:

   - interface	(if_name, if_unit)
   - device_t	(dev->devclass->name, dev->unit, dev->nameunit)
   - dev_t	(dev->si_name)

I'd prefer if we could figure out how to do away with the names at the
interface level completely and see if it is possible to use the dev->nameunit
instead.  Perhaps it would be feasible to add a device_t to the ifp?

Most uses of the if_name seem to be for error messages, and many newer
drivers now use device_printf(dev, ...) for driver messages.
-- 
Jonathan

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020727005801.D6547>