|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: Manral, Vishwas (VishwasM
NETPLANE.COM)Date: Fri May 31 2002 - 07:47:00 CDT
Arnaud,
The LSUpdate packet uses a 16 bits ones complement checksum, the LSA use the
Fletchers checksum.
I tried and see the algorithm in RFC1071 which gives it as
in 6
{
/* Compute Internet Checksum for "count" bytes
* beginning at location "addr".
*/
register long sum = 0;
while( count > 1 ) {
/* This is the inner loop */
sum += * (unsigned short) addr++;
count -= 2;
}
/* Add left-over byte, if any */
if( count > 0 )
sum += * (unsigned char *) addr;
/* Fold 32-bit sum to 16 bits */
while (sum>>16)
sum = (sum & 0xffff) + (sum >> 16);
checksum = ~sum;
}
As value of sum cannot be 0(unless the entire contents of the packet is 0)
because every overflow is added back, the value of checksum cannot be
0xffff(complement of (uns16) 0).
Thanks,
Vishwas
-----Original Message-----
From: Arnaud Lemaire [mailto:lemair_a
YAHOO.COM]
Sent: Friday, May 31, 2002 5:35 PM
To: OSPF
DISCUSS.MICROSOFT.COM
Subject: Re: OSPF checksum error between two differents contructors
router s
Thanks Vishwas,
but i think i made an error:
Fletcher checksum is only used in LS checksum. the problem i got is
concerning OSPF'header checksum. wich use another way of calculation :
Checksum (RFC2328)
The standard IP 16-bit one's complement checksum of the
entire OSPF packet, excluding the 64-bit authentication
field. This checksum is calculated as part of the
appropriate authentication procedure; for some OSPF
authentication types, the checksum calculation is omitted.
See Section D.4
one told me a one's complement could never be FFFF (maths theory). so an
OSPF checksum could never be FFFF.
Anybody do confirm that ?
regards,
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]