Changeset 753bca3 in mainline for uspace/lib/c/include/net/icmp_codes.h
- Timestamp:
- 2010-10-13T22:38:16Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 10056483, b2a109d9
- Parents:
- f3b4051
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/net/icmp_codes.h
rf3b4051 r753bca3 27 27 */ 28 28 29 /** @addtogroup icmp29 /** @addtogroup libc 30 30 * @{ 31 31 */ 32 32 33 33 /** @file 34 * ICMP types and codes according to the on-line IANA - ICMP Type Numbers - <http://http://www.iana.org/assignments/icmp-parameters>, cited September 14 2009. 35 */ 36 37 #ifndef __NET_ICMP_CODES_H__ 38 #define __NET_ICMP_CODES_H__ 39 40 /** ICMP type type definition. 41 */ 42 typedef uint8_t icmp_type_t; 43 44 /** ICMP code type definition. 45 */ 46 typedef uint8_t icmp_code_t; 47 48 /** ICMP parameter type definition. 49 */ 50 typedef uint16_t icmp_param_t; 51 52 /** @name ICMP types definitions 53 */ 54 /*@{*/ 55 56 /** Echo Reply. 57 */ 34 * ICMP types and codes according to the on-line IANA - ICMP Type Numbers 35 * 36 * http://www.iana.org/assignments/icmp-parameters> 37 * 38 * cited September 14 2009. 39 */ 40 41 #ifndef LIBC_ICMP_CODES_H_ 42 #define LIBC_ICMP_CODES_H_ 43 44 /** ICMP type type definition. */ 45 typedef uint8_t icmp_type_t; 46 47 /** ICMP code type definition. */ 48 typedef uint8_t icmp_code_t; 49 50 /** ICMP parameter type definition. */ 51 typedef uint16_t icmp_param_t; 52 53 /** @name ICMP types definitions */ 54 /*@{*/ 55 56 /** Echo Reply. */ 58 57 #define ICMP_ECHOREPLY 0 59 58 60 /** Destination Unreachable. 61 */ 59 /** Destination Unreachable. */ 62 60 #define ICMP_DEST_UNREACH 3 63 61 64 /** Source Quench. 65 */ 62 /** Source Quench. */ 66 63 #define ICMP_SOURCE_QUENCH 4 67 64 68 /** Redirect. 69 */ 65 /** Redirect. */ 70 66 #define ICMP_REDIRECT 5 71 67 72 /** Alternate Host Address. 73 */ 68 /** Alternate Host Address. */ 74 69 #define ICMP_ALTERNATE_ADDR 6 75 70 76 /** Echo Request. 77 */ 78 #define ICMP_ECHO 8 79 80 /** Router Advertisement. 81 */ 71 /** Echo Request. */ 72 #define ICMP_ECHO 8 73 74 /** Router Advertisement. */ 82 75 #define ICMP_ROUTER_ADV 9 83 76 84 /** Router solicitation. 85 */ 77 /** Router solicitation. */ 86 78 #define ICMP_ROUTER_SOL 10 87 79 88 /** Time Exceeded. 89 */ 80 /** Time Exceeded. */ 90 81 #define ICMP_TIME_EXCEEDED 11 91 82 92 /** Parameter Problem. 93 */ 83 /** Parameter Problem. */ 94 84 #define ICMP_PARAMETERPROB 12 95 85 96 /** Timestamp Request. 97 */ 86 /** Timestamp Request. */ 98 87 #define ICMP_TIMESTAMP 13 99 88 100 /** Timestamp Reply. 101 */ 89 /** Timestamp Reply. */ 102 90 #define ICMP_TIMESTAMPREPLY 14 103 91 104 /** Information Request. 105 */ 92 /** Information Request. */ 106 93 #define ICMP_INFO_REQUEST 15 107 94 108 /** Information Reply. 109 */ 95 /** Information Reply. */ 110 96 #define ICMP_INFO_REPLY 16 111 97 112 /** Address Mask Request. 113 */ 98 /** Address Mask Request. */ 114 99 #define ICMP_ADDRESS 17 115 100 116 /** Address Mask Reply. 117 */ 101 /** Address Mask Reply. */ 118 102 #define ICMP_ADDRESSREPLY 18 119 103 120 /** Traceroute. 121 */ 104 /** Traceroute. */ 122 105 #define ICMP_TRACEROUTE 30 123 106 124 /** Datagram Conversion Error. 125 */ 107 /** Datagram Conversion Error. */ 126 108 #define ICMP_CONVERSION_ERROR 31 127 109 128 /** Mobile Host Redirect. 129 */ 110 /** Mobile Host Redirect. */ 130 111 #define ICMP_REDIRECT_MOBILE 32 131 112 132 /** IPv6 Where-Are-You. 133 */ 113 /** IPv6 Where-Are-You. */ 134 114 #define ICMP_IPV6_WHERE_ARE_YOU 33 135 115 136 /** IPv6 I-Am-Here. 137 */ 116 /** IPv6 I-Am-Here. */ 138 117 #define ICMP_IPV6_I_AM_HERE 34 139 118 140 /** Mobile Registration Request. 141 */ 119 /** Mobile Registration Request. */ 142 120 #define ICMP_MOBILE_REQUEST 35 143 121 144 /** Mobile Registration Reply. 145 */ 122 /** Mobile Registration Reply. */ 146 123 #define ICMP_MOBILE_REPLY 36 147 124 148 /** Domain name request. 149 */ 125 /** Domain name request. */ 150 126 #define ICMP_DN_REQUEST 37 151 127 152 /** Domain name reply. 153 */ 128 /** Domain name reply. */ 154 129 #define ICMP_DN_REPLY 38 155 130 156 /** SKIP. 157 */ 158 #define ICMP_SKIP 39 159 160 /** Photuris. 161 */ 131 /** SKIP. */ 132 #define ICMP_SKIP 39 133 134 /** Photuris. */ 162 135 #define ICMP_PHOTURIS 40 163 136 … … 168 141 /*@{*/ 169 142 170 /** Network Unreachable. 171 */ 143 /** Network Unreachable. */ 172 144 #define ICMP_NET_UNREACH 0 173 145 174 /** Host Unreachable. 175 */ 146 /** Host Unreachable. */ 176 147 #define ICMP_HOST_UNREACH 1 177 148 178 /** Protocol Unreachable. 179 */ 149 /** Protocol Unreachable. */ 180 150 #define ICMP_PROT_UNREACH 2 181 151 182 /** Port Unreachable. 183 */ 152 /** Port Unreachable. */ 184 153 #define ICMP_PORT_UNREACH 3 185 154 186 /** Fragmentation needed but the Do Not Fragment bit was set. 187 */ 155 /** Fragmentation needed but the Do Not Fragment bit was set. */ 188 156 #define ICMP_FRAG_NEEDED 4 189 157 190 /** Source Route failed. 191 */ 158 /** Source Route failed. */ 192 159 #define ICMP_SR_FAILED 5 193 160 194 /** Destination network unknown. 195 */ 161 /** Destination network unknown. */ 196 162 #define ICMP_NET_UNKNOWN 6 197 163 198 /** Destination host unknown. 199 */ 164 /** Destination host unknown. */ 200 165 #define ICMP_HOST_UNKNOWN 7 201 166 202 /** Source host isolated (obsolete). 203 */ 167 /** Source host isolated (obsolete). */ 204 168 #define ICMP_HOST_ISOLATED 8 205 169 206 /** Destination network administratively prohibited. 207 */ 170 /** Destination network administratively prohibited. */ 208 171 #define ICMP_NET_ANO 9 209 172 210 /** Destination host administratively prohibited. 211 */ 173 /** Destination host administratively prohibited. */ 212 174 #define ICMP_HOST_ANO 10 213 175 214 /** Network unreachable for this type of service. 215 */ 176 /** Network unreachable for this type of service. */ 216 177 #define ICMP_NET_UNR_TOS 11 217 178 218 /** Host unreachable for this type of service. 219 */ 179 /** Host unreachable for this type of service. */ 220 180 #define ICMP_HOST_UNR_TOS 12 221 181 222 /** Communication administratively prohibited by filtering. 223 */ 182 /** Communication administratively prohibited by filtering. */ 224 183 #define ICMP_PKT_FILTERED 13 225 184 226 /** Host precedence violation. 227 */ 185 /** Host precedence violation. */ 228 186 #define ICMP_PREC_VIOLATION 14 229 187 230 /** Precedence cutoff in effect. 231 */ 188 /** Precedence cutoff in effect. */ 232 189 #define ICMP_PREC_CUTOFF 15 233 190 234 191 /*@}*/ 235 192 236 /** @name ICMP_REDIRECT codes definitions 237 */ 238 /*@{*/ 239 240 /** Network redirect (or subnet). 241 */ 193 /** @name ICMP_REDIRECT codes definitions */ 194 /*@{*/ 195 196 /** Network redirect (or subnet). */ 242 197 #define ICMP_REDIR_NET 0 243 198 244 /** Host redirect. 245 */ 199 /** Host redirect. */ 246 200 #define ICMP_REDIR_HOST 1 247 201 248 /** Network redirect for this type of service. 249 */ 202 /** Network redirect for this type of service. */ 250 203 #define ICMP_REDIR_NETTOS 2 251 204 252 /** Host redirect for this type of service. 253 */ 205 /** Host redirect for this type of service. */ 254 206 #define ICMP_REDIR_HOSTTOS 3 255 207 256 208 /*@}*/ 257 209 258 /** @name ICMP_ALTERNATE_ADDRESS codes definitions 259 */ 260 /*@{*/ 261 262 /** Alternate address for host. 263 */ 210 /** @name ICMP_ALTERNATE_ADDRESS codes definitions */ 211 /*@{*/ 212 213 /** Alternate address for host. */ 264 214 #define ICMP_ALTERNATE_HOST 0 265 215 266 216 /*@}*/ 267 217 268 /** @name ICMP_ROUTER_ADV codes definitions 269 */ 270 /*@{*/ 271 272 /** Normal router advertisement. 273 */ 218 /** @name ICMP_ROUTER_ADV codes definitions */ 219 /*@{*/ 220 221 /** Normal router advertisement. */ 274 222 #define ICMP_ROUTER_NORMAL 0 275 223 276 /** Does not route common traffic. 277 */ 224 /** Does not route common traffic. */ 278 225 #define ICMP_ROUTER_NO_NORMAL_TRAFFIC 16 279 226 280 227 /*@}*/ 281 228 282 /** @name ICMP_TIME_EXCEEDED codes definitions 283 */ 284 /*@{*/ 285 286 /** Transit TTL exceeded. 287 */ 229 /** @name ICMP_TIME_EXCEEDED codes definitions */ 230 /*@{*/ 231 232 /** Transit TTL exceeded. */ 288 233 #define ICMP_EXC_TTL 0 289 234 290 /** Reassembly TTL exceeded. 291 */ 235 /** Reassembly TTL exceeded. */ 292 236 #define ICMP_EXC_FRAGTIME 1 293 237 294 238 /*@}*/ 295 239 296 /** @name ICMP_PARAMETERPROB codes definitions 297 */ 298 /*@{*/ 299 300 /** Pointer indicates the error. 301 */ 240 /** @name ICMP_PARAMETERPROB codes definitions */ 241 /*@{*/ 242 243 /** Pointer indicates the error. */ 302 244 #define ICMP_PARAM_POINTER 0 303 245 304 /** Missing required option. 305 */ 246 /** Missing required option. */ 306 247 #define ICMP_PARAM_MISSING 1 307 248 308 /** Bad length. 309 */ 249 /** Bad length. */ 310 250 #define ICMP_PARAM_LENGTH 2 311 251 312 252 /*@}*/ 313 253 314 /** @name ICMP_PHOTURIS codes definitions 315 */ 316 /*@{*/ 317 318 /** Bad SPI. 319 */ 320 #define ICMP_PHOTURIS_BAD_SPI 0 321 322 /** Authentication failed. 323 */ 324 #define ICMP_PHOTURIS_AUTHENTICATION 1 325 326 /** Decompression failed. 327 */ 254 /** @name ICMP_PHOTURIS codes definitions */ 255 /*@{*/ 256 257 /** Bad SPI. */ 258 #define ICMP_PHOTURIS_BAD_SPI 0 259 260 /** Authentication failed. */ 261 #define ICMP_PHOTURIS_AUTHENTICATION 1 262 263 /** Decompression failed. */ 328 264 #define ICMP_PHOTURIS_DECOMPRESSION 2 329 265 330 /** Decryption failed. 331 */ 332 #define ICMP_PHOTURIS_DECRYPTION 3 333 334 /** Need authentication. 335 */ 266 /** Decryption failed. */ 267 #define ICMP_PHOTURIS_DECRYPTION 3 268 269 /** Need authentication. */ 336 270 #define ICMP_PHOTURIS_NEED_AUTHENTICATION 4 337 271 338 /** Need authorization. 339 */ 272 /** Need authorization. */ 340 273 #define ICMP_PHOTURIS_NEED_AUTHORIZATION 5 341 274
Note:
See TracChangeset
for help on using the changeset viewer.