CCITT-CRC16 in kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Hello CRC Wizards,

I am trying to use ../linux-2.6.12/lib/crc_citt in a driver.
Basically, it doesn't return anything that closely resembles
the CCIT-16 CRC. I note that drivers that use it expect it
to return 0xf0b8 if it performs the CRC of something that
has the CRC appended (weird).

Does anybody know what the CRC of a known string is supposed
to be? I have documentation that states that the CCITT CRC-16
of "123456789" is supposed to be 0xe5cc and "A" is supposed
to be 0x9479. The kernel one doesn't do this. In fact, I
haven't found anything on the net that returns the "correct"
value regardless of how it's initialized or how it's mucked
with after the CRC (well I could just set the CRC to 0 and
add the correct number). Anyway, how do I use the crc_citt
in the kernel? I've grepped through some drivers that use
it and they all seem to check the result against some
magic rather than performing the CRC of data, but not the
CRC, then comparing it to the CRC. One should not have
to use magic to verify a CRC, one should just perform
a CRC on the data, but not the CRC, then compare the result
with the CRC. Am I missing something here?

Dick Johnson
Penguin : Linux version 2.6.12 on an i686 machine (5537.79 BogoMips).
Warning : 98.36% of all statistics are fiction.
I apologize for the following. I tried to kill it with the above dot :

The information transmitted in this message is confidential and may be privileged.  Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited.  If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to [email protected] - and destroy all copies of this information, including any attachments, without reading or disclosing them.

Thank you.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at
Please read the FAQ at

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux