Subversion Repositories HelenOS

Rev

Rev 4707 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4707 Rev 4715
Line 38... Line 38...
38
#ifndef __NET_ICMP_MESSAGES__
38
#ifndef __NET_ICMP_MESSAGES__
39
#define __NET_ICMP_MESSAGES__
39
#define __NET_ICMP_MESSAGES__
40
 
40
 
41
#include <ipc/ipc.h>
41
#include <ipc/ipc.h>
42
 
42
 
-
 
43
#include <sys/types.h>
-
 
44
 
-
 
45
#include "../../include/icmp_codes.h"
-
 
46
 
43
#include "../../messages.h"
47
#include "../../messages.h"
44
 
48
 
45
/** ICMP module messages.
49
/** ICMP module messages.
46
 */
50
 */
47
typedef enum{
51
typedef enum{
Line 67... Line 71...
67
    NET_ICMP_TIME_EXCEEDED,
71
    NET_ICMP_TIME_EXCEEDED,
68
    /** Sends parameter problem error message.
72
    /** Sends parameter problem error message.
69
     *  @see icmp_parameter_problem_msg()
73
     *  @see icmp_parameter_problem_msg()
70
     */
74
     */
71
    NET_ICMP_PARAMETERPROB,
75
    NET_ICMP_PARAMETERPROB,
-
 
76
    /** Initializes new connection.
-
 
77
     */
-
 
78
    NET_ICMP_INIT
72
} icmp_messages;
79
} icmp_messages;
73
 
80
 
74
/** @name ICMP specific message parameters definitions
81
/** @name ICMP specific message parameters definitions
75
 */
82
 */
76
/*@{*/
83
/*@{*/
77
 
84
 
78
/** Returns the ICMP code message parameter.
85
/** Returns the ICMP code message parameter.
79
 *  @param call The message call structure. Input parameter.
86
 *  @param call The message call structure. Input parameter.
80
 */
87
 */
81
#define ICMP_GET_CODE( call )       ( uint8_t ) IPC_GET_ARG1( * call )
88
#define ICMP_GET_CODE( call )       ( icmp_param_t ) IPC_GET_ARG1( call )
82
 
89
 
83
/** Returns the echo identifier message parameter.
90
/** Returns the ICMP link MTU message parameter.
84
 *  @param call The message call structure. Input parameter.
91
 *  @param call The message call structure. Input parameter.
85
 */
92
 */
86
#define ICMP_GET_IDENTIFIER( call )     ( uint8_t ) IPC_GET_ARG1( * call )
93
#define ICMP_GET_MTU( call )        ( icmp_param_t ) IPC_GET_ARG3( call )
87
 
94
 
88
/** Returns the echo sequence number message parameter.
95
/** Returns the pointer message parameter.
89
 *  @param call The message call structure. Input parameter.
96
 *  @param call The message call structure. Input parameter.
90
 */
97
 */
91
#define ICMP_GET_SEQUENCE( call )       ( uint8_t ) IPC_GET_ARG2( * call )
98
#define ICMP_GET_POINTER( call )        ( icmp_param_t ) IPC_GET_ARG3( call )
92
 
99
 
93
/** Returns the ICMP link MTU message parameter.
100
/** Returns the size message parameter.
94
 *  @param call The message call structure. Input parameter.
101
 *  @param call The message call structure. Input parameter.
95
 */
102
 */
96
#define ICMP_GET_MTU( call )        ( uint16_t ) IPC_GET_ARG3( * call )
103
#define ICMP_GET_SIZE( call )   ( size_t ) IPC_GET_ARG1( call )
97
 
104
 
98
/** Returns the pointer message parameter.
105
/** Returns the timeout message parameter.
-
 
106
 *  @param call The message call structure. Input parameter.
-
 
107
 */
-
 
108
#define ICMP_GET_TIMEOUT( call )    ((( suseconds_t ) IPC_GET_ARG2( call )) * 1000 )
-
 
109
 
-
 
110
/** Returns the time to live message parameter.
-
 
111
 *  @param call The message call structure. Input parameter.
-
 
112
 */
-
 
113
#define ICMP_GET_TTL( call )    ( ip_ttl_t ) IPC_GET_ARG3( call )
-
 
114
 
-
 
115
/** Returns the type of service message parameter.
-
 
116
 *  @param call The message call structure. Input parameter.
-
 
117
 */
-
 
118
#define ICMP_GET_TOS( call )    ( ip_tos_t ) IPC_GET_ARG4( call )
-
 
119
 
-
 
120
/** Returns the dont fragment message parameter.
99
 *  @param call The message call structure. Input parameter.
121
 *  @param call The message call structure. Input parameter.
100
 */
122
 */
101
#define ICMP_GET_POINTER( call )        ( uint16_t ) IPC_GET_ARG3( * call )
123
#define ICMP_GET_DONT_FRAGMENT( call )      ( int ) IPC_GET_ARG5( call )
102
 
124
 
103
/*@}*/
125
/*@}*/
104
 
126
 
105
#endif
127
#endif
106
 
128