Changes in uspace/lib/c/include/ipc/icmp.h [774e6d1a:753bca3] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/ipc/icmp.h
r774e6d1a r753bca3 82 82 /*@{*/ 83 83 84 /** Return the ICMP code message parameter.84 /** Returns the ICMP code message parameter. 85 85 * 86 * @param[in] call Message call structure. 86 * @param[in] call The message call structure. 87 */ 88 #define ICMP_GET_CODE(call) \ 89 ({ \ 90 icmp_code_t code = (icmp_code_t) IPC_GET_ARG1(*call); \ 91 code; \ 92 }) 93 94 /** Returns the ICMP link MTU message parameter. 87 95 * 96 * @param[in] call The message call structure. 88 97 */ 89 #define ICMP_GET_CODE(call) ((icmp_code_t) IPC_GET_ARG1(call)) 98 #define ICMP_GET_MTU(call) \ 99 ({ \ 100 icmp_param_t mtu = (icmp_param_t) IPC_GET_ARG3(*call); \ 101 mtu; \ 102 }) 90 103 91 /** Return the ICMP link MTUmessage parameter.104 /** Returns the pointer message parameter. 92 105 * 93 * @param[in] call Message call structure. 106 * @param[in] call The message call structure. 107 */ 108 #define ICMP_GET_POINTER(call) \ 109 ({ \ 110 icmp_param_t pointer = (icmp_param_t) IPC_GET_ARG3(*call); \ 111 pointer; \ 112 }) 113 114 /** Returns the size message parameter. 94 115 * 116 * @param[in] call The message call structure. 95 117 */ 96 #define ICMP_GET_MTU(call) ((icmp_param_t) IPC_GET_ARG3(call)) 118 #define ICMP_GET_SIZE(call) \ 119 ({ \ 120 size_t size = (size_t) IPC_GET_ARG1(call); \ 121 size; \ 122 }) 97 123 98 /** Return the pointermessage parameter.124 /** Returns the timeout message parameter. 99 125 * 100 * @param[in] call Message call structure. 126 * @param[in] call The message call structure. 127 */ 128 #define ICMP_GET_TIMEOUT(call) \ 129 ({ \ 130 suseconds_t timeout = (suseconds_t) IPC_GET_ARG2(call); \ 131 timeout; \ 132 }) 133 134 /** Returns the time to live message parameter. 101 135 * 136 * @param[in] call The message call structure. 102 137 */ 103 #define ICMP_GET_POINTER(call) ((icmp_param_t) IPC_GET_ARG3(call)) 138 #define ICMP_GET_TTL(call) \ 139 ({ \ 140 ip_ttl_t ttl = (ip_ttl_t) IPC_GET_ARG3(call); \ 141 ttl; \ 142 }) 104 143 105 /** Return the size message parameter.144 /** Returns the type of service message parameter. 106 145 * 107 * @param[in] call Message call structure. 146 * @param[in] call The message call structure. 147 */ 148 #define ICMP_GET_TOS(call) \ 149 ({ \ 150 ip_tos_t tos = (ip_tos_t) IPC_GET_ARG4(call); \ 151 tos; \ 152 }) 153 154 /** Returns the dont fragment message parameter. 108 155 * 156 * @param[in] call The message call structure. 109 157 */ 110 #define ICMP_GET_SIZE(call) ((size_t) IPC_GET_ARG1(call)) 111 112 /** Return the timeout message parameter. 113 * 114 * @param[in] call Message call structure. 115 * 116 */ 117 #define ICMP_GET_TIMEOUT(call) ((suseconds_t) IPC_GET_ARG2(call)) 118 119 /** Return the time to live message parameter. 120 * 121 * @param[in] call Message call structure. 122 * 123 */ 124 #define ICMP_GET_TTL(call) ((ip_ttl_t) IPC_GET_ARG3(call)) 125 126 /** Return the type of service message parameter. 127 * 128 * @param[in] call Message call structure. 129 * 130 */ 131 #define ICMP_GET_TOS(call) ((ip_tos_t) IPC_GET_ARG4(call)) 132 133 /** Return the dont fragment message parameter. 134 * 135 * @param[in] call Message call structure. 136 */ 137 #define ICMP_GET_DONT_FRAGMENT(call) ((int) IPC_GET_ARG5(call)) 158 #define ICMP_GET_DONT_FRAGMENT(call) \ 159 ({ \ 160 int dont_fragment = (int) IPC_GET_ARG5(call); \ 161 dont_fragment; \ 162 }) 138 163 139 164 /*@}*/
Note:
See TracChangeset
for help on using the changeset viewer.