[plug] Ethernet Addresses
Mike Holland
myk at golden.wattle.id.au
Thu May 4 11:49:11 WST 2000
On Thu, 4 May 2000, Christian wrote:
> Does anyone know how to find out the ethernet (MAC) address of a given
> interface? After searching the manual I can't find any system calls
The arp(8) and ifconfig(8) commands give the MAC ("hardware") address.
An strace(1) will show which system calls they use, but i cant see any
special system calls.
You could read /proc/net/arp, or exec the 'arp' command for more
portability.
Looking at the solaris man pages, I find arp(4p), which tells how to
use <net/if_arp.h> and socket/ioctl calls. Gross!
Linux seems to have the same header file, so I'll send the man page, but
gee its ugly.
Mike Holland <mike at golden.wattle.id.au>
--==--
More information about the plug
mailing list