Changes in uspace/lib/c/include/ipc/icmp.h [753bca3:64d2b10] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/ipc/icmp.h
r753bca3 r64d2b10 33 33 /** @file 34 34 * ICMP module messages. 35 * @see icmp_ interface.h35 * @see icmp_remote.h 36 36 */ 37 37 … … 39 39 #define LIBC_ICMP_MESSAGES_ 40 40 41 #include <ipc/ipc.h>42 41 #include <ipc/net.h> 43 42 #include <sys/types.h> 44 43 #include <sys/time.h> 45 46 44 #include <net/icmp_codes.h> 47 45 48 46 /** ICMP module messages. */ 49 47 typedef enum { 50 /** Send secho request. @see icmp_echo() */48 /** Send echo request. @see icmp_echo() */ 51 49 NET_ICMP_ECHO = NET_ICMP_FIRST, 52 50 53 51 /** 54 * Send sdestination unreachable error message.52 * Send destination unreachable error message. 55 53 * @see icmp_destination_unreachable_msg() 56 54 */ … … 58 56 59 57 /** 60 * Send ssource quench error message.58 * Send source quench error message. 61 59 * @see icmp_source_quench_msg() 62 60 */ … … 64 62 65 63 /** 66 * Send stime exceeded error message.64 * Send time exceeded error message. 67 65 * @see icmp_time_exceeded_msg() 68 66 */ … … 70 68 71 69 /** 72 * Send sparameter problem error message.70 * Send parameter problem error message. 73 71 * @see icmp_parameter_problem_msg() 74 72 */ 75 NET_ICMP_PARAMETERPROB, 76 77 /** Initializes new connection. */ 78 NET_ICMP_INIT 79 } icmp_messages; 73 NET_ICMP_PARAMETERPROB 74 } icmp_messages_t; 80 75 81 76 /** @name ICMP specific message parameters definitions */ 82 77 /*@{*/ 83 78 84 /** Return sthe ICMP code message parameter.79 /** Return the ICMP code message parameter. 85 80 * 86 * @param[in] call The message call structure. 81 * @param[in] call Message call structure. 82 * 87 83 */ 88 #define ICMP_GET_CODE(call) \ 89 ({ \ 90 icmp_code_t code = (icmp_code_t) IPC_GET_ARG1(*call); \ 91 code; \ 92 }) 84 #define ICMP_GET_CODE(call) ((icmp_code_t) IPC_GET_ARG1(call)) 93 85 94 /** Return sthe ICMP link MTU message parameter.86 /** Return the ICMP link MTU message parameter. 95 87 * 96 * @param[in] call The message call structure. 88 * @param[in] call Message call structure. 89 * 97 90 */ 98 #define ICMP_GET_MTU(call) \ 99 ({ \ 100 icmp_param_t mtu = (icmp_param_t) IPC_GET_ARG3(*call); \ 101 mtu; \ 102 }) 91 #define ICMP_GET_MTU(call) ((icmp_param_t) IPC_GET_ARG3(call)) 103 92 104 /** Return sthe pointer message parameter.93 /** Return the pointer message parameter. 105 94 * 106 * @param[in] call The message call structure. 95 * @param[in] call Message call structure. 96 * 107 97 */ 108 #define ICMP_GET_POINTER(call) \ 109 ({ \ 110 icmp_param_t pointer = (icmp_param_t) IPC_GET_ARG3(*call); \ 111 pointer; \ 112 }) 98 #define ICMP_GET_POINTER(call) ((icmp_param_t) IPC_GET_ARG3(call)) 113 99 114 /** Return sthe size message parameter.100 /** Return the size message parameter. 115 101 * 116 * @param[in] call The message call structure. 102 * @param[in] call Message call structure. 103 * 117 104 */ 118 #define ICMP_GET_SIZE(call) \ 119 ({ \ 120 size_t size = (size_t) IPC_GET_ARG1(call); \ 121 size; \ 122 }) 105 #define ICMP_GET_SIZE(call) ((size_t) IPC_GET_ARG1(call)) 123 106 124 /** Return sthe timeout message parameter.107 /** Return the timeout message parameter. 125 108 * 126 * @param[in] call The message call structure. 109 * @param[in] call Message call structure. 110 * 127 111 */ 128 #define ICMP_GET_TIMEOUT(call) \ 129 ({ \ 130 suseconds_t timeout = (suseconds_t) IPC_GET_ARG2(call); \ 131 timeout; \ 132 }) 112 #define ICMP_GET_TIMEOUT(call) ((suseconds_t) IPC_GET_ARG2(call)) 133 113 134 /** Return sthe time to live message parameter.114 /** Return the time to live message parameter. 135 115 * 136 * @param[in] call The message call structure. 116 * @param[in] call Message call structure. 117 * 137 118 */ 138 #define ICMP_GET_TTL(call) \ 139 ({ \ 140 ip_ttl_t ttl = (ip_ttl_t) IPC_GET_ARG3(call); \ 141 ttl; \ 142 }) 119 #define ICMP_GET_TTL(call) ((ip_ttl_t) IPC_GET_ARG3(call)) 143 120 144 /** Return sthe type of service message parameter.121 /** Return the type of service message parameter. 145 122 * 146 * @param[in] call The message call structure. 123 * @param[in] call Message call structure. 124 * 147 125 */ 148 #define ICMP_GET_TOS(call) \ 149 ({ \ 150 ip_tos_t tos = (ip_tos_t) IPC_GET_ARG4(call); \ 151 tos; \ 152 }) 126 #define ICMP_GET_TOS(call) ((ip_tos_t) IPC_GET_ARG4(call)) 153 127 154 /** Return sthe dont fragment message parameter.128 /** Return the dont fragment message parameter. 155 129 * 156 * @param[in] call The message call structure.130 * @param[in] call Message call structure. 157 131 */ 158 #define ICMP_GET_DONT_FRAGMENT(call) \ 159 ({ \ 160 int dont_fragment = (int) IPC_GET_ARG5(call); \ 161 dont_fragment; \ 162 }) 132 #define ICMP_GET_DONT_FRAGMENT(call) ((int) IPC_GET_ARG5(call)) 163 133 164 134 /*@}*/
Note:
See TracChangeset
for help on using the changeset viewer.