Changeset 8b5690f in mainline for uspace/lib/c/include/ipc/ip.h
- Timestamp:
- 2011-02-03T05:11:01Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ba38f72c
- Parents:
- 22027b6e (diff), 86d7bfa (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/ipc/ip.h
r22027b6e r8b5690f 39 39 #define LIBC_IP_MESSAGES_H_ 40 40 41 #include <ipc/ipc.h>42 41 #include <ipc/net.h> 43 44 42 #include <net/in.h> 45 43 #include <net/ip_codes.h> … … 47 45 /** IP module messages. */ 48 46 typedef enum { 47 /** New device message. 48 * @see ip_device_req() 49 */ 50 NET_IP_DEVICE = NET_IP_FIRST, 51 49 52 /** Adds the routing entry. 50 53 * @see ip_add_route() 51 54 */ 52 NET_IP_ADD_ROUTE = NET_IP_FIRST, 55 NET_IP_ADD_ROUTE, 56 53 57 /** Gets the actual route information. 54 58 * @see ip_get_route() 55 59 */ 56 60 NET_IP_GET_ROUTE, 61 57 62 /** Processes the received error notification. 58 63 * @see ip_received_error_msg() 59 64 */ 60 65 NET_IP_RECEIVED_ERROR, 66 61 67 /** Sets the default gateway. 62 68 * @see ip_set_default_gateway() 63 69 */ 64 NET_IP_SET_GATEWAY 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 65 81 } ip_messages; 66 82 … … 68 84 /*@{*/ 69 85 70 /** Returns the address message parameter. 71 * @param[in] call The message call structure. 86 /** Return the address message parameter. 87 * 88 * @param[in] call Message call structure. 89 * 72 90 */ 73 91 #define IP_GET_ADDRESS(call) \ 74 92 ({ \ 75 93 in_addr_t addr; \ 76 addr.s_addr = IPC_GET_ARG3( *call); \94 addr.s_addr = IPC_GET_ARG3(call); \ 77 95 addr; \ 78 96 }) 79 97 80 /** Returns the gateway message parameter. 81 * @param[in] call The message call structure. 98 /** Return the gateway message parameter. 99 * 100 * @param[in] call Message call structure. 101 * 82 102 */ 83 103 #define IP_GET_GATEWAY(call) \ 84 104 ({ \ 85 105 in_addr_t addr; \ 86 addr.s_addr = IPC_GET_ARG2( *call); \106 addr.s_addr = IPC_GET_ARG2(call); \ 87 107 addr; \ 88 108 }) 89 109 90 /** Sets the header length in the message answer. 91 * @param[out] answer The message answer structure. 110 /** Set the header length in the message answer. 111 * 112 * @param[out] answer Message answer structure. 113 * 92 114 */ 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) 115 #define IP_SET_HEADERLEN(answer, value) IPC_SET_ARG2(answer, (sysarg_t) (value)) 98 116 99 /** Returns the network mask message parameter. 100 * @param[in] call The message call structure. 117 /** Return the network mask message parameter. 118 * 119 * @param[in] call Message call structure. 120 * 101 121 */ 102 122 #define IP_GET_NETMASK(call) \ 103 123 ({ \ 104 124 in_addr_t addr; \ 105 addr.s_addr = IPC_GET_ARG4( *call); \125 addr.s_addr = IPC_GET_ARG4(call); \ 106 126 addr; \ 107 127 }) 108 128 109 /** Returns the protocol message parameter. 110 * @param[in] call The message call structure. 129 /** Return the protocol message parameter. 130 * 131 * @param[in] call Message call structure. 132 * 111 133 */ 112 #define IP_GET_PROTOCOL(call) \ 113 ({ \ 114 ip_protocol_t protocol = (ip_protocol_t) IPC_GET_ARG1(*call); \ 115 protocol; \ 116 }) 134 #define IP_GET_PROTOCOL(call) ((ip_protocol_t) IPC_GET_ARG1(call)) 117 135 118 136 /*@}*/
Note:
See TracChangeset
for help on using the changeset viewer.