adding if_dev member to struct ifnet

Brooks Davis brooks at one-eyed-alien.net
Mon Sep 29 18:03:44 PDT 2003


[Previously posted to -net in another form.]

I propose to add an if_dev member to struct ifnet.  It would be of type
device_t and be defined to point to the device for the interface or NULL
if there is no device (or if there was not an easy way to get access to
one).

This change would codify the the relationship between an interface and
the underlying physical device.  It also would get rid of the existing
abuses of if_name to look up the driver associated with an interface
and simplify a number of messy cases in the conversion from if_unit and
if_name to if_xname.

Does this seem like a reasonable thing to do?

-- 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-arch/attachments/20030929/9513778a/attachment.bin


More information about the freebsd-arch mailing list