Hi All, CRC-10 poly = G(D) = D^10+D^9+D^5+D^4+D^1+1 I thought it is simple CRC-10 implementation. But Wireshark does this in different way. Why it so? You can find the code here. Wireshark code is different. Due to this I am getting CRC error in Iu UP layer. If the way I implement is wrong then please explain how Wireshark is calculating CRC-10. asked 16 Jan '12, 03:36 prithvi edited 16 Jan '12, 15:04 Jaap ♦ |
One Answer:
The referenced code is notoriously hard to read due to lack of proper indentation. From what I can make out there's little difference between this and the Wireshark code found here. You may want to look at the lookup table generation. answered 16 Jan '12, 15:17 Jaap ♦ showing 5 of 6 show 1 more comments |
If you have compared the Wireshark code & the code in the referenced link then you would have found that first loop is same in both.
crc10_accum = ((crc10_accum << 8) & 0x3ff) ^ byte_crc10_table[( crc10_accum >> 2) & 0xff] ^ (crc10>>2);
crc10_accum = ((crc10_accum << 8) & 0x3ff) ^ byte_crc10_table[( crc10_accum >> 2) & 0xff] ^ ((crc10<<6) & 0xFF);
These two lines are extra in wireshark code. Why these two lines of code is required.
I tried to backtrak the variable "crc10" & lost in the middle. As it goes on points to different functions.
did you backtrack the wireshark expression to get the actual expression? Can you please share the expression
Hi
I did not get the value of CRC10 variable in the expression
would you mind sharing the expression for crc10 checksum calculation. As iam facing similar issue where iam using the first loop and wireshark detects the checksum as incorrect.
thanks, biswa
@biswa00, @prithvi
Your "answers" have been converted to comments as that's how this site works. Please read the FAQ for more information.
I've seen a lot of Iu user-plane without CRC errors... Are you talking IuPS or IuCS? Are you able to upload an example and link to it (http://cloudshark.org/ )?