Re: Wireless interface (ifnet_t) recognition using kpi_itrerface API?
Re: Wireless interface (ifnet_t) recognition using kpi_itrerface API?
- Subject: Re: Wireless interface (ifnet_t) recognition using kpi_itrerface API?
- From: Shaun Wexler <email@hidden>
- Date: Tue, 5 Dec 2006 08:47:48 -0800
On Dec 5, 2006, at 3:49 AM, Alexander Klyuev wrote:
Hi ALL,
Does anybody know how to distinguish
wireless ethernet interface (e.g. AppleAirPort)
from regular one (both are of type IFT_ETHER using ifnet_type())?
Use ifnet_name() BSD name-match to get its IONetworkInterface
service, then:
IONetworkController *netctrl = netif->getProvider();
OSObject *bnm;
bool isWireless = IFM_TYPE(netctrl->getSelectedMedium()->getType())
== IFM_IEEE80211
|| ((bnm = netctrl->getProvider()->getProperty("name")) && bnm-
>isEqualTo(OSSymbol::withCString("radio")));
That should match AirPort, 3rd-party 802.11* and other types of
Wireless Network Adaptor.
--
Shaun Wexler
MacFOH
http://www.macfoh.com
_______________________________________________
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