Changes in uspace/srv/net/socket/socket_messages.h [3db8889:6092b56e] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/socket/socket_messages.h
r3db8889 r6092b56e 115 115 * @param[out] answer The message answer structure. 116 116 */ 117 #define SOCKET_SET_SOCKET_ID(answer, value) \ 118 {ipcarg_t argument = (ipcarg_t) (value); IPC_SET_ARG1(answer, argument);} 117 #define SOCKET_SET_SOCKET_ID(answer) &IPC_GET_ARG1(answer) 119 118 120 119 /** Returns the socket identifier message parameter. 121 120 * @param[in] call The message call structure. 122 121 */ 123 #define SOCKET_GET_SOCKET_ID(call) \ 124 ({int socket_id = (int) IPC_GET_ARG1(call); socket_id;}) 122 #define SOCKET_GET_SOCKET_ID(call) (int) IPC_GET_ARG1(call) 125 123 126 124 /** Sets the read data length in the message answer. 127 125 * @param[out] answer The message answer structure. 128 126 */ 129 #define SOCKET_SET_READ_DATA_LENGTH(answer, value) \ 130 {ipcarg_t argument = (ipcarg_t) (value); IPC_SET_ARG1(answer, argument);} 127 #define SOCKET_SET_READ_DATA_LENGTH(answer) &IPC_GET_ARG1(answer) 131 128 132 129 /** Returns the read data length message parameter. 133 130 * @param[in] call The message call structure. 134 131 */ 135 #define SOCKET_GET_READ_DATA_LENGTH(call) \ 136 ({int data_length = (int) IPC_GET_ARG1(call); data_length;}) 132 #define SOCKET_GET_READ_DATA_LENGTH(call) (int) IPC_GET_ARG1(call) 137 133 138 134 /** Returns the backlog message parameter. 139 135 * @param[in] call The message call structure. 140 136 */ 141 #define SOCKET_GET_BACKLOG(call) \ 142 ({int backlog = (int) IPC_GET_ARG2(call); backlog;}) 137 #define SOCKET_GET_BACKLOG(call) (int) IPC_GET_ARG2(call) 143 138 144 139 /** Returns the option level message parameter. 145 140 * @param[in] call The message call structure. 146 141 */ 147 #define SOCKET_GET_OPT_LEVEL(call) \ 148 ({int opt_level = (int) IPC_GET_ARG2(call); opt_level;}) 142 #define SOCKET_GET_OPT_LEVEL(call) (int) IPC_GET_ARG2(call) 149 143 150 144 /** Returns the data fragment size message parameter. 151 145 * @param[in] call The message call structure. 152 146 */ 153 #define SOCKET_GET_DATA_FRAGMENT_SIZE(call) \ 154 ({size_t size = (size_t) IPC_GET_ARG2(call); size;}) 147 #define SOCKET_GET_DATA_FRAGMENT_SIZE(call) (size_t) IPC_GET_ARG2(call) 155 148 156 149 /** Sets the data fragment size in the message answer. 157 150 * @param[out] answer The message answer structure. 158 151 */ 159 #define SOCKET_SET_DATA_FRAGMENT_SIZE(answer, value) \ 160 {ipcarg_t argument = (ipcarg_t) (value); IPC_SET_ARG2(answer, argument);} 152 #define SOCKET_SET_DATA_FRAGMENT_SIZE(answer) &IPC_GET_ARG2(answer) 161 153 162 154 /** Sets the address length in the message answer. 163 155 * @param[out] answer The message answer structure. 164 156 */ 165 #define SOCKET_SET_ADDRESS_LENGTH(answer, value) \ 166 {ipcarg_t argument = (ipcarg_t) (value); IPC_SET_ARG3(answer, argument);} 157 #define SOCKET_SET_ADDRESS_LENGTH(answer) &IPC_GET_ARG3(answer) 167 158 168 159 /** Returns the address length message parameter. 169 160 * @param[in] call The message call structure. 170 161 */ 171 #define SOCKET_GET_ADDRESS_LENGTH(call) \ 172 ({socklen_t address_length = (socklen_t) IPC_GET_ARG3(call); address_length;}) 162 #define SOCKET_GET_ADDRESS_LENGTH(call) (socklen_t) IPC_GET_ARG3(call) 173 163 174 164 /** Sets the header size in the message answer. 175 165 * @param[out] answer The message answer structure. 176 166 */ 177 #define SOCKET_SET_HEADER_SIZE(answer, value) \ 178 \ 179 {ipcarg_t argument = (ipcarg_t) (value); IPC_SET_ARG3(answer, argument);} 167 #define SOCKET_SET_HEADER_SIZE(answer) &IPC_GET_ARG3(answer) 180 168 181 169 /** Returns the header size message parameter. 182 170 * @param[in] call The message call structure. 183 171 */ 184 #define SOCKET_GET_HEADER_SIZE(call) \ 185 ({size_t size = (size_t) IPC_GET_ARG3(call); size;}) 172 #define SOCKET_GET_HEADER_SIZE(call) (size_t) IPC_GET_ARG3(call) 186 173 187 174 /** Returns the flags message parameter. 188 175 * @param[in] call The message call structure. 189 176 */ 190 #define SOCKET_GET_FLAGS(call) \ 191 ({int flags = (int) IPC_GET_ARG4(call); flags;}) 177 #define SOCKET_GET_FLAGS(call) (int) IPC_GET_ARG4(call) 192 178 193 179 /** Returns the option name message parameter. 194 180 * @param[in] call The message call structure. 195 181 */ 196 #define SOCKET_GET_OPT_NAME(call) \ 197 ({int opt_name = (int) IPC_GET_ARG4(call); opt_name;}) 182 #define SOCKET_GET_OPT_NAME(call) (int) IPC_GET_ARG4(call) 198 183 199 184 /** Returns the data fragments message parameter. 200 185 * @param[in] call The message call structure. 201 186 */ 202 #define SOCKET_GET_DATA_FRAGMENTS(call) \ 203 ({int fragments = (int) IPC_GET_ARG5(call); fragments;}) 187 #define SOCKET_GET_DATA_FRAGMENTS(call) (int) IPC_GET_ARG5(call) 204 188 205 189 /** Returns the new socket identifier message parameter. 206 190 * @param[in] call The message call structure. 207 191 */ 208 #define SOCKET_GET_NEW_SOCKET_ID(call) \ 209 ({int socket_id = (int) IPC_GET_ARG5(call); socket_id;}) 192 #define SOCKET_GET_NEW_SOCKET_ID(call) (int) IPC_GET_ARG5(call) 210 193 211 194 /*@}*/
Note:
See TracChangeset
for help on using the changeset viewer.