Sends ICMP packets for echo to network host.
IP HEADER (DEFAULT 20 byte)
0 1 2 3 4 5 6 7 8
+--------+--------+--------+--------+--------+--------+--------+--------+
| Ver | IHL | TypeOfService | Total Length |
+--------+--------+--------+--------+--------+--------+--------+--------+
| Identification | Fragment Offset |
+--------+--------+--------+--------+--------+--------+--------+--------+
| TTL | Protocol | Checksum |
+--------+--------+--------+--------+--------+--------+--------+--------+
| Source Address |
+--------+--------+--------+--------+--------+--------+--------+--------+
| Destination Address |
+--------+--------+--------+--------+--------+--------+--------+--------+
ICMP HEADER (DEFAULT 8 byte)
0 1 2 3 4 5 6 7 8
+--------+--------+--------+--------+--------+--------+--------+--------+
| Type | Code | Checksum |
+--------+--------+--------+--------+--------+--------+--------+--------+
| Identifier | Sequence |
+--------+--------+--------+--------+--------+--------+--------+--------+
PAYLOAD (DEFAULT 56 byte)
0 1 2 3 4 5 6 7 8
+--------+--------+--------+--------+--------+--------+--------+--------+
| ....... |
+--------+--------+--------+--------+--------+--------+--------+--------+
| ....... |
...
compile the binary
make
remove object files & clean all
make clean
make fclean
recompile all sources
make re
must be run with sudo
to bind the socket