Ignore:
Timestamp:
2010-11-02T18:29:01Z (13 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4f35b9ff
Parents:
76e1121f (diff), 28f4adb (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.
Message:

Merge mainline changes.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/net/icmp_codes.h

    r76e1121f r4687a26c  
    2727 */
    2828
    29 /** @addtogroup icmp
     29/** @addtogroup libc
    3030 *  @{
    3131 */
    3232
    3333/** @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#include <sys/types.h>
     45
     46/** ICMP type type definition. */
     47typedef uint8_t icmp_type_t;
     48
     49/** ICMP code type definition. */
     50typedef uint8_t icmp_code_t;
     51
     52/** ICMP parameter type definition. */
     53typedef uint16_t icmp_param_t;
     54
     55/** @name ICMP types definitions */
     56/*@{*/
     57
     58/** Echo Reply. */
    5859#define ICMP_ECHOREPLY          0
    5960
    60 /** Destination Unreachable.
    61  */
     61/** Destination Unreachable. */
    6262#define ICMP_DEST_UNREACH       3
    6363
    64 /** Source Quench.
    65  */
     64/** Source Quench. */
    6665#define ICMP_SOURCE_QUENCH      4
    6766
    68 /** Redirect.
    69  */
     67/** Redirect. */
    7068#define ICMP_REDIRECT           5
    7169
    72 /** Alternate Host Address.
    73  */
     70/** Alternate Host Address. */
    7471#define ICMP_ALTERNATE_ADDR     6
    7572
    76 /** Echo Request.
    77  */
    78 #define ICMP_ECHO                       8
    79 
    80 /** Router Advertisement.
    81  */
     73/** Echo Request. */
     74#define ICMP_ECHO               8
     75
     76/** Router Advertisement. */
    8277#define ICMP_ROUTER_ADV         9
    8378
    84 /** Router solicitation.
    85  */
     79/** Router solicitation. */
    8680#define ICMP_ROUTER_SOL         10
    8781
    88 /** Time Exceeded.
    89  */
     82/** Time Exceeded. */
    9083#define ICMP_TIME_EXCEEDED      11
    9184
    92 /** Parameter Problem.
    93  */
     85/** Parameter Problem. */
    9486#define ICMP_PARAMETERPROB      12
    9587
    96 /** Timestamp Request.
    97  */
     88/** Timestamp Request. */
    9889#define ICMP_TIMESTAMP          13
    9990
    100 /** Timestamp Reply.
    101  */
     91/** Timestamp Reply. */
    10292#define ICMP_TIMESTAMPREPLY     14
    10393
    104 /** Information Request.
    105  */
     94/** Information Request. */
    10695#define ICMP_INFO_REQUEST       15
    10796
    108 /** Information Reply.
    109  */
     97/** Information Reply. */
    11098#define ICMP_INFO_REPLY         16
    11199
    112 /** Address Mask Request.
    113  */
     100/** Address Mask Request. */
    114101#define ICMP_ADDRESS            17
    115102
    116 /** Address Mask Reply.
    117  */
     103/** Address Mask Reply. */
    118104#define ICMP_ADDRESSREPLY       18
    119105
    120 /** Traceroute.
    121  */
     106/** Traceroute. */
    122107#define ICMP_TRACEROUTE         30
    123108
    124 /** Datagram Conversion Error.
    125  */
     109/** Datagram Conversion Error. */
    126110#define ICMP_CONVERSION_ERROR   31
    127111
    128 /** Mobile Host Redirect.
    129  */
     112/** Mobile Host Redirect. */
    130113#define ICMP_REDIRECT_MOBILE    32
    131114
    132 /** IPv6 Where-Are-You.
    133  */
     115/** IPv6 Where-Are-You. */
    134116#define ICMP_IPV6_WHERE_ARE_YOU 33
    135117
    136 /** IPv6 I-Am-Here.
    137  */
     118/** IPv6 I-Am-Here. */
    138119#define ICMP_IPV6_I_AM_HERE     34
    139120
    140 /** Mobile Registration Request.
    141  */
     121/** Mobile Registration Request. */
    142122#define ICMP_MOBILE_REQUEST     35
    143123
    144 /** Mobile Registration Reply.
    145  */
     124/** Mobile Registration Reply. */
    146125#define ICMP_MOBILE_REPLY       36
    147126
    148 /** Domain name request.
    149  */
     127/** Domain name request. */
    150128#define ICMP_DN_REQUEST         37
    151129
    152 /** Domain name reply.
    153  */
     130/** Domain name reply. */
    154131#define ICMP_DN_REPLY           38
    155132
    156 /** SKIP.
    157  */
    158 #define ICMP_SKIP                       39
    159 
    160 /** Photuris.
    161  */
     133/** SKIP. */
     134#define ICMP_SKIP               39
     135
     136/** Photuris. */
    162137#define ICMP_PHOTURIS           40
    163138
     
    168143/*@{*/
    169144
    170 /** Network Unreachable.
    171  */
     145/** Network Unreachable. */
    172146#define ICMP_NET_UNREACH        0
    173147
    174 /** Host Unreachable.
    175  */
     148/** Host Unreachable. */
    176149#define ICMP_HOST_UNREACH       1
    177150
    178 /** Protocol Unreachable.
    179  */
     151/** Protocol Unreachable. */
    180152#define ICMP_PROT_UNREACH       2
    181153
    182 /** Port Unreachable.
    183  */
     154/** Port Unreachable. */
    184155#define ICMP_PORT_UNREACH       3
    185156
    186 /** Fragmentation needed but the Do Not Fragment bit was set.
    187  */
     157/** Fragmentation needed but the Do Not Fragment bit was set. */
    188158#define ICMP_FRAG_NEEDED        4
    189159
    190 /** Source Route failed.
    191  */
     160/** Source Route failed. */
    192161#define ICMP_SR_FAILED          5
    193162
    194 /** Destination network unknown.
    195  */
     163/** Destination network unknown. */
    196164#define ICMP_NET_UNKNOWN        6
    197165
    198 /** Destination host unknown.
    199  */
     166/** Destination host unknown. */
    200167#define ICMP_HOST_UNKNOWN       7
    201168
    202 /** Source host isolated (obsolete).
    203  */
     169/** Source host isolated (obsolete). */
    204170#define ICMP_HOST_ISOLATED      8
    205171
    206 /** Destination network administratively prohibited.
    207  */
     172/** Destination network administratively prohibited. */
    208173#define ICMP_NET_ANO            9
    209174
    210 /** Destination host administratively prohibited.
    211  */
     175/** Destination host administratively prohibited. */
    212176#define ICMP_HOST_ANO           10
    213177
    214 /** Network unreachable for this type of service.
    215  */
     178/** Network unreachable for this type of service. */
    216179#define ICMP_NET_UNR_TOS        11
    217180
    218 /** Host unreachable for this type of service.
    219  */
     181/** Host unreachable for this type of service. */
    220182#define ICMP_HOST_UNR_TOS       12
    221183
    222 /** Communication administratively prohibited by filtering.
    223  */
     184/** Communication administratively prohibited by filtering. */
    224185#define ICMP_PKT_FILTERED       13
    225186
    226 /** Host precedence violation.
    227  */
     187/** Host precedence violation. */
    228188#define ICMP_PREC_VIOLATION     14
    229189
    230 /** Precedence cutoff in effect.
    231  */
     190/** Precedence cutoff in effect. */
    232191#define ICMP_PREC_CUTOFF        15
    233192
    234193/*@}*/
    235194
    236 /** @name ICMP_REDIRECT codes definitions
    237  */
    238 /*@{*/
    239 
    240 /** Network redirect (or subnet).
    241  */
     195/** @name ICMP_REDIRECT codes definitions */
     196/*@{*/
     197
     198/** Network redirect (or subnet). */
    242199#define ICMP_REDIR_NET          0
    243200
    244 /** Host redirect.
    245  */
     201/** Host redirect. */
    246202#define ICMP_REDIR_HOST         1
    247203
    248 /** Network redirect for this type of service.
    249  */
     204/** Network redirect for this type of service. */
    250205#define ICMP_REDIR_NETTOS       2
    251206
    252 /** Host redirect for this type of service.
    253  */
     207/** Host redirect for this type of service. */
    254208#define ICMP_REDIR_HOSTTOS      3
    255209
    256210/*@}*/
    257211
    258 /** @name ICMP_ALTERNATE_ADDRESS codes definitions
    259  */
    260 /*@{*/
    261 
    262 /** Alternate address for host.
    263  */
     212/** @name ICMP_ALTERNATE_ADDRESS codes definitions */
     213/*@{*/
     214
     215/** Alternate address for host. */
    264216#define ICMP_ALTERNATE_HOST     0
    265217
    266218/*@}*/
    267219
    268 /** @name ICMP_ROUTER_ADV codes definitions
    269  */
    270 /*@{*/
    271 
    272 /** Normal router advertisement.
    273  */
     220/** @name ICMP_ROUTER_ADV codes definitions */
     221/*@{*/
     222
     223/** Normal router advertisement. */
    274224#define ICMP_ROUTER_NORMAL      0
    275225
    276 /** Does not route common traffic.
    277  */
     226/** Does not route common traffic. */
    278227#define ICMP_ROUTER_NO_NORMAL_TRAFFIC   16
    279228
    280229/*@}*/
    281230
    282 /** @name ICMP_TIME_EXCEEDED codes definitions
    283  */
    284 /*@{*/
    285 
    286 /** Transit TTL exceeded.
    287  */
     231/** @name ICMP_TIME_EXCEEDED codes definitions */
     232/*@{*/
     233
     234/** Transit TTL exceeded. */
    288235#define ICMP_EXC_TTL            0
    289236
    290 /** Reassembly TTL exceeded.
    291  */
     237/** Reassembly TTL exceeded. */
    292238#define ICMP_EXC_FRAGTIME       1
    293239
    294240/*@}*/
    295241
    296 /** @name ICMP_PARAMETERPROB codes definitions
    297  */
    298 /*@{*/
    299 
    300 /** Pointer indicates the error.
    301  */
     242/** @name ICMP_PARAMETERPROB codes definitions */
     243/*@{*/
     244
     245/** Pointer indicates the error. */
    302246#define ICMP_PARAM_POINTER      0
    303247
    304 /** Missing required option.
    305  */
     248/** Missing required option. */
    306249#define ICMP_PARAM_MISSING      1
    307250
    308 /** Bad length.
    309  */
     251/** Bad length. */
    310252#define ICMP_PARAM_LENGTH       2
    311253
    312254/*@}*/
    313255
    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  */
     256/** @name ICMP_PHOTURIS codes definitions */
     257/*@{*/
     258
     259/** Bad SPI. */
     260#define ICMP_PHOTURIS_BAD_SPI                   0
     261
     262/** Authentication failed. */
     263#define ICMP_PHOTURIS_AUTHENTICATION            1
     264
     265/** Decompression failed. */
    328266#define ICMP_PHOTURIS_DECOMPRESSION             2
    329267
    330 /** Decryption failed.
    331  */
    332 #define ICMP_PHOTURIS_DECRYPTION        3
    333 
    334 /** Need authentication.
    335  */
     268/** Decryption failed. */
     269#define ICMP_PHOTURIS_DECRYPTION                3
     270
     271/** Need authentication. */
    336272#define ICMP_PHOTURIS_NEED_AUTHENTICATION       4
    337273
    338 /** Need authorization.
    339  */
     274/** Need authorization. */
    340275#define ICMP_PHOTURIS_NEED_AUTHORIZATION        5
    341276
Note: See TracChangeset for help on using the changeset viewer.