capture raw 802.11 frames

Submitted by sudeepta
on December 8, 2007 - 12:10am

How to capture raw 802.11 frames, that contains whole 802.11 mac header even though that is not intended to me and i an not associated to any Access Point, by using sockets, and how to catch frames from all the channels those are being used(means i can see through iwlist scan).

I searched in the net read some codes but i could not got what i need, and what ever codes are there difficult to understand i wish some good explanation so please give, i am looking it for my project work, i am new to this socket programming so please help.

i am using PCQ Linux 2007, i have bcm4311:14e4 wireless card, I configure it using ndiswrapper and working all right.

There are several open

Anonymous (not verified)
on
December 8, 2007 - 5:10am

There are several open source 802.11 sniffers (airodump-ng, kismet, airsnort). Take a look at their code.

those are clumsey and no doc to understand

sudeepta
on
December 10, 2007 - 2:37am

yes, you are right there are many source codes but those are vast and hardly explains what they really did to achieve that.
i read a few like wifiscanner, apradar, aphopper and rawfakeap but i could not get much. how they are getting raw 802.11 packets.

ok can you tell me some code sections or what exactly to do to get full raw 802.11 frames. in device independent manner. I don't know whether libpcap or libnet support wireless LAN

setup_card() in

Anonymous (not verified)
on
December 10, 2007 - 6:58am

setup_card() in http://trac.aircrack-ng.org/browser/trunk/src/airodump-ng.c
together with the select call in main() (a few lines after the "capture one packet" comment)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.