From owner-freebsd-arch Fri Apr 13 2:59:24 2001 Delivered-To: freebsd-arch@freebsd.org Received: from mailtoaster1.pipeline.ch (mailtoaster1.pipeline.ch [62.48.0.70]) by hub.freebsd.org (Postfix) with SMTP id 43CDA37B43E for ; Fri, 13 Apr 2001 02:59:20 -0700 (PDT) (envelope-from oppermann@monzoon.net) Received: (qmail 60632 invoked from network); 13 Apr 2001 09:59:17 -0000 Received: from unknown (HELO monzoon.net) ([62.48.0.53]) (envelope-sender ) by mailtoaster1.pipeline.ch (qmail-ldap-1.03) with SMTP for ; 13 Apr 2001 09:59:17 -0000 Message-ID: <3AD6CD6E.104C6DD9@monzoon.net> Date: Fri, 13 Apr 2001 11:57:02 +0200 From: Andre Oppermann X-Mailer: Mozilla 4.76 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Duncan Barclay Cc: freebsd-arch@freebsd.org Subject: Re: Use of if_ef for 802.11 interfaces? References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Duncan Barclay wrote: > > Hi > > Currently, I'm updating if_ray to work with newer cards and access points. In > doing this I have to have code to cope with hacking the ethernet header > around. For example on transmit I need: > > o build 802.11 header > (add source, destination and BSS or AP address and a few > flags) > > o then encapsulate, or > (802.11 header pre-pended to complete Ethernet II packet) > > o translate > (remove Ethernet header, replace with 802.11 header and > RFC1042 LLC/SNAP) > > Most (awi, if_wi) other 802.11 drivers need to do something similar. In > digging around I re-discovered if_ef and wondered if this is a good > place to add this functionality? At the wi() and an() don't have the need for that as they have a mode that does this encapsulation of RFC1042 frames to IEEE802.11 in the card's firmware. For example in the wi() driver it is not possible (with just public documentation) to send 802.11 frames yourself. Otherwise I'd say make 802.11 a real layer2 infrastructure with it's own input routines (a la ethernet/tokenring). > A couple of practical points arise for outgoing packets revolving > around the type of 802.11 network in use (infrastructure or adhoc) > that would involve if_ef knowing what mode the interface is in and the > BSSID. We have some common support for this in the form of the recent > (uncommitted) patches to ifconfig PR25577. Wireless support in ifconfig would be really a good thing IMHO. But this brings the need of a well thought out interface between ifconfig and the wireless card drivers. > In summary, > o is if_ef the best place for this? Not IMO. > o if not, would an 80211_input() be useful? In principal yes but just for one driver? > o if not, I'll copy the code from awi.c > > Duncan > > PS. > > I have also noticed that most of the 802.11 drivers that divine whether > RFC1042 is being used on received packets can potentially get things a > bit wrong by incompletely parsing the .11 header. This can be trivially > fixed though. PS: My bread an butter for the next years is wireless stuff so (see www.monzoon.net, everthing is freebsd based, even the access points at the moment I'm digging myself in there and working on a proposal of how integrate the wireless stuff in the best into the base system (ifconfig et al.). The current structure was ok for now but in the future with increased wireless usage it won't hold. It should be possible to set the wireless mode by typing 'ifconfig wi0 ibss 1234' just like selecting an ether media type. -- Andre To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message