Hi all, I need your help, I'm trying to calculate checksum on icmp packet type 8 ( Ping ) but I can't obtain checksum value, how i can do it? what is the value of data field? I have this values, you can check the print, I hope you can help me. type 88_bits; codigo 08_bits; id_be 1  16 bits; id_le 256 16bits; Se_be 410416 bits;
Se_le 2064 16 bits
data ????? 0000 0001 asked 16 May '12, 12:18 blackfredy 
From RFC 792:
So you have to split the ICMP header + payload (data) into 16 bit words (using 0x0000 for the checksum field) like this:
Then calculate the one's complement sum of the first two words and then repeatedly calculate the one's complement sum of the result and the next 16 bit word until you reach 0x6869. At last, calculate the one's complement by inverting all bits. (Also have a look at RFC 1071: Computing the Internet Checksum) answered 16 May '12, 13:34 SYNbit ♦♦ Hey!!! You go it!!! i calculate and the result is 49836, i do the complement ( 6553549836 = 15699 ) and get the answer!!!!, I have to calculate using more types on icmp, if a need help a will write again. Thanks thanks in advance!!! Bye.
(16 May '12, 14:56)
blackfredy
(I converted your "answer" to a "comment", as that's the way this site works best, please see the FAQ)
(16 May '12, 14:59)
SYNbit ♦♦
