Changeset 357b5f5 in mainline for uspace/lib/c/include/ipc/icmp.h
- Timestamp:
- 2011-01-23T20:09:13Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- fdb9982c
- Parents:
- cead2aa (diff), 7e36c8d (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/icmp.h
rcead2aa r357b5f5 33 33 /** @file 34 34 * ICMP module messages. 35 * @see icmp_ interface.h35 * @see icmp_remote.h 36 36 */ 37 37 … … 48 48 /** ICMP module messages. */ 49 49 typedef enum { 50 /** Send secho request. @see icmp_echo() */50 /** Send echo request. @see icmp_echo() */ 51 51 NET_ICMP_ECHO = NET_ICMP_FIRST, 52 52 53 53 /** 54 * Send sdestination unreachable error message.54 * Send destination unreachable error message. 55 55 * @see icmp_destination_unreachable_msg() 56 56 */ … … 58 58 59 59 /** 60 * Send ssource quench error message.60 * Send source quench error message. 61 61 * @see icmp_source_quench_msg() 62 62 */ … … 64 64 65 65 /** 66 * Send stime exceeded error message.66 * Send time exceeded error message. 67 67 * @see icmp_time_exceeded_msg() 68 68 */ … … 70 70 71 71 /** 72 * Send sparameter problem error message.72 * Send parameter problem error message. 73 73 * @see icmp_parameter_problem_msg() 74 74 */ 75 NET_ICMP_PARAMETERPROB, 76 77 /** Initializes new connection. */ 78 NET_ICMP_INIT 79 } icmp_messages; 75 NET_ICMP_PARAMETERPROB 76 } icmp_messages_t; 80 77 81 78 /** @name ICMP specific message parameters definitions */ 82 79 /*@{*/ 83 80 84 /** Return sthe ICMP code message parameter.81 /** Return the ICMP code message parameter. 85 82 * 86 * @param[in] call The message call structure. 83 * @param[in] call Message call structure. 84 * 87 85 */ 88 #define ICMP_GET_CODE(call) \ 89 ({ \ 90 icmp_code_t code = (icmp_code_t) IPC_GET_ARG1(*call); \ 91 code; \ 92 }) 86 #define ICMP_GET_CODE(call) ((icmp_code_t) IPC_GET_ARG1(call)) 93 87 94 /** Return sthe ICMP link MTU message parameter.88 /** Return the ICMP link MTU message parameter. 95 89 * 96 * @param[in] call The message call structure. 90 * @param[in] call Message call structure. 91 * 97 92 */ 98 #define ICMP_GET_MTU(call) \ 99 ({ \ 100 icmp_param_t mtu = (icmp_param_t) IPC_GET_ARG3(*call); \ 101 mtu; \ 102 }) 93 #define ICMP_GET_MTU(call) ((icmp_param_t) IPC_GET_ARG3(call)) 103 94 104 /** Return sthe pointer message parameter.95 /** Return the pointer message parameter. 105 96 * 106 * @param[in] call The message call structure. 97 * @param[in] call Message call structure. 98 * 107 99 */ 108 #define ICMP_GET_POINTER(call) \ 109 ({ \ 110 icmp_param_t pointer = (icmp_param_t) IPC_GET_ARG3(*call); \ 111 pointer; \ 112 }) 100 #define ICMP_GET_POINTER(call) ((icmp_param_t) IPC_GET_ARG3(call)) 113 101 114 /** Return sthe size message parameter.102 /** Return the size message parameter. 115 103 * 116 * @param[in] call The message call structure. 104 * @param[in] call Message call structure. 105 * 117 106 */ 118 #define ICMP_GET_SIZE(call) \ 119 ({ \ 120 size_t size = (size_t) IPC_GET_ARG1(call); \ 121 size; \ 122 }) 107 #define ICMP_GET_SIZE(call) ((size_t) IPC_GET_ARG1(call)) 123 108 124 /** Return sthe timeout message parameter.109 /** Return the timeout message parameter. 125 110 * 126 * @param[in] call The message call structure. 111 * @param[in] call Message call structure. 112 * 127 113 */ 128 #define ICMP_GET_TIMEOUT(call) \ 129 ({ \ 130 suseconds_t timeout = (suseconds_t) IPC_GET_ARG2(call); \ 131 timeout; \ 132 }) 114 #define ICMP_GET_TIMEOUT(call) ((suseconds_t) IPC_GET_ARG2(call)) 133 115 134 /** Return sthe time to live message parameter.116 /** Return the time to live message parameter. 135 117 * 136 * @param[in] call The message call structure. 118 * @param[in] call Message call structure. 119 * 137 120 */ 138 #define ICMP_GET_TTL(call) \ 139 ({ \ 140 ip_ttl_t ttl = (ip_ttl_t) IPC_GET_ARG3(call); \ 141 ttl; \ 142 }) 121 #define ICMP_GET_TTL(call) ((ip_ttl_t) IPC_GET_ARG3(call)) 143 122 144 /** Return sthe type of service message parameter.123 /** Return the type of service message parameter. 145 124 * 146 * @param[in] call The message call structure. 125 * @param[in] call Message call structure. 126 * 147 127 */ 148 #define ICMP_GET_TOS(call) \ 149 ({ \ 150 ip_tos_t tos = (ip_tos_t) IPC_GET_ARG4(call); \ 151 tos; \ 152 }) 128 #define ICMP_GET_TOS(call) ((ip_tos_t) IPC_GET_ARG4(call)) 153 129 154 /** Return sthe dont fragment message parameter.130 /** Return the dont fragment message parameter. 155 131 * 156 * @param[in] call The message call structure.132 * @param[in] call Message call structure. 157 133 */ 158 #define ICMP_GET_DONT_FRAGMENT(call) \ 159 ({ \ 160 int dont_fragment = (int) IPC_GET_ARG5(call); \ 161 dont_fragment; \ 162 }) 134 #define ICMP_GET_DONT_FRAGMENT(call) ((int) IPC_GET_ARG5(call)) 163 135 164 136 /*@}*/
Note:
See TracChangeset
for help on using the changeset viewer.