Ftp-WG: Updating the checksum
"Mohammad Awad" <[email protected]> Sun, 16 Feb 2003 02:28:26 -0500
| Newsgroups | gmane.ietf.ftpext |
|---|---|
| Message-ID | <[email protected]> |
Hi All, It's written in RFC1071 that updating the Internet Header Checksum after one field (m), had changed, can be carried out this way: C' = C + (-m) + m' = C + (m' - m) where C' is the new checksum, C is the old one, m is the old value of the field and m' is the new value of it. However I used the following values as an example to apply the equation and found out that something is wrong. asume that we are calculating the 16 bit checksum for 2 fields m1,m2. Original values: m1: 1234 m2: 5678 C, from the definition equation: 9753 After updating m1 m1':1235 m2 :the same C' from the update equation: 9754 C', from the definition equation: 9752 may be I've some troubles in understanding the application of 1's complement summation and subtraction! Can anyone help please? _________________________________________________________________ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus