The Internet Control Message Protocol (ICMP) is a protocol for transmitting status information and error messages in IP protocols, TCP protocols and UDP protocols between IP network nodes. Especially gateways and hosts use ICMP to send reports about datagram problems back to the original source. ICMP protocol messages are defined in two classes: In error messages and information messages.
Error messages can inform about the status of the connection, such as" DTE unreachable", path redirection, "resources no longer usable","time expired" or parameter problems. And information messages may be timing, address mask, router discovery, or echo information that can be used to determine whether a destination is reachable and responding.
The ICMP protocol is treated by the IP protocol as a higher layer protocol and is an integral part of the IP protocol. Therefore, the ICMP header is also composed of an IP header with subsequent ICMP data.
The data format of ICMP knows the ICMP type (8 bits), the ICMP code (8 bits) and the ICMP checksum (16 bits), followed by the ICMP message (224 bits). Depending on the message, additional data fields are added. For example, in the case of the Parameter Problems message, the 1- byte Pointer field, or in the case of the Echo Request, the Identification field (8 bits) and the Sequence Numberdata field (8 bits). In the case of the Timestamp request, another three four byte data fields for the Timestamp are added: Originate Timestamp (4 bytes), Receive Timestamp (4 bytes) and Transmit Timestamp (4 bytes). The same applies to the determination of routers.
The ICMP protocol is published in RFC 792.