Re: Mac hardware addresses
Re: Mac hardware addresses
- Subject: Re: Mac hardware addresses
- From: Chris Suter <email@hidden>
- Date: Tue, 14 Jul 2009 11:25:35 +1000
Hi Todd,
On Tue, Jul 14, 2009 at 11:18 AM, Todd Heberlein<email@hidden> wrote:
> 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?
You'll probably find your answer here:
<http://www.opensource.apple.com/source/network_cmds/network_cmds-307.1.1/ifconfig.tproj/>
Regards,
Chris
_______________________________________________
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