Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] Question about the CCITT/ITU/CRC-16 routine (crc16.c)

From: Stig Bjørlykke <stig.bjorlykke@xxxxxxxxx>
Date: Tue, 12 Dec 2006 00:41:44 +0100
Den 11. des. 2006 kl. 19.24 skrev Richard van der Hoff:

The difference between your table and the one in crc16.h is the setting
of the "reverse" flag - essentially whether bits are shifted right or
left as the crc calculation progresses.

Thank you for your clarification.

I think I will implement crc16_x25_unreflected() and crc16_x25_ccitt(),
as my table is used a bit different than in crc16_unreflected():

  while (len--)
    crc16 = table[((crc16 >> 8) ^ *buf++) & 0xff] ^ (crc16 << 8);


--
Stig Bjørlykke