Wpa_supplicant : Be notified of a state change

Vincent Maurin vincent.maurin
Fri Aug 18 06:29:48 PDT 2006


Hi,

I use wpa supplicant as a library in a Visual Studio project. I 
establishe association and connection successfully.
I can access to the wpa state with the wpa_supplicant_get_state function.

My code look like this :

wpa_supplicant_associate(...)
while (state != associated)
{
    sleep serveral seconds ....
}
echo ("I'm associated !")

It's very bad. I want to do something like this :

event_associated ()
{
    echo("I'm associated !")
}

wpa_supplicant_register_event_associated (event_associated);
wpa_supplicant_associate()
...

I have searched in the code, but I don't find anything already done.
Is a function register_event_associated implemented in wpa_supplicant or 
I have to do it myself ?

Thanks

Vincent.




More information about the Hostap mailing list