• 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: Airport cards MAC Address
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Airport cards MAC Address


  • Subject: Re: Airport cards MAC Address
  • From: Rich Kubota <email@hidden>
  • Date: Mon, 13 Oct 2003 10:38:27 -0700

At 5:50 PM +0530 10/13/03, Sachin Agarwal wrote:
Hello Everybody

Is there any way to know programatically the MAC Address (Ethernet Address)
of Airport card installed on Mac mashine.
I am using OTGetIndexedPort() function but unable to get the Airport cards
MAC Address

Regards
Sachiin
Sachiin,

The best way to get the address of the Airport card is to peruse the IORegistry. A sample of doing so is provided in the GetMACAddress sample provided in the Sample code site.

<http://developer.apple.com/samplecode/Sample_Code/Networking/GetMACAddressSample/GetMACAddressSample.c.htm>

This sample only shows how to look for the first Ethernet device, and get the address for it. For an Airport card, you have to do a bit more work. The sample shows how you can access the "IOMACAddress" property. the idea is to iterate through the IORegistry looking for instances of "IOEthernetInterface". Once you have the instance of this class, take the object and get it's parent object. The parent will have the IOMACAddress property - which is the Ethernet Address. To determine whether the device is an Airport device, you also need to look at the same level as the IOMACAddress property and

To find out if the device is an Airport card, I don't have an "official" solution, however it appears that the CFBundleIdentifier for the Apple Airport and the Apple Airport Exteme cards are respectively a CFSTring "com.apple.driver.AppleAirport" and "com.apple.driver.AppleAirport2", respectively.
--
Sincerely,
Rich Kubota
email@hidden
(408) 974-6212
_______________________________________________
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: 
 >Airport cards MAC Address (From: Sachin Agarwal <email@hidden>)

  • Prev by Date: Airport cards MAC Address
  • Next by Date: native sockets different on powerbooks/iBooks?
  • Previous by thread: Airport cards MAC Address
  • Next by thread: native sockets different on powerbooks/iBooks?
  • Index(es):
    • Date
    • Thread