ICMP codes

Some ICMP types have codes attached.

ICMP typeNameCodeDescription
0Echo Reply0No Code
1Unassigned  
2Unassigned  
3Destination Unreachable0Net Unreachable
  1Host Unreachable
  2Protocol Unreachable
  3Port Unreachable
  4Fragmentation Needed and Don't Fragment was Set
  5Source Route Failed
  6Destination Network Unknown
  7Destination Host Unknown
  8Source Host Isolated
  9Communication with Destination Network is Administratively Prohibited
  10Communication with Destination Host is Administratively Prohibited
  11Destination Network Unreachable for Type of Service
  12Destination Host Unreachable for Type of Service
4Source Quench0No Code
5Redirect0Redirect Datagram for the Network (or subnet)
  1Redirect Datagram for the Host
  2Redirect Datagram for the Type of Service and Network
  3Redirect Datagram for the Type of Service and Host
6Alternate Host Address0Alternate Address for Host
7Unassigned  
8Echo0No Code
9Router Advertisement0No Code
10Router Selection0No Code
11Time Exceeded0Time to Live exceeded in Transit
  1Fragment Reassembly Time Exceeded
12Parameter Problem0Pointer indicates the error
  1Missing a Required Option
  2Bad Length
13Timestamp0No Code
14Timestamp Reply0No Code
15Information Request0No Code
16Information Reply0No Code
17Address Mask Request0No Code
18Address Mask Reply0No Code
19Reserved (for Security)  
20-29Reserved (for Robustness Experiment)  
30Traceroute  
31Datagram Conversion Error  
32Mobile Host Redirect  
33IPv6 Where-Are-You  
34IPv6 I-Am-Here  
35Mobile Registration Request  
36Mobile Registration Reply