wiki:crkit/Software/Firmware/Framework/R3_arch/ip/example
close Warning: Can't synchronize with repository "(default)" (/common/SVN/crkit does not appear to be a Subversion repository.). Look in the Trac log for more information.

Version 2 (modified by khanhle, 12 years ago) ( diff )

--

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 ..

Note: See TracWiki for help on using the wiki.