finishing the if.h/if_var.h split

Brooks Davis brooks at one-eyed-alien.net
Tue Sep 30 10:52:49 PDT 2003


On Tue, Sep 30, 2003 at 01:14:34PM -0400, John Baldwin wrote:
> 
> On 30-Sep-2003 Bruce Evans wrote:
> > On Tue, 30 Sep 2003, John Baldwin wrote:
> > 
> >> On 30-Sep-2003 Bruce Evans wrote:
> >> > On Mon, 29 Sep 2003, Brooks Davis wrote:
> >> >> Unfortunately, "soon" hasn't happened yet and it is now tripping me
> >> >> up.  To add the if_dev member to struct ifnet (see the forthcoming
> >> >> post on that subject), it is necessary for sys/bus.h to be included in
> >> >> net/if_var.h
> >> >
> >> > That would be namespace pollution, so it is not permitted :-).  Requiring
> >> > all files that include <sys/if_var.h> (and especially <sys/if.h> to
> >> > include <sys/bus.h> would be interface breakage so it is even less
> >> > permitted.
> >>
> >> Well, if if.h stops including if_var.h, then only kernel files that
> >> include net/if_var.h would need sys/bus.h.  I think that's manageable.
> > 
> > All userland files that include net/if_var.h would also need it (except
> > they would only need device_t).
> 
> Is struct ifnet exposed to userland?  Ugh, why do we export such things?
> I guess because ifconfig grovels around in the kernel due to a lack of
> APIs between the kernel and userland.  *sigh*

ifconfig is actually OK, it uses sysctl.  netstat and ifmcstat do go
grovling around in there as do 4-5 ports.  If someone fixed our userland
that would provide the template to fix the ports since they are all just
netstat in some form or another.

-- 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-net/attachments/20030930/c26cfd2c/attachment.bin


More information about the freebsd-net mailing list