Wed Apr 13 04:25:02 PDT 2005
I'm writing a daemon that listens to wpa_supplicant messages so that
external actions can be taken - such changing IP addresses on the
interface when wpa_supplicant changes which AP it's talking too.
So far I can successfully get terminate and deassociation messages.
However, I've hit a stumbling block. I can get association messages but
they don't contain enough information to be of use as security stuff
happens after association and there's no message for no security being
applied when none has been configured.
What I need is wpa_supplicant to send a message saying "SHOWTIME" or
similar to indicate that as far as wpa_supplicant is concerned the
interface is ready for use.
I could parse STATUS information for the required info, but I don't like
that idea as it kind of defeats the messaging system in place.
Whilst writing this daemon (working name wpa_action) I've also hit on an
improvement/addition I'd also like to see to make writing this and
similar programs easier.
At present, wpa_supplicant sends MSG_INFO with a string that is defined
in the .c files with extra information like MAC addresses. Whilst this
is good for us humans to read, it make writing programs like this a PITA
as we have parse parts of the string - and there's no guarantee that the
string won't change.
Below is an example of what I'd like to see.
#define MSG_EVENT_ASSOCIATED "ASSOCIATED"
#define MSG_EVENT_DEASSOCIATED "DEASSOCIATED"
#define MSG_EVENT_SHOWTIME "SHOWTIME"
#define MSG_EVENT_TERMINATING "TERMINATING"
wpa_msg(wpa_s, MSG_EVENT, MSG_EVENT_SHOWTIME)
Roy Marples <uberlord at gentoo.org>
Gentoo Linux Developer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.shmoo.com/pipermail/hostap/attachments/20050413/68da96a8/attachment.pgp
More information about the Hostap