On Sat, 26 Jun 2004, Ivan Voras wrote:

IV> How to get the MAC address for an (ethernet) interface? The linux code
IV> does this:
IV>     retval = ioctl(thisint->sockInt, SIOCGIFHWADDR, &ifr);
IV>
IV> After some searching, I found SIOCSIFLLADDR ioctl, but it appears there
IV> isn't a "GET" counterpart.
IV>
IV> (I've got interface name & index available...)

Take a look at ifconfig(8) source.

getifaddrs(3), case when sa_family == AF_LINK

Sincerely,
D.Marck                                     [DM5020, MCK-RIPE, DM3-RIPN]
------------------------------------------------------------------------
*** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- [EMAIL PROTECTED] ***
------------------------------------------------------------------------
_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to