Subject: Re: port-i386/1050: CAP support for NetBSD-1.0 i386
To: None <netbsd-bugs@NetBSD.ORG>
From: Mark Treacy <mark@labtam.oz.au>
List: netbsd-bugs
Date: 05/19/1995 14:10:50
Paul Nash writes:
>No mention of SIOCGIFCONF.  BPF, in turn, passes this ioctl() call on
>to the driver.  So it _looks_ as though the driver was intended to
>support this ioctl() call.  Maybe this has changed with netbsd-current?
SIOCGIFCONF is the way to find out the link level address of an interface
on any 4.4lite based system and most 4.3net2 based systems.
When an interface is attached the link address is added to the interface
address list.
SIOCGIFADDR is a hack for systems that didn't have a way, short of
grovelling through /dev/kmem, to find out the ethernet address of an
interface.

>This is only really relevant to CAP users (as far as I can tell), so
>it doesn't really matter whether it is included or not.  I doubt that
>there are terribly many NetBSD users who want to run CAP, but it'd be
>nice if they didn't need to fiddle with the kernel.
You shouldn't use SIOCGIFADDR, particularly when an alternative is
available and you certainly don't need to go kernel hacking to make
it work.

If you absolutely must use SIOCGIFCONF, change bpf in the kernel
to find the AF_LINK address and return the address contained in that.
This way every network interface driver doesn't have to be changed.

 - Mark.