Correct way to obtain the 802.11 headers with a raw socket?

Hector Velayos hvelayos
Sat Nov 16 17:07:17 PST 2002

Hi all,

which is the way to obtain the 802.11 headers using a raw socket in a

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.

If the monitor mode 2 is not activated, the raw socket (using as protocol
ETH_P_ALL) retrieves 802.3 headers despite the interface is a wireless LAN.

This problem in my code also appears in Ethereal ( If
monitor mode is activated, Ethereal interprets the frames as 802.11 frames,
otherwise they are considered 802.3 frames.

Any indication is appreciated.


KTH IMIT - Forum building - 164 40 KISTA - SWEDEN
Tel: +46 8 7904255 Fax: +46 8 752 12 40

More information about the Hostap mailing list