wpa_cli event handling

Paul Fox pgf at brightstareng.com
Tue Jan 3 09:37:07 EST 2006

 > On Mon, Jan 02, 2006 at 09:50:41AM -0500, Paul Fox wrote:
 > > 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=3Dxxx" line (e.g. "scheme =3D home", "scheme =3D
 > > work", "scheme =3D 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.
 > How would passing "scheme=home" be cleaner than using
 > "essid=myhomeessid"? As I see it, you're just introducing another
 > variable which ultimately means the same thing...

well, as i was informed previously, essid names can contain
non-ascii octets, which are difficult to deal with in shell event
handlers.  that's the main reason.  (wireless tools makes an attempt
at dealing with this by providing "iwgetid -r", which compresses out
non-alphanumeric characters.  but this is a non-unique mapping.)

but in general, using "scheme=" would be for the same reasons
that giving things symbolic, rather than specific, names is often
useful.  for example, if the ESSID of my home net changes, if i
have a "scheme=home" parameter in place, i probably only have to
change the ESSID string in one place (in wpa_supplicant.conf),
rather than in two (in the event handler as well).

or maybe i have two nets that use exactly the same interface config
(my house, and my vacation home), but which have two different
essid strings.  using "scheme=mynets" would cover both.

and of course, 
has better mnemonic meaning than
    essid="What The Cat Dragged In!"
or whatever it is my brother has named his network.  i'd have to
add a comment reminder for the latter, but don't need it for the

it's not a big deal, but i think it would make for much more flexible
configuration schemes.

 paul fox, pgf at brightstareng.com

More information about the HostAP mailing list