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