Changeset e417b96 in mainline for uspace/srv/net/tl/icmp/icmp_messages.h
- Timestamp:
- 2010-03-23T22:58:44Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5814ef7
- Parents:
- 76ca3f7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/tl/icmp/icmp_messages.h
r76ca3f7 re417b96 82 82 * @param[in] call The message call structure. 83 83 */ 84 #define ICMP_GET_CODE(call) (icmp_code_t) IPC_GET_ARG1(*call) 84 #define ICMP_GET_CODE(call) \ 85 ({icmp_code_t code = (icmp_code_t) IPC_GET_ARG1(*call); code;}) 85 86 86 87 /** Returns the ICMP link MTU message parameter. 87 88 * @param[in] call The message call structure. 88 89 */ 89 #define ICMP_GET_MTU(call) (icmp_param_t) IPC_GET_ARG3(*call) 90 #define ICMP_GET_MTU(call) \ 91 ({icmp_param_t mtu = (icmp_param_t) IPC_GET_ARG3(*call); mtu;}) 90 92 91 93 /** Returns the pointer message parameter. 92 94 * @param[in] call The message call structure. 93 95 */ 94 #define ICMP_GET_POINTER(call) (icmp_param_t) IPC_GET_ARG3(*call) 96 #define ICMP_GET_POINTER(call) \ 97 ({icmp_param_t pointer = (icmp_param_t) IPC_GET_ARG3(*call); pointer;}) 95 98 96 99 /** Returns the size message parameter. 97 100 * @param[in] call The message call structure. 98 101 */ 99 #define ICMP_GET_SIZE(call) (size_t) IPC_GET_ARG1(call) 102 #define ICMP_GET_SIZE(call) \ 103 ({size_t size = (size_t) IPC_GET_ARG1(call); size;}) 100 104 101 105 /** Returns the timeout message parameter. 102 106 * @param[in] call The message call structure. 103 107 */ 104 #define ICMP_GET_TIMEOUT(call) ((suseconds_t) IPC_GET_ARG2(call)) 108 #define ICMP_GET_TIMEOUT(call) \ 109 (({suseconds_t timeout = (suseconds_t) IPC_GET_ARG2(call); timeout;})) 105 110 106 111 /** Returns the time to live message parameter. 107 112 * @param[in] call The message call structure. 108 113 */ 109 #define ICMP_GET_TTL(call) (ip_ttl_t) IPC_GET_ARG3(call) 114 #define ICMP_GET_TTL(call) \ 115 ({ip_ttl_t ttl = (ip_ttl_t) IPC_GET_ARG3(call); ttl;}) 110 116 111 117 /** Returns the type of service message parameter. 112 118 * @param[in] call The message call structure. 113 119 */ 114 #define ICMP_GET_TOS(call) (ip_tos_t) IPC_GET_ARG4(call) 120 #define ICMP_GET_TOS(call) \ 121 ({ip_tos_t tos = (ip_tos_t) IPC_GET_ARG4(call); tos;}) 115 122 116 123 /** Returns the dont fragment message parameter. 117 124 * @param[in] call The message call structure. 118 125 */ 119 #define ICMP_GET_DONT_FRAGMENT(call) (int) IPC_GET_ARG5(call) 126 #define ICMP_GET_DONT_FRAGMENT(call) \ 127 ({int dont_fragment = (int) IPC_GET_ARG5(call); dont_fragment;}) 120 128 121 129 /*@}*/
Note:
See TracChangeset
for help on using the changeset viewer.