Getting MAC address?

Ivan Voras ivoras at fer.hr
Fri Jun 25 17:38:35 PDT 2004


How to get the MAC address for an (ethernet) interface? The linux code 
does this:
	retval = ioctl(thisint->sockInt, SIOCGIFHWADDR, &ifr);

After some searching, I found SIOCSIFLLADDR ioctl, but it appears there 
isn't a "GET" counterpart.

(I've got interface name & index available...)

-- 
What part of "Ph'nglui mglw'nath Cthulhu R'lyeh wgah'nagl fhtagn" don't
you understand?


More information about the freebsd-hackers mailing list