Subject: ethernet address
To: None <netbsd-help@NetBSD.ORG>
From: Kenneth Cline <cline+@SILVER.FOX.CS.CMU.EDU>
List: netbsd-help
Date: 02/27/1996 17:17:42
I need to find the ethernet address associated with a network device,
unfortunately there seems to be no easy way for a user process to get
this information.  

The man page for bpf claims that SIOCGIFADDR "returns the address
associated with the interface", but this call seems to always fail
with EINVAL.  I've looked at the kernel sources, but cannot find a
path for this ioctl on packetfilter devices.  Note that it seems very
reasonable for the user of a packetfilter device (which can be used
to send packets) to want this information.

Netstat gets this information by searching kernel memory (with
kvm_read).  There should be a better way - one that doesn't require
access to kernel memory.

First, please let me know if there is already an ioctl that does this
that I have overlooked.  If there is none, I'd appreciate knowing who
to contact to officially request this feature.

aTdHvAaNnKcSe

Ken Cline
Research Programmer
CMU