Re: Implement management messages in userspace


From: Jouni Malinen (jkmaline_at_cc.hut.fi)
Date: 2002-04-06 20:32:48 UTC



On Fri, Apr 05, 2002 at 03:20:20PM -0800, Mark Wells wrote:

> On Fri, 5 Apr 2002, Jouni Malinen wrote:
> > One idea would be to use additional netdevice (e.g., wlan0ap) that
> > would be set to ARPHRD_IEEE80211.

> Would it also allow userspace programs to send raw frames without the
> driver trying to re-encapsulate them? This might require separating
> 802.11 encapsulation into a traditional hard_header function (and
> possibly splitting it off from the Prism2 driver), but then the
> authentication daemon, or whatever other management-frame-sending programs
> anyone cares to write, could send through a normal packet socket.

Yes, user space programs would send (and receive) raw 802.11 frames. This wlan0ap interface with ARPHRD_IEEE80211 type looked like best option I implemented it into the driver and a separate user space daemon. I'm using raw packet sockets in the daemon to receive and send send full 802.11 headers. The kernel driver just passes all management frames to wlan0ap interface with full headers. The daemon parses the messages and generates replies with full headers. The driver then just adds missing Prism2 TX frame fields and sends the frames without other changes.

It's actually quite nice to be able to use Ethereal without any modifications to monitor management frames. In addition to normal management frames, wlan0ap device can be used to inject arbitrary frames without stopping AP operations.

My current work version is able to pass the management frames in both directions and the user space daemon knows how to handle authentication and association frames. I have not yet implemented control ioctls for the daemon to add/remove station data from the kernel driver.

I'm considering of including both kernel and user space versions (with compile time option) in the next few releases of the driver. If the user space daemon does not bring any major problems, I would eventually like get rid of the kernel side management frame parsing in order to clean the code (there's quite a lot of ifdefs in the current version).

-- 
Jouni Malinen                                            PGP id EFC895FA


This archive was generated by hypermail 2.1.4.