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 8--8_bits; codigo 0--8_bits; id_be 1 --- 16 bits; id_le 256 --16bits; Se_be 4104---16 bits; Se_le 2064 16 bits data ????? 0000 0001 asked 16 May '12, 12:18 blackfredy |
One Answer:
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 SYN-bit ♦♦ |
Hey!!!
You go it!!! i calculate and the result is 49836, i do the complement ( 65535-49836 = 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.
(I converted your “answer” to a “comment”, as that’s the way this site works best, please see the FAQ)