wpa_cli event handling (revisited)

Kel Modderman kelrin
Thu May 25 01:00:37 PDT 2006


Kel Modderman wrote:
> 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:
>>>
>>> http://lists.shmoo.com/pipermail/hostap/2006-January/012259.html
>>>     
>>
>> 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.
>>   
>
> Wow, thanks!
>
> 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 environment).
>
> 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.
>
> Thanks, Kel.
>

The patch attached to the previous mail was not working as expected. So 
i guess what I am really asking here is; should 'wpa_cli terminate' 
cause a DISCONNECTED event if currently associated?

Thanks, Kel.




More information about the Hostap mailing list