ifunit and struct ifnet/ieee80211com
Phillip Crumpler
listsubs at crippy.mel.crumpler.com.au
Thu Sep 23 22:23:29 PDT 2004
Hi hackers,
A few questions re. ifunit and struct ifnet/ieee80211com, if anyone can
help me out:
I assume that for a wireless interface ifunit will return a pointer to a
struct ieee80211com. Is there any way to tell which of these I have, so
I don't try to access ieee80211com members in a struct that is actually
the smaller infet? Both ethernet and wireless ethernet seem to use
if_type == 6 (IFT_ETHER) and if_physical == 0. Can I distinguish which
type I have or should I just make sure I know beforehand?
Also, what is the lifetime of the (struct ifnet *) that ifunit returns?
If an interface goes away is the ifnet freed, leaving me with a dangling
pointer, or is it kept but marked inactive in some way?
cheers,
Phillip
More information about the freebsd-hackers
mailing list