[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: |
BORBELY Zoltan |
Subject: |
Re: Question on How the Checksum is Computed, please help! |
Date: |
Thu, 2 May 2002 17:37:00 +0200 |
User-agent: |
Mutt/1.2.5.1i |
Hi,
On Thu, May 02, 2002 at 10:23:31PM +0800, address@hidden wrote:
> if (checksum[0] == checksum[1]) {
>
> I don't get the fact that checksum[0] will always be equal
> to checksum[1].
IMHO it's a little sloppy, but it works. The correct version is:
if (checksum[0] == 0 && checksum[1] == 0) {
> 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.
You forget to include the checksum bytes in the receiving checksum
calculation. As you can see 0xcf ^ 0xcf == 0 and 0xf1 ^ 0xf1 == 0, so
they are equal.
Bye,
Bozo
- 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, 2002/05/02
- Re: Question on How the Checksum is Computed, please help!,
BORBELY Zoltan <=
- Re: Question on How the Checksum is Computed, please help!, Christopher Kemp, 2002/05/02