GetPrimaryMACAddress

Last Revision:
Version 1.3, 2011-05-06
Now builds with Xcode 4.
(Full Revision History)
Build Requirements:
Xcode 4.0 or later, Mac OS X v10.6 or later
Runtime Requirements:
Mac OS X v10.6 or later

This command-line tool demonstrates how to retrieve the Ethernet MAC address of the built-in Ethernet controller from the I/O Registry on Mac OS X. This is useful if you need a means of uniquely identifying a Macintosh system. Techniques shown include finding the primary (built-in) Ethernet interface, finding the parent Ethernet controller, and retrieving properties from the controller's I/O Registry entry.