hostapd netlink socket

Holger Schurig hs4233 at mail.mn-solutions.de
Tue Sep 29 06:00:47 EDT 2009


> do you know if there is blocking mode with this socket, how the
> driver will know that the operation is finished ?

I usually know such things after reading the source.

> for example : after sending authnatication msg how the driver
> know that hostApd add the sta with no problem ?

Read src/drivers/driver_nl80211.c.

The find the function wpa_driver_nl80211_sta_add(). See what 
function it calls to do the work, e.g. near the end

  ret = xxxx();
  if (ret)
     error

Then stufy the function xxxx() you just found, it's in the same 
file. Look for things that can have blocking behavior, e.g. 
do/while/for loops. You can also use "gdb" and breakpoints and 
single-step the code.

You could also study the source of "iw" for another 
implementation of NL80211-based communication. Sometimes 
approaching the same problem from a different angle can be 
helpful.



I actually didn't give you the right answer, because it's so easy 
to derive the answer from the source. So do your homework by 
yourself and you'll have learnt more than being told the 
details. No pun intented.


Usually it's also helpful to get the big picture: nl80211 uses 
netlink. So you can use your favorite search engine to find a 
howto about linux netlink.

-- 
http://www.holgerschurig.de


More information about the HostAP mailing list