Message Formats
ICMP messages are sent using the basic IP header. The first octet of the data portion of the datagram is a ICMP type field; the value of this field determines the format of the remaining data. Any field labeled "unused" is reserved for later extensions and must be zero when sent, but receivers should not check these fields. Unless otherwise noted under the individual format descriptions, the values of the internet header fields are as follows:
Version
4
IHL
Internet header length in 32-bit words.
Type of Service
0
Total Length
Length of internet header and data in octets.
Identification, Flags, Fragment Offset
Used in fragmentation, see [1].
Time to Live
Time to live in seconds; as this field is decremented at each machine in which the datagram is processed, the value in this field should be at least as great as the number of gateways which this datagram will traverse.
Protocol
ICMP = 1
Header Checksum
The 16 bit one's complement of the one's complement sum of all 16 bit words in the header. For computing the checksum, the checksum field should be zero. This checksum may be replaced in the future.
Source Address
The address of the gateway or host that composes the ICMP message. Unless otherwise noted, this can be any of a gateway's addresses.
Destination Address
The address of the gateway or host to which the message should be sent.