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