wpa_cli event handling
Paul Fox
pgf
Mon Jan 2 06:50:41 PST 2006
(just back from vacation, resurrecting this thread...)
> On Thu, Dec 22, 2005 at 08:50:47AM -0500, Paul Fox wrote:
>
> > but i have a simple question: why isn't the action script that's
> > invoked passed the ssid of the network that's been joined?
>
> For three reasons: 1) SSID can be fetched separately, if needed
> ('wpa_cli status' as was already mentioned or with SIOCGIWESSID if the
> driver supports Linux wireless extensions). 2) SSID is 1..32 octet field
> which may not be just ASCII text (e.g., 0 (nul terminator in ASCII) is a
> valid character for SSID). Passing this information as a command line
> parameter is not that nice unless there would be standard encoding for
> it and that would just make the scripts using this more complex. 3)
> wpa_cli does not actually know what the SSID is at this point, i.e., it
> would need to ask wpa_supplicant for it anyway (which is what the action
> script could be doing only when needed).
thanks. that all makes perfect sense. i see that it would be
inappropriate to pass SSID directly to the action script. your
point #2 is sufficient to convince me.
i still feel that there remains a disconnect between the s/w that
is connecting to a network (wpa_supplicant) and the s/w that
is configuring the interface (i.e. ifupdown, or whatever). in
many cases, it's important to know which wireless network (or
which of several networks) is being associated with, in order to
configure the interface correctly.
it seems convoluted for the interface configuration code to have
to do more queries to find out what it was that wpa_supplicant
connected to. plus, doing it this way means that in many cases
an SSID will need to be configured in two places: once in
wpa_supplicant.conf, and again in whatever script or program is
setting the interface parameters.
i would think that passing an (optional) identifier of some sort
from wpa_supplicant (via wpa_cli) to the event handler would make
this cleaner. i'm picturing something similar to the pcmcia
"scheme" ID: a stanza in the wpa_supplicant config file would
include a "scheme=xxx" line (e.g. "scheme = home", "scheme =
work", "scheme = use_ZCIP"). (and of course many network stanzas
might reference the same scheme ID.) if the scheme (or whatever
it's called) parameter were present in the config, it would be
passed as a new third argument to the action script, and it, in
turn, could then do various kinds of interface configuration
without ever knowing or caring what the SSID is.
having said all this, i understand that many people here
understand the wireless configuration problem, and wpa_supplicant
internals, _far_ more completely than i do.
paul
=---------------------
paul fox, pgf at brightstareng.com
More information about the Hostap
mailing list