of nosing in kernel memory. This API should work on all versions
of FreeBSD/NetBSD/OpenBSD/Dragonfly.
This fixes compilation on FreeBSD 11, where kernel structures
have changed and protects against future breakages. It also
make the file much simplier.
Tested by: Daniel Engberg <daniel.engberg.lists pyret.net>
struct ifnet is private to kernel code and is hidden from the userland
code unless you define a macro _KERNEL_STRUCTURES. Although other people
argue that it should be exposed as it is on other BSDs, that's the way
it is on DragonFly BSD.
Thanks to YONETANI Tomokazu for DragonFly BSD patches