Changes in uspace/lib/c/include/ipc/ip.h [797b704:96b02eb9] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/ipc/ip.h
r797b704 r96b02eb9 47 47 /** IP module messages. */ 48 48 typedef enum { 49 /** New device message.50 * @see ip_device_req()51 */52 NET_IP_DEVICE = NET_IP_FIRST,53 54 49 /** Adds the routing entry. 55 50 * @see ip_add_route() 56 51 */ 57 NET_IP_ADD_ROUTE, 58 52 NET_IP_ADD_ROUTE = NET_IP_FIRST, 59 53 /** Gets the actual route information. 60 54 * @see ip_get_route() 61 55 */ 62 56 NET_IP_GET_ROUTE, 63 64 57 /** Processes the received error notification. 65 58 * @see ip_received_error_msg() 66 59 */ 67 60 NET_IP_RECEIVED_ERROR, 68 69 61 /** Sets the default gateway. 70 62 * @see ip_set_default_gateway() 71 63 */ 72 NET_IP_SET_GATEWAY, 73 74 /** Packet size message. 75 * @see ip_packet_size_req() 76 */ 77 NET_IP_PACKET_SPACE, 78 79 /** Packet send message. 80 * @see ip_send_msg() 81 */ 82 NET_IP_SEND 64 NET_IP_SET_GATEWAY 83 65 } ip_messages; 84 66 … … 86 68 /*@{*/ 87 69 88 /** Return the address message parameter. 89 * 90 * @param[in] call Message call structure. 91 * 70 /** Returns the address message parameter. 71 * @param[in] call The message call structure. 92 72 */ 93 73 #define IP_GET_ADDRESS(call) \ 94 74 ({ \ 95 75 in_addr_t addr; \ 96 addr.s_addr = IPC_GET_ARG3( call); \76 addr.s_addr = IPC_GET_ARG3(*call); \ 97 77 addr; \ 98 78 }) 99 79 100 /** Return the gateway message parameter. 101 * 102 * @param[in] call Message call structure. 103 * 80 /** Returns the gateway message parameter. 81 * @param[in] call The message call structure. 104 82 */ 105 83 #define IP_GET_GATEWAY(call) \ 106 84 ({ \ 107 85 in_addr_t addr; \ 108 addr.s_addr = IPC_GET_ARG2( call); \86 addr.s_addr = IPC_GET_ARG2(*call); \ 109 87 addr; \ 110 88 }) 111 89 112 /** Set the header length in the message answer. 113 * 114 * @param[out] answer Message answer structure. 115 * 90 /** Sets the header length in the message answer. 91 * @param[out] answer The message answer structure. 116 92 */ 117 #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) 118 98 119 /** Return the network mask message parameter. 120 * 121 * @param[in] call Message call structure. 122 * 99 /** Returns the network mask message parameter. 100 * @param[in] call The message call structure. 123 101 */ 124 102 #define IP_GET_NETMASK(call) \ 125 103 ({ \ 126 104 in_addr_t addr; \ 127 addr.s_addr = IPC_GET_ARG4( call); \105 addr.s_addr = IPC_GET_ARG4(*call); \ 128 106 addr; \ 129 107 }) 130 108 131 /** Return the protocol message parameter. 132 * 133 * @param[in] call Message call structure. 134 * 109 /** Returns the protocol message parameter. 110 * @param[in] call The message call structure. 135 111 */ 136 #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 }) 137 117 138 118 /*@}*/
Note:
See TracChangeset
for help on using the changeset viewer.