Research Context
As the development of my ICMP-based Network Communication Project continues at full throttle, today I want to talk about the most "diplomatic" part of the operation: the Checksum. If you don't stamp this seal correctly on the packet you're sending, the Target host's operating system treats your packet as a "Malformed data" and dumps it in the trash before it even gets through the door.
So, how exactly is this "seal" calculated in a low-level language? Let's examine it step-by-step through the very algorithm I wrote and currently use in my project.
The ICMP protocol uses a 16-bit One's Complement sum to ensure data integrity. This means you have to add up the entire packet in 16-bit (2-byte) chunks.
Here is what this mathematical operation looks like in the x64 Assembly realm:






