Wpa_supplicant : Be notified of a state change

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


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 :

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);

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 ?



More information about the Hostap mailing list