This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

802.11 FCS calculation

0

Hi, Im trying to understand how 802.11 calculates the FCS. Im using scapy to build and dissect packets quickly and easily however the FCS field of 802.11 packet is not calculated automatically when building an 802.11 packet. The Dot11Wep packet calculates the IC -WEP specific IC- however there is a second redundancy check that is supposed to check the entire 802.11 packet including the wep data. As i understand it (incorrectly i might add) the FCS is CRC32 of the entire 802.11 packet however when I try this in scapy/python the answer differs from a packet that has been captured and analysed by wireshark to be "correct". How then is the FCS calculated? Cheers

asked 01 Apr '12, 04:44

keiza's gravatar image

keiza
1111
accept rate: 0%


One Answer:

1

The best way to find out how Wireshark calculates the FCS is to examine the source code. Try searching for crc32_802_tvb in the IEEE 802.11 dissector. The calculation varies depending upon whether there's padding or not. The crc32_802_tvb function is implemented in the crc32-tvb.c file, and the crc32_802_tvb_padded is implemented within the IEEE 802.11 dissector itself.

answered 01 Apr '12, 17:34

cmaynard's gravatar image

cmaynard ♦♦
9.4k1038142
accept rate: 20%

Wow, Thanks so much for your prompt reply and your helpful suggestions!

(01 Apr '12, 21:33) keiza