Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 4714 → Rev 4715

/branches/network/uspace/srv/net/il/icmp/icmp_messages.h
40,6 → 40,10
 
#include <ipc/ipc.h>
 
#include <sys/types.h>
 
#include "../../include/icmp_codes.h"
 
#include "../../messages.h"
 
/** ICMP module messages.
69,6 → 73,9
* @see icmp_parameter_problem_msg()
*/
NET_ICMP_PARAMETERPROB,
/** Initializes new connection.
*/
NET_ICMP_INIT
} icmp_messages;
 
/** @name ICMP specific message parameters definitions
78,28 → 85,43
/** Returns the ICMP code message parameter.
* @param call The message call structure. Input parameter.
*/
#define ICMP_GET_CODE( call ) ( uint8_t ) IPC_GET_ARG1( * call )
#define ICMP_GET_CODE( call ) ( icmp_param_t ) IPC_GET_ARG1( call )
 
/** Returns the echo identifier message parameter.
/** Returns the ICMP link MTU message parameter.
* @param call The message call structure. Input parameter.
*/
#define ICMP_GET_IDENTIFIER( call ) ( uint8_t ) IPC_GET_ARG1( * call )
#define ICMP_GET_MTU( call ) ( icmp_param_t ) IPC_GET_ARG3( call )
 
/** Returns the echo sequence number message parameter.
/** Returns the pointer message parameter.
* @param call The message call structure. Input parameter.
*/
#define ICMP_GET_SEQUENCE( call ) ( uint8_t ) IPC_GET_ARG2( * call )
#define ICMP_GET_POINTER( call ) ( icmp_param_t ) IPC_GET_ARG3( call )
 
/** Returns the ICMP link MTU message parameter.
/** Returns the size message parameter.
* @param call The message call structure. Input parameter.
*/
#define ICMP_GET_MTU( call ) ( uint16_t ) IPC_GET_ARG3( * call )
#define ICMP_GET_SIZE( call ) ( size_t ) IPC_GET_ARG1( call )
 
/** Returns the pointer message parameter.
/** Returns the timeout message parameter.
* @param call The message call structure. Input parameter.
*/
#define ICMP_GET_POINTER( call ) ( uint16_t ) IPC_GET_ARG3( * call )
#define ICMP_GET_TIMEOUT( call ) ((( suseconds_t ) IPC_GET_ARG2( call )) * 1000 )
 
/** Returns the time to live message parameter.
* @param call The message call structure. Input parameter.
*/
#define ICMP_GET_TTL( call ) ( ip_ttl_t ) IPC_GET_ARG3( call )
 
/** Returns the type of service message parameter.
* @param call The message call structure. Input parameter.
*/
#define ICMP_GET_TOS( call ) ( ip_tos_t ) IPC_GET_ARG4( call )
 
/** Returns the dont fragment message parameter.
* @param call The message call structure. Input parameter.
*/
#define ICMP_GET_DONT_FRAGMENT( call ) ( int ) IPC_GET_ARG5( call )
 
/*@}*/
 
#endif