Changes in uspace/lib/c/include/ipc/ip.h [774e6d1a:96b02eb9] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/ipc/ip.h
r774e6d1a r96b02eb9 51 51 */ 52 52 NET_IP_ADD_ROUTE = NET_IP_FIRST, 53 54 53 /** Gets the actual route information. 55 54 * @see ip_get_route() 56 55 */ 57 56 NET_IP_GET_ROUTE, 58 59 57 /** Processes the received error notification. 60 58 * @see ip_received_error_msg() 61 59 */ 62 60 NET_IP_RECEIVED_ERROR, 63 64 61 /** Sets the default gateway. 65 62 * @see ip_set_default_gateway() … … 71 68 /*@{*/ 72 69 73 /** Return the address message parameter. 74 * 75 * @param[in] call Message call structure. 76 * 70 /** Returns the address message parameter. 71 * @param[in] call The message call structure. 77 72 */ 78 73 #define IP_GET_ADDRESS(call) \ 79 74 ({ \ 80 75 in_addr_t addr; \ 81 addr.s_addr = IPC_GET_ARG3( call); \76 addr.s_addr = IPC_GET_ARG3(*call); \ 82 77 addr; \ 83 78 }) 84 79 85 /** Return the gateway message parameter. 86 * 87 * @param[in] call Message call structure. 88 * 80 /** Returns the gateway message parameter. 81 * @param[in] call The message call structure. 89 82 */ 90 83 #define IP_GET_GATEWAY(call) \ 91 84 ({ \ 92 85 in_addr_t addr; \ 93 addr.s_addr = IPC_GET_ARG2( call); \86 addr.s_addr = IPC_GET_ARG2(*call); \ 94 87 addr; \ 95 88 }) 96 89 97 /** Set the header length in the message answer. 98 * 99 * @param[out] answer Message answer structure. 100 * 90 /** Sets the header length in the message answer. 91 * @param[out] answer The message answer structure. 101 92 */ 102 #define IP_SET_HEADERLEN(answer, value) IPC_SET_ARG2(answer, (sysarg_t) (value)) 93 #define IP_SET_HEADERLEN(answer, value) \ 94 do { \ 95 sysarg_t argument = (sysarg_t) (value); \ 96 IPC_SET_ARG2(*answer, argument); \ 97 } while (0) 103 98 104 /** Return the network mask message parameter. 105 * 106 * @param[in] call Message call structure. 107 * 99 /** Returns the network mask message parameter. 100 * @param[in] call The message call structure. 108 101 */ 109 102 #define IP_GET_NETMASK(call) \ 110 103 ({ \ 111 104 in_addr_t addr; \ 112 addr.s_addr = IPC_GET_ARG4( call); \105 addr.s_addr = IPC_GET_ARG4(*call); \ 113 106 addr; \ 114 107 }) 115 108 116 /** Return the protocol message parameter. 117 * 118 * @param[in] call Message call structure. 119 * 109 /** Returns the protocol message parameter. 110 * @param[in] call The message call structure. 120 111 */ 121 #define IP_GET_PROTOCOL(call) ((ip_protocol_t) IPC_GET_ARG1(call)) 112 #define IP_GET_PROTOCOL(call) \ 113 ({ \ 114 ip_protocol_t protocol = (ip_protocol_t) IPC_GET_ARG1(*call); \ 115 protocol; \ 116 }) 122 117 123 118 /*@}*/
Note:
See TracChangeset
for help on using the changeset viewer.