Internet Control Message Protocol - Technical Details - ICMP Segment Structure - Header

Header

The ICMP header starts after the IPv4 header. All ICMP packets will have an 8-byte header and variable-sized data section. The first 4 bytes of the header will be consistent. The first byte is for the ICMP type. The second byte is for the ICMP code. The third and fourth bytes are a checksum of the entire ICMP message. The contents of the remaining 4 bytes of the header will vary based on the ICMP type and code.

ICMP error messages contain a data section that includes the entire IP header plus the first 8 bytes of data from the IP datagram that caused the error message. The ICMP datagram is then encapsulated in a new IP datagram.

Bits 0–7 8–15 16–23 24–31
0 Type Code Checksum
32 Rest of Header
  • Type – ICMP type as specified below.
  • Code – Subtype to the given type.
  • Checksum – Error checking data. Calculated from the ICMP header+data, with value 0 for this field. The checksum algorithm is specified in RFC 1071.
  • Rest of Header – Four byte field. Will vary based on the ICMP type and code.

Read more about this topic:  Internet Control Message Protocol, Technical Details, ICMP Segment Structure

Other articles related to "header, headers":

List Of HTTP Header Fields - Requests - Common Non-standard Request Headers
... Non-standard header fields were conventionally marked by prefixing the field name with X- ... convention became deprecated in June 2012 due to the inconveniences it caused when non-standard headers then became standard ... For example, X-Gzip and Gzip are now both supported headers for compressed HTTP requests and responses ...
Cmsg
... They differ from ordinary posts by a header field named Control ... There are two historical alternatives to header field Control ... format of the subject line is widely used in addition to the Control header the subject line consists of the word "cmsg" followed by control name and arguments ...
List Of HTTP Header Fields
... HTTP header fields are components of the message header of requests and responses in the Hypertext Transfer Protocol (HTTP) ... The header fields are transmitted after the request or response line, the first line of a message ... Header fields are colon-separated name-value pairs in clear-text string format, terminated by a carriage return (CR) and line feed (LF) character sequence ...
Makedepend - Purpose
... C expresses interfaces between compilation units via header files as such, it is often necessary to rebuild a compilation unit when a header it includes is changed ... files to generate a list of dependencies (those header files included directly and indirectly) ...
Combine Demolition Derby
... remove heavy or unneeded parts of the combines before competitions and reinforce the front, or header, of the vehicle ... A vehicle is deemed eliminated once its header section is destroyed or the combine is immobilized ... Competitors attempt to use the header to pop other vehicle's tires, rupture their drive belts, or tear off their header ...