Name
Message Code
Synopsis
The Code field is used to specify a specific subtype of the ICMP error message, which was specified in the Type field.
- Size
Eight bits.
- Notes
ICMP essentially consists of a predefined dictionary of messages, allowing messages to be exchanged using numeric identifiers. The Type field is used to specify the major class of the message, while the Code field is used to specify the minor class, although some message Types do not have any subtype Codes.
The values used in this field vary according to the Message Type for the current error message.
- Capture Sample
In the capture shown in Figure 5.12, the Code field is set to 3, which is the value associated with the subtype of “Port Unreachable” when used with Type 3 (Destination Unreachable) error messages.
Figure 5.12. The Message Code field- See Also
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access