wiki:crkit/Software/Firmware/Framework/R3_arch/ip/example

Checksum Calculation (source : wikipedia)

For example, use Hex 45000030442240008006442e8c7c19acae241e2b (20 bytes IP header):

4500 + 0030 + 4422 + 4000 + 8006 + 0000 + 8c7c + 19ac + ae24 + 1e2b = 2BBCF
2 + BBCF = BBD1 = 1011101111010001, the 1'S of sum = 0100010000101110 = 442E

To validate a header's checksum the same algorithm may be used - the checksum of the header with the checksum field filled in should be a word containing all zeros (value 0).

Return ..

Last modified 8 years ago Last modified on 06/16/10 22:56:57