wpa_cli event handling (revisited)
kelrin at tpg.com.au
Mon May 22 04:21:36 EDT 2006
Jouni Malinen wrote:
> On Sun, May 14, 2006 at 02:56:07PM +1000, Kel Modderman wrote:
>> I'd just like to register my interest in having a string to identify a
>> network scheme, exported to wpa_cli as a shell variable, as discussed in
>> a previous thread:
> Thanks for reminding me. I added this in following way:
> Added new configuration option for identifying which network block
> was used (id_str in wpa_supplicant.conf; included on
> WPA_EVENT_CONNECT monitor event and as WPA_ID_STR environmental
> variable in wpa_cli action scripts; in addition WPA_ID variable is
> set to the current unique identifier that wpa_supplicant assigned
> automatically for the network and that can be used with
> GET_NETWORK/SET_NETWORK ctrl_iface commands).
> Current id and id_str is also available from 'wpa_cli status' output if
> these are needed outside the context of action scripts.
I'll be putting these new features to work _very_ soon.
Two other wpa_cli action event thoughts/suggestions:
1. An environment variable containing the location of the ctrl_iface
socket, maybe WPA_CTRL_IFACE, so that the action script can call back on
itself to grab the some contents of' 'wpa_cli status', without
restricting the user to the default '/var/run/wpa_supplicant'.
eg: BSSID=$(wpa_cli -i "$IFACE" -p "$WPA_CTRL_IFACE/$IFACE" status | sed
-n -e 's/^bssid=//p')
Unless all of the status components are exposed as environment variables
(which maybe overkill, considering the already information rich
2. A TERMINATING action event much like the CONNECTED/DISCONNECTED
events, may be useful for undoing any settings that the action script
may have previously invoked.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the HostAP