Re: detecting airport cards
Re: detecting airport cards
- Subject: Re: detecting airport cards
- From: Rob McKeever <email@hidden>
- Date: Fri, 25 Jan 2002 18:22:07 -0800
You should be able to check the media type of the interface.
I'm running on a Lombard series powerbook right now, so I can't
say hat the airport card returns, but with my wirelessdriver
equivalent for pccards (and, very shortly, USB devices), I at
least list the various possible media types that apply and will
be reporting the correct entry in a future version (lower on the
list of priorities):
mediumTable[] =
{
{ kIOMediumIEEE80211None, 0 },
{ kIOMediumIEEE80211Manual, 0 },
{ kIOMediumIEEE80211Auto, 0 },
{ kIOMediumIEEE80211DS1 | kIOMediumOptionHalfDuplex, 1 },
{ kIOMediumIEEE80211DS1 | kIOMediumOptionFullDuplex, 1 },
{ kIOMediumIEEE80211DS2 | kIOMediumOptionHalfDuplex, 2 },
{ kIOMediumIEEE80211DS2 | kIOMediumOptionFullDuplex, 2 },
{ kIOMediumIEEE80211DS5 | kIOMediumOptionHalfDuplex, 5 },
{ kIOMediumIEEE80211DS5 | kIOMediumOptionFullDuplex, 5 },
{ kIOMediumIEEE80211DS11 | kIOMediumOptionHalfDuplex, 11 },
{ kIOMediumIEEE80211DS11 | kIOMediumOptionFullDuplex, 11 },
};
These don't match exactly with what ifconfig returns, but the
labels are close enough. I think ifconfig returns strings like:
DS11, Auto, Manual, etc.
I'm sure somebody out there will tell me if the airport cards
obey this convention as well.
-Rob McKeever
email@hidden
Oy!
The BSD/ifnet mechanisms don't currently give you that kind of detail.
You'd have to get that from IOKit, and I don't know whether
there is any
standard way of representing wireless devices that IOKit knows about
(Dean/Godfrey?).
This is what 'ioreg' shows for Airport:
| | | +-o radio@30000 <class AppleMacIODevice>
| | | | +-o AirPortDriver <class AirPortDriver>
| | | | +-o IOEthernetInterface <class
IOEthernetInterface>
| | | | | +-o IONetworkStack <class IONetworkStack>
| | | | | +-o IONetworkStackUserClient <class
IONetworkStackUserClient>
| | | | +-o AirPortUserClient <class AirPortUserClient>
| | | | +-o AirPortUserClient <class AirPortUserClient>
'airport' isn't going to work; and I don't know whether all wireless
devices show up as 'radio'.
What are you trying to do?
Regards,
Justin
On Thursday, January 24, 2002, at 09:29 AM, Brian Wotring wrote:
In my NKE, is there a way to obtain information about the network
interfaces, specifically, which ones are wireless cards?
--
Brian Wotring ( email@hidden )
PGP KeyID: 0x9674763D