This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

Iu UP payload CRC - CRC10 poly

0

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's gravatar image

prithvi
6558
accept rate: 0%

edited 16 Jan '12, 15:04

Jaap's gravatar image

Jaap ♦
11.7k16101


One Answer:

0

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's gravatar image

Jaap ♦
11.7k16101
accept rate: 14%

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.

(16 Jan '12, 21:37) prithvi

did you backtrack the wireshark expression to get the actual expression? Can you please share the expression

(26 Feb '14, 01:41) biswa00

Hi

I did not get the value of CRC10 variable in the expression

(26 Feb '14, 01:54) prithvi

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

(26 Feb '14, 02:02) biswa00

@biswa00, @prithvi

Your "answers" have been converted to comments as that's how this site works. Please read the FAQ for more information.

(26 Feb '14, 02:12) grahamb ♦

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/ )?

(26 Feb '14, 18:03) Quadratic
showing 5 of 6 show 1 more comments