Hello, I am trying to calculate the FCS for ipv4/ipv6 packets. I use the following algorithm:
And that is my algorithm. Wireshark says it's wrong, and I'm sure he's right, but I don't know what I did wrong. I learned about it here: http://cs.nju.edu.cn/yangxc/dcc_teach/fcs-calc.pdf Any ideas? asked 17 Jul '13, 06:22 Maio |
One Answer:
The PDF mentions NTCIP and AB 3418.
If you try to create an FCS for an ethernet frame with a method defined for NTCIP it may not work for one of the following reasons:
For a detailed information how to calculate the FCS please check the following file:
You can also read the Wireshark source code: packet-eth.c:add_ethernet_trailer()
crc32-tvb.c:
} Regards answered 17 Jul '13, 16:05 Kurt Knochner ♦ |
To my great surprise, "AB" in "AB 3418" stands for "Assembly Bill", as in "California Assembly BIll 3418" (I've lived here 28 years, so I should've recognized it :-)); that bill, passed by the California state legislature specified that traffic signal controllers in California installed in 1996 or later must have a standard control protocol; the California Department of Transportation published a specification for that protocol, which runs over 1200 baud RS-232.
The protocol was based on a draft of a US Department of Transportation(?) standard, the "National Transportation Control/ITS Communications Protocol" - that's "NTCIP". I infer from section 4.3.2 "Data Link Layer Protocol" of the CA DOT specification that it's based on HDLC, so the CRC would presumably be the one specified for HDLC.
The 32-bit HDLC CRC and the Ethernet CRC use the same polynomial; there might be a byte-order difference, however.