[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## Re: Question on How the Checksum is Computed, please help!

**From**: |
marjonz |

**Subject**: |
Re: Question on How the Checksum is Computed, please help! |

**Date**: |
Thu, 02 May 2002 22:23:31 +0800 (PHT) |

**User-agent**: |
IMP/PHP IMAP webmail program 2.2.6 |

Quoting Pawel Kot <address@hidden>:
>* If the message len is odd, an extra octer 0x00 is added before*
>* calculating the checksum.*
I didn't seem to find this logic in the code in FB61_RX_StateMachine,
here is where the XORing happens:
/* XOR the byte with the current checksum */
checksum[BufferCount&1] ^= rx_byte;
Some more logic, then:
/* If this is the last byte, it's the checksum. */
if (BufferCount == MessageLength + (MessageLength % 2) + 2) {
/* Is the checksum correct? */
if (checksum[0] == checksum[1]) {
I don't get the fact that checksum[0] will always be equal
to checksum[1]. For example, I received the ff ack dump:
:1e:0c:00:7f:00:02:d1:80:cf:f1
cf = XOR(1e, 00, 00, d1)
f1 = XOR(0c, 7f, 02, 80)
I have computed c1 & f1 as correct. But as you see,
they are not equal. But for the logic above, and as I've
seen in the xgnokii dump (debug mode), they are almost all the
time equal, how is this?

**Question on How the Checksum is Computed, please help!**, *marjon*, `2002/05/02`
**Re: Question on How the Checksum is Computed, please help!**, *C. Kemp*, `2002/05/02`
**Re: Question on How the Checksum is Computed, please help!**, *marjon*, `2002/05/02`
**Re: Question on How the Checksum is Computed, please help!**, *Pawel Kot*, `2002/05/02`
**Re: Question on How the Checksum is Computed, please help!**,
*marjonz* **<=**
**Re: Question on How the Checksum is Computed, please help!**, *BORBELY Zoltan*, `2002/05/02`
**Re: Question on How the Checksum is Computed, please help!**, *Christopher Kemp*, `2002/05/02`