32,7 → 32,7 |
|
/** @file |
* ICMP header definition. |
* Names according to the linux src/include/linux/icmp.h header file. |
* Based on the RFC~792. |
*/ |
|
#ifndef __NET_ICMP_HEADER_H__ |
58,10 → 58,10 |
struct icmp_echo{ |
/** Message idintifier. |
*/ |
icmp_param_t id; |
icmp_param_t identifier; |
/** Message sequence number. |
*/ |
icmp_param_t sequence; |
icmp_param_t sequence_number; |
} __attribute__ ((packed)); |
|
/** Type definition of the internet control message header. |
77,14 → 77,15 |
/** Internet control message header. |
*/ |
struct icmp_header{ |
/** Specifies the type of the message. |
/** The type of the message. |
*/ |
uint8_t type; |
/** Contains the error code for the datagram reported by this ICMP message. |
/** The error code for the datagram reported by the ICMP message. |
* The interpretation is dependent on the message type. |
*/ |
uint8_t code; |
/** Contains the checksum for the ICMP message starting with the ICMP Type field. |
/** 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. |
*/ |
uint16_t checksum; |
100,9 → 101,10 |
/** Fragmentation needed specific data. |
*/ |
struct{ |
/** Unused field. |
/** Reserved field. |
* Must be zero. |
*/ |
icmp_param_t _unused; |
icmp_param_t reserved; |
/** Proposed MTU. |
*/ |
icmp_param_t mtu; |
113,9 → 115,10 |
/** Problem pointer. |
*/ |
icmp_param_t pointer; |
/** Unused field. |
/** Reserved field. |
* Must be zero. |
*/ |
icmp_param_t _unused; |
icmp_param_t reserved; |
} param; |
} un; |
} __attribute__ ((packed)); |