Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 4714 → Rev 4715

/branches/network/uspace/srv/net/il/icmp/icmp_header.h
43,17 → 43,38
#include "../../include/in.h"
#include "../../include/icmp_codes.h"
 
/** Type definition of the user datagram header.
/** Type definition of the echo specific data.
* @see icmp_echo
*/
typedef struct icmp_echo icmp_echo_t;
 
/** Type definition of the echo specific data pointer.
* @see icmp_echo
*/
typedef icmp_echo_t * icmp_echo_ref;
 
/** Echo specific data.
*/
struct icmp_echo{
/** Message idintifier.
*/
icmp_param_t id;
/** Message sequence number.
*/
icmp_param_t sequence;
} __attribute__ ((packed));
 
/** Type definition of the internet control message header.
* @see icmp_header
*/
typedef struct icmp_header icmp_header_t;
 
/** Type definition of the user datagram header pointer.
/** Type definition of the internet control message header pointer.
* @see icmp_header
*/
typedef icmp_header_t * icmp_header_ref;
 
/** User datagram header.
/** Internet control message header.
*/
struct icmp_header{
/** Specifies the type of the message.
67,21 → 88,34
* If the checksum does not match the contents, the datagram is discarded.
*/
uint16_t checksum;
/** \todo
/** Message specific data.
*/
union{
struct{
icmp_param_t id;
icmp_param_t sequence;
} echo;
/** Echo specific data.
*/
icmp_echo_t echo;
/** Proposed gateway value.
*/
in_addr_t gateway;
/** Fragmentation needed specific data.
*/
struct{
icmp_param_t unused;
/** Unused field.
*/
icmp_param_t _unused;
/** Proposed MTU.
*/
icmp_param_t mtu;
} frag;
/** Parameter problem specific data.
*/
struct{
/** Problem pointer.
*/
icmp_param_t pointer;
icmp_param_t unused;
/** Unused field.
*/
icmp_param_t _unused;
} param;
} un;
} __attribute__ ((packed));