site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com On Apr 11, 2005, at 16:23, Carl Smith wrote: I have my Ethernet interface filtering in place and am trapping the packets as they come through the interface filter, I was just wondering if there was some way to tell which packets from the interface may be from a wireless connection or not? In my filter I am passed a struct ifnet and the mbuf. I see that in the struct ifnet it gives me the interface name, i.e. 'en', 'lo' and so on, and with this I was just wondering if there is some variable in the struct that might also tell me if it is wireless or not. Anyone else? Regards, Justin -- Justin C. Walker, Curmudgeon-At-Large Institute for General Semantics -------- "Weaseling out of things is what separates us from the animals. Well, except the weasel." - Homer J Simpson -------- _______________________________________________ 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... Since you are using an interface filter, then the packets you get from a specific interface are either all from a wireless connection, or none are. Perhaps I am missing the point of your question. There is nothing in the name that will give you a hint, and all will identified as ethernet, at the "BSD network device" layer. There is probably a mechanism available to distinguish wireless devices from others, at the IOKit layer, but I don't know what it is (perhaps the archives will tell). There is provision for maintaining this info at the BSD/network layer (the if_data substructure of the ifnet structure), but I don't know that this is ever filled in, and in any case, this would be done by the driver, so I can't say you can count on it. This email sent to site_archiver@lists.apple.com
participants (1)
-
Justin Walker