Date: Fri, 24 Sep 2004 15:23:21 +1000 From: Phillip Crumpler <listsubs@crippy.mel.crumpler.com.au> To: freebsd-hackers@freebsd.org Subject: ifunit and struct ifnet/ieee80211com Message-ID: <4153AF49.6020603@crippy.mel.crumpler.com.au>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4153AF49.6020603>