From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 24 05:23:29 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C286F16A4CE for ; Fri, 24 Sep 2004 05:23:29 +0000 (GMT) Received: from crumpler-s1.mel.crumpler.com.au (b20FB.static.pacific.net.au [210.23.137.251]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8AA6343D4C for ; Fri, 24 Sep 2004 05:23:28 +0000 (GMT) (envelope-from listsubs@crippy.mel.crumpler.com.au) Received: from [203.208.117.170] ([203.208.117.170]) by crumpler-s1.mel.crumpler.com.au over TLS secured channel with Microsoft SMTPSVC(5.0.2195.6713); Fri, 24 Sep 2004 15:23:26 +1000 Message-ID: <4153AF49.6020603@crippy.mel.crumpler.com.au> Date: Fri, 24 Sep 2004 15:23:21 +1000 From: Phillip Crumpler User-Agent: Mozilla Thunderbird 0.7.3 (X11/20040818) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 24 Sep 2004 05:23:26.0294 (UTC) FILETIME=[9E4AB760:01C4A1F6] Subject: ifunit and struct ifnet/ieee80211com X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Sep 2004 05:23:29 -0000 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