• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Getting the MAC address via ioctl calls
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting the MAC address via ioctl calls


  • Subject: Re: Getting the MAC address via ioctl calls
  • From: Justin Walker <email@hidden>
  • Date: Fri, 9 Jan 2004 18:14:25 -0800

A quick followup: to get the MAC address of a specific interface, you find it by searching for the interface in the list, and then looking for addresses with sa_family==AF_LINK.

Regards,

Justin

On Friday, January 9, 2004, at 12:50 PM, Aaron Ballman wrote:

Hello all!

I am using ioctl and OSIOCGIFCONF to obtain a list of all the interfaces installed on the system. I'm able to obtain information like the local address, subnet mask, broadcast address, etc. But I'm having a hard time with the MAC address. The reason I am using ioctl to do this is because I'm cross-compiling to Linux and would like to keep the code-base the same (just use a bridge to make sure the function pointers are all correct, hence the reason you'll see v_foobar in any of my code samples).

--
Justin C. Walker, Curmudgeon-At-Large *
Institute for General Semantics | It's not whether you win or lose...
| It's whether *I* win or lose.
*--------------------------------------*-------------------------------*
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.
References: 
 >Getting the MAC address via ioctl calls (From: Aaron Ballman <email@hidden>)

  • Prev by Date: Re: Getting the MAC address via ioctl calls
  • Next by Date: OT ping sample code
  • Previous by thread: Re: Getting the MAC address via ioctl calls
  • Next by thread: OT ping sample code
  • Index(es):
    • Date
    • Thread