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