Help with source code

Jouni Malinen jkmaline at cc.hut.fi
Fri Mar 28 23:59:57 EST 2003


On Mon, Mar 24, 2003 at 11:32:05AM +0100, carmat at jumpy.it wrote:

> Hi, i`m studing hostap source code and i`m interested in communication between
> APs via WDS. I can`t locate in the code where the AP, receiving a frame
> from a station, checks if the destination entity is a sta or an AP (in the
> latter case the source AP should change TO/FromDS bits and add in the header
> the fourth address...is that right??).

There is no such code in the driver. TX path encapsulates packets with
802.11 header based on the Linux netdevice that is used to send that
frame (e.g., wlan0 uses 3-addr format and wlan0wds0 4-addr format). RX
path decapsulates frames and based on the 802.11 header delivers them to
the correct netdevice. Linux bridge code can then be used to do L2
bridging of the frames between different devices.

However, there's an exception to this. If the frame is from one
associated station to another station that is associated to the same AP,
Host AP driver takes care of bridging (unless this default behavior is
disabled). This code is in hostap_rx_skb() (in the current CVS version
of hostap_hw.c). Look for hostap_is_sta_assoc() call in that function to
locate the code.

-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the HostAP mailing list