Internet control message header. More...
#include <icmp_header.h>
Data Fields | |
uint8_t | type |
The type of the message. | |
uint8_t | code |
The error code for the datagram reported by the ICMP message. | |
uint16_t | checksum |
The checksum is the 16-bit ones's complement of the one's complement sum of the ICMP message starting with the ICMP Type. | |
union { | |
icmp_echo_t echo | |
Echo specific data. | |
in_addr_t gateway | |
Proposed gateway value. | |
struct { | |
icmp_param_t reserved | |
Reserved field. | |
icmp_param_t mtu | |
Proposed MTU. | |
} frag | |
Fragmentation needed specific data. | |
struct { | |
icmp_param_t pointer | |
Problem pointer. | |
icmp_param_t reserved | |
Reserved field. | |
} param | |
Parameter problem specific data. | |
} | un |
Message specific data. |
Internet control message header.
uint16_t icmp_header::checksum |
The checksum is the 16-bit ones's complement of the one's complement sum of the ICMP message starting with the ICMP Type.
For computing the checksum, the checksum field should be zero. If the checksum does not match the contents, the datagram is discarded.
Referenced by icmp_process_packet(), and icmp_send_packet().
uint8_t icmp_header::code |
The error code for the datagram reported by the ICMP message.
The interpretation is dependent on the message type.
Referenced by icmp_client_process_packet(), and icmp_send_packet().
Echo specific data.
Referenced by icmp_echo(), and icmp_process_echo_reply().
struct { ... } icmp_header::frag |
Fragmentation needed specific data.
Referenced by icmp_client_process_packet().
Proposed gateway value.
Proposed MTU.
struct { ... } icmp_header::param |
Parameter problem specific data.
Referenced by icmp_client_process_packet().
Problem pointer.
Reserved field.
Must be zero.
uint8_t icmp_header::type |
The type of the message.
Referenced by icmp_client_process_packet(), icmp_process_packet(), and icmp_send_packet().
union { ... } icmp_header::un |
Message specific data.
Referenced by icmp_client_process_packet(), icmp_echo(), and icmp_process_echo_reply().