Re: RFC: WPA-related API changes



On Wed, Dec 07, 2005 at 12:58:08PM -0500, Dan Williams wrote:

> Immediately after this, we need to determine the capabilities of the
> drivers, through two methods:
> 
> 1) Use the enc_capa field in the iw_range info for the driver to
> determine WPA capabilities.  Not many drivers support this yet.
> 
> 2) If that fails, figure out what calls wpa_supplicant makes to detect
> WPA capability and do that in NetworkManager

wpa_supplicant uses enc_capa and if that is not present, falls back to
assuming that everything is supported.

> Next, we need to do a more intelligent parsing of the WPA and RSN IE
> fields that come in beacon packets from access points (some of which is
> already present) to determine which access points have WPA and WPA2
> capability, and which algorithms they support.

If you are considering of using wpa_supplicant for getting scan result,
it already does this parsing and reports supported types as a text field
(e.g., [WPA-PSK-TKIP]).

> Next, we need to connect to wpa_supplicant's socket for a particular
> interface, and monitor its association status to determine when we've
> successfully connected, and when the card is disconnected.  That's a lot
> more complicated than just listening to netlink.  This is where a
> DBUS-enabled wpa_supplicant would come in quite handy.

What part of this is more complicated than listening to netlink? Using
wpa_ctrl.c from wpa_supplicant, this would involve something like this:

ctrl = wpa_ctrl_open(path);
wpa_ctrl_attach(ctrl);
fd = wpa_ctrl_get_fd(); /* for whatever eventloop/select/etc. is being
			 * used */

Whenever something is received from fd, compare the prefix to
WPA_EVENT_CONNECTED/DISCONNECT, and if yes, there's the even you were
waiting for..

> We could also just use wpa_supplicant for all connections, even WEP and
> unencrypted connections.  This is compelling because it removes quite a
> bit of code from NetworkManager's device activation process, but it also
> introduces regressions which we'd have to fix in wpa_supplicant (some
> WEP issues with airo driver for example).  A case of two steps forward,
> much pain for a month.

If someone were to report these issues to wpa_supplicant bugzilla, it
might be possible that actually someone else were to fix them and you
would not need to that ;-).

-- 
Jouni Malinen                                            PGP id EFC895FA



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]