[PATCH] Re: hostapd/wpa_supplicant - new development release v0.4.3

Jouni Malinen jkmaline
Fri Jul 8 11:01:45 PDT 2005


On Fri, Jul 08, 2005 at 05:02:48PM +0200, Leonardo Maccari wrote:

> I've cleaned things up. now wpa_supplicant.c defines two interfaces
> (wpa_sm_i and preauth_i) made of pointers to functions needed by wpa.c
> and preauth.c. From those two files the interface is loaded as an extern
> variable (as you do for drivers), the structures of the interface are
> defined in wpa_i.h. This way wpa.c and preauth.c don't need to load
> wpa_supplicant_s.h file. The file still exists becouse ctrl_interface.c
> and events.c still need it. I thought it was kind of pointless to do the
> same for those files since they are part of wpa_supplicant mechanism and
> not something to be exported.

> you may not like the globals in wpa_supplicant.c but I had no better idea.

I haven't yet looked into details (and do not expect to do this for
couple of weeks), but indeed, global variables are not acceptable for
this interface. I would consider using something similar to EAPOL state
machine; see eapol_sm.h and struct eapol_ctx for an example.

-- 
Jouni Malinen                                            PGP id EFC895FA




More information about the Hostap mailing list