Mac hardware addresses
Mac hardware addresses
- Subject: Mac hardware addresses
- From: Todd Heberlein <email@hidden>
- Date: Mon, 13 Jul 2009 18:18:57 -0700
I am trying to extract all the ethernet addresses for my Mac, and I am
stuck. I can use
ioctl(fd, SIOCGIFCONF, (char*)&if_conf)
and walk through all the interfaces, but the ifreq data structure
doesn't appear to have MAC address information. When one of the
interface addresses is AF_INET, I try
ioctl(fd, SIOCARPIPLL, &arp_req)
with the IPv4 address set in the arp_req, but the call seems to fail
for me every time.
Any suggestions or hints?
Thanks,
Todd
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden