Running wpa_supplicant and hostapd on the same machine

Jouni Malinen j at w1.fi
Mon Apr 11 11:22:07 EDT 2011


On Mon, Apr 11, 2011 at 01:02:53PM +0100, Panagiotis Georgopoulos wrote:
> Well, how do you do it exactly? Do you use the driver_test.c approach that
> you mention bellow or another approach?

I use driver_test.c for many of the upper layer tests and mac80211_hwsim
with driver_nl80211.c for some lower layer testing.

> I am guessing here, that any another approach would involve getting the
> hostapd to listen to the local host or Ethernet interface (?) with the wired
> driver (?) and the wpa_supplicant to send to that interface with the
> wireless drivers and many of its functions off (e.g. ap_scan=0,  scan_ssid=0
> and eapol_flags=0). Am I right?

This is unlikely to work very well. I would say that driver_test.c and
mac80211_hwsim are far superior approaches for more or less everything.

> Well it seems that hostapd cannot listen to the lo interface so that's not
> an option. I'll check driver_test.c because it might provide exactly what I
> need. I would prefer keeping wpa_supplicant and hostapd separated, so that
> might be the way to go, since hostapd will do the usual Accounting stuff
> that it does when it is acting as an AP.
> 
> Incidentally, am I wrong in thinking that hostapd informs in a set interval
> (or when the client disconnects) the AAA server of the client network usage
> (e.g. Kbytes sent/received) so that the AAA server would keep correct
> accounting information for that client?

You can configure hostapd to use accounting to get the start/stop
messages and separately, to enable interim updates. Please note that you
will need to implement a custom read_sta_data() in driver_test.c if you
want to get packets/kbytes send/received statistics for this special use
case.

-- 
Jouni Malinen                                            PGP id EFC895FA


More information about the HostAP mailing list