I'm writing an application in C using airpcap
and pcap
libraries. I want to ask if there is a ready function to check the CRC
(FCS
) of received packets or whether it must be calculated manually. In airpcap's Control Panel you can setup the FCS
filter.
One of the functions of the application will be something similar to site survey. I want to ask how to list discovered networks in order not to duplicate them. Compare the ssid
or maybe there is a simpler way; is there some parameter which is unique to a network?
First I would check whether the driver is providing the OS
with the invalid frames. If your driver is capable of providing these invalid frames - then the rest is up to you. Checking the code of aircrack-ng
(or a different tool) should give you an idea.
Side note for site survey: I would focus on identifying different BSSIDs
which should give you idea about the radios in the neighbourhood. Same SSID
can be used for many overlapping BSSes
(of course at some point you'd be needing it as well). Have a look at the different 802.11 frames (start with something easy - like Beacon Frame
).
Wireshark has a CRC-32 function that it uses to check Ethernet and 802.11 FCSes when available; check out its Ethernet and 802.11 dissectors. It's licensed under the GNU Public License, Version 2.