Configuration information in hostapd-0.6.2 / wpa_supplicant-0.6.2

Jouni Malinen j
Wed Feb 6 20:23:09 PST 2008


On Wed, Feb 06, 2008 at 03:21:56PM +0100, Christian Fackroth wrote:

> I can configure the wpa_supplicant with a config file. In the config file I can set
> a tag called "mode" which can be 0 for INFRA or 1 for IBSS as show in the follow
> example.

Yes, but there can be multiple network and as such, there is no global
mode option. This depends on dynamic runtime behavior and network
selection..

> Ok in the function wpa_driver_wext_init(void *ctx, const char *ifname) the
> driver is configured for INFRA with the follow instructions:
> 
> if (wpa_driver_wext_set_mode(drv, 0) < 0) {
>   printf("Could not configure driver to use managed mode\n");
> }

This is here just to get the driver into a known state and would not
really be needed.

> If the mode is 1 in the config file I have to configured this with 1 and not
> fix with 0.

Why?

> So I need the information from the config file here and if this
> information is not available I have to add this information. Or is there a
> way I can use the associate() call for this?

associate() call is _the_ place to do this and that's why there is a
call to wpa_driver_wext_set_mode() there..

> There are several locations in hostapd and wpa_supplicant where I have
> to make decisions depend from the selected mode. Do you have some
> additional helpful hints for me?

Can you please explain what you are trying to do? It sounds like there
is some kind of misunderstanding here.. hostapd is never used in IBSS,
so infra/ibss selection does not make much sense there and as far as
wpa_supplicant is concerned, the mode can change based on network
selection, so whatever changes you are planning would need to take this
into account.

-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list