Re: Wireless interface (ifnet_t) recognition using kpi_itrerface API?
site_archiver@lists.apple.com Delivered-To: Darwin-kernel@lists.apple.com 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())? _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... 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 This email sent to site_archiver@lists.apple.com
participants (1)
-
Shaun Wexler