Abstracting struct ifnet
Adrian Chadd
adrian at freebsd.org
Mon Feb 20 03:06:28 UTC 2012
2012/2/19 Julian Elischer <julian at freebsd.org>:
>> For example: you can introduce a define that either old or
>> new drivers use to indicate whether they need full visibility
>> or whether an abstract type works. This then drives what is
>> defined/declared and how it's defined/declared.
>>
> The trouble is that core debugging is not doable via methods
>
> i.e.
> netstat -i | -I interface [-abdhntW] [-f address_family] [-M core]
> [-N system]
>
> becomes much more difficult to achieve.
Why? For the default kernel they'd just evaluate to whatever they are
right now. There's room for doing extra debugging and logging in the
accessor methods, but the accessor methods are still accessing the
same underlying structures.
You could still inspect the direct data and keep those structures the
"FreeBSD Kernel ABI" so tools like netstat can still directly fondle
them. This is just for portability and modularity. If a vendor like
Juniper wants to override that stuff, let's let them? :)
Adrian
More information about the freebsd-net
mailing list