Correct way to obtain the 802.11 headers with a raw socket?
jkmaline at cc.hut.fi
Tue Nov 19 00:13:17 EST 2002
On Sun, Nov 17, 2002 at 02:07:17AM +0100, Hector Velayos wrote:
> which is the way to obtain the 802.11 headers using a raw socket in a
If you are talking about using Host AP driver as the client and wanting
to get 802.11 headers, the way would be to start modifying the source
> I know that activating the monitor mode (level 2) it is possible and
> actually I did. But the station cannot communicate with the AP while in
> monitor mode 2 :/ and I would need the station to remain working.
Which frames do you need? If it is enough to get all data frames (and
not ctrl/mgmt frames), it could be sufficent to setup Prism2 card in
promiscuous mode and modify RX code path of the driver to pass 802.11
headers to the kernel. You would also need to make sure that TX path
would handle this correctly.
I'm redesigning the RX code path at the moment and with the new code it
should be easier to do this kind of changes. However, you might also
need some support from the kernel netstack, since changing the netdev to
use 802.11 headers would indicate that the TX frames should be with
802.11 headers when they are sent to the driver.
Jouni Malinen PGP id EFC895FA
More information about the HostAP