ICMP PDU

  • ICMP Addrmask Requset/Reply PDU
  • ICMP TimeStamp Requset/Reply PDU
  • ICMP Unreachable PDU
  • ICMP Echo Requset/Reply PDU
  • ICMP Timeout PDU
  • ICMP Redirect PDU
  • ICMP Router Request PDU
  • ICMP Router Advertisement

ICMP PDU

┃ 8bit | 8bit | 16bit    ┃
┏------+------+----------┓
┃ type | code | checksum ┃
┠------------------------┨
┃        content         ┃
┗------------------------┛

ICMP Addrmask Requset/Reply PDU

┃ 8bit        | 8bit    | 16bit         ┃
┏-------------+---------+---------------┓
┃ type(17/18) | code(0) | checksum      ┃
┠-----------------------+---------------┨
┃ Identification        | serial number ┃
┠---------------------------------------┨
┃          subnet mask                  ┃
┗---------------------------------------┛

ICMP TimeStamp Requset/Reply PDU

┃ 8bit        | 8bit    | 16bit         ┃
┏-------------+---------+---------------┓
┃ type(13/14) | code(0) | checksum      ┃
┠-----------------------+---------------┨
┃ Identification        | serial number ┃
┠---------------------------------------┨
┃           send timestamp              ┃
┠---------------------------------------┨
┃        receive timestamp              ┃
┠---------------------------------------┨
┃      transport timestamp              ┃
┗---------------------------------------┛

ICMP Unreachable PDU

┃ 8bit    | 8bit       | 16bit    ┃
┏---------+------------+----------┓
┃ type(3) | code(0~15) | checksum ┃
┠----------------------+----------┨
┃ reserved(0)                     ┃
┠---------------------------------┨
┃ IP header + the first 8byte     ┃
┃   of origin IP data packet      ┃
┗---------------------------------┛

ICMP Echo Requset/Reply PDU

┃ 8bit      | 8bit    | 16bit         ┃
┏-----------+---------+---------------┓
┃ type(0/8) | code(0) | checksum      ┃
┠---------------------+---------------┨
┃ Identification      | serial number ┃
┠-------------------------------------┨
┃               option                ┃
┗-------------------------------------┛

ICMP Timeout PDU

┃ 8bit     | 8bit      | 16bit    ┃
┏----------+-----------+----------┓
┃ type(11) | code(0/1) | checksum ┃
┠----------------------+----------┨
┃ reserved(0)                     ┃
┠---------------------------------┨
┃ IP header + the first 8byte     ┃
┃   of origin IP data packet      ┃
┗---------------------------------┛

ICMP Redirect PDU

┃ 8bit    | 8bit      | 16bit    ┃
┏----------+----------+----------┓
┃ type(5) | code(0/3) | checksum ┃
┠---------------------+----------┨
┃ router IP addr                 ┃
┠--------------------------------┨
┃ IP header + the first 8byte    ┃
┃   of origin IP data packet     ┃
┗--------------------------------┛

ICMP Router Request PDU

┃ 8bit     | 8bit    | 16bit    ┃
┏----------+---------+----------┓
┃ type(10) | code(0) | checksum ┃
┠--------------------+----------┨
┃ reserved(0)                   ┃
┗-------------------------------┛

ICMP Router Advertisement

┃ 8bit     | 8bit     | 16bit    ┃
┏----------+----------+----------┓
┃ type(9)  | code(0)  | checksum ┃
┠----------+----------+----------┨
┃ addr num | addr len | ttl      ┃
┠--------------------------------┨
┃ router IP addr [1]             ┃
┠--------------------------------┨
┃ priority [1]                   ┃
┠--------------------------------┨
┃ router IP addr [2]             ┃
┠--------------------------------┨
┃ priority [2]                   ┃
┠--------------------------------┨
┃ ... ...                        ┃
┗--------------------------------┛