ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

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