Ignore:
Timestamp:
2010-10-13T22:48:25Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ef689ef0
Parents:
b278b4e (diff), 753bca3 (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 from lp:~jakub/helenos/net.

File:
1 moved

Legend:

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

    rb278b4e r10056483  
    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/** ICMP type type definition. */
     45typedef uint8_t icmp_type_t;
     46
     47/** ICMP code type definition. */
     48typedef uint8_t icmp_code_t;
     49
     50/** ICMP parameter type definition. */
     51typedef uint16_t icmp_param_t;
     52
     53/** @name ICMP types definitions */
     54/*@{*/
     55
     56/** Echo Reply. */
    5857#define ICMP_ECHOREPLY          0
    5958
    60 /** Destination Unreachable.
    61  */
     59/** Destination Unreachable. */
    6260#define ICMP_DEST_UNREACH       3
    6361
    64 /** Source Quench.
    65  */
     62/** Source Quench. */
    6663#define ICMP_SOURCE_QUENCH      4
    6764
    68 /** Redirect.
    69  */
     65/** Redirect. */
    7066#define ICMP_REDIRECT           5
    7167
    72 /** Alternate Host Address.
    73  */
     68/** Alternate Host Address. */
    7469#define ICMP_ALTERNATE_ADDR     6
    7570
    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. */
    8275#define ICMP_ROUTER_ADV         9
    8376
    84 /** Router solicitation.
    85  */
     77/** Router solicitation. */
    8678#define ICMP_ROUTER_SOL         10
    8779
    88 /** Time Exceeded.
    89  */
     80/** Time Exceeded. */
    9081#define ICMP_TIME_EXCEEDED      11
    9182
    92 /** Parameter Problem.
    93  */
     83/** Parameter Problem. */
    9484#define ICMP_PARAMETERPROB      12
    9585
    96 /** Timestamp Request.
    97  */
     86/** Timestamp Request. */
    9887#define ICMP_TIMESTAMP          13
    9988
    100 /** Timestamp Reply.
    101  */
     89/** Timestamp Reply. */
    10290#define ICMP_TIMESTAMPREPLY     14
    10391
    104 /** Information Request.
    105  */
     92/** Information Request. */
    10693#define ICMP_INFO_REQUEST       15
    10794
    108 /** Information Reply.
    109  */
     95/** Information Reply. */
    11096#define ICMP_INFO_REPLY         16
    11197
    112 /** Address Mask Request.
    113  */
     98/** Address Mask Request. */
    11499#define ICMP_ADDRESS            17
    115100
    116 /** Address Mask Reply.
    117  */
     101/** Address Mask Reply. */
    118102#define ICMP_ADDRESSREPLY       18
    119103
    120 /** Traceroute.
    121  */
     104/** Traceroute. */
    122105#define ICMP_TRACEROUTE         30
    123106
    124 /** Datagram Conversion Error.
    125  */
     107/** Datagram Conversion Error. */
    126108#define ICMP_CONVERSION_ERROR   31
    127109
    128 /** Mobile Host Redirect.
    129  */
     110/** Mobile Host Redirect. */
    130111#define ICMP_REDIRECT_MOBILE    32
    131112
    132 /** IPv6 Where-Are-You.
    133  */
     113/** IPv6 Where-Are-You. */
    134114#define ICMP_IPV6_WHERE_ARE_YOU 33
    135115
    136 /** IPv6 I-Am-Here.
    137  */
     116/** IPv6 I-Am-Here. */
    138117#define ICMP_IPV6_I_AM_HERE     34
    139118
    140 /** Mobile Registration Request.
    141  */
     119/** Mobile Registration Request. */
    142120#define ICMP_MOBILE_REQUEST     35
    143121
    144 /** Mobile Registration Reply.
    145  */
     122/** Mobile Registration Reply. */
    146123#define ICMP_MOBILE_REPLY       36
    147124
    148 /** Domain name request.
    149  */
     125/** Domain name request. */
    150126#define ICMP_DN_REQUEST         37
    151127
    152 /** Domain name reply.
    153  */
     128/** Domain name reply. */
    154129#define ICMP_DN_REPLY           38
    155130
    156 /** SKIP.
    157  */
    158 #define ICMP_SKIP                       39
    159 
    160 /** Photuris.
    161  */
     131/** SKIP. */
     132#define ICMP_SKIP               39
     133
     134/** Photuris. */
    162135#define ICMP_PHOTURIS           40
    163136
     
    168141/*@{*/
    169142
    170 /** Network Unreachable.
    171  */
     143/** Network Unreachable. */
    172144#define ICMP_NET_UNREACH        0
    173145
    174 /** Host Unreachable.
    175  */
     146/** Host Unreachable. */
    176147#define ICMP_HOST_UNREACH       1
    177148
    178 /** Protocol Unreachable.
    179  */
     149/** Protocol Unreachable. */
    180150#define ICMP_PROT_UNREACH       2
    181151
    182 /** Port Unreachable.
    183  */
     152/** Port Unreachable. */
    184153#define ICMP_PORT_UNREACH       3
    185154
    186 /** Fragmentation needed but the Do Not Fragment bit was set.
    187  */
     155/** Fragmentation needed but the Do Not Fragment bit was set. */
    188156#define ICMP_FRAG_NEEDED        4
    189157
    190 /** Source Route failed.
    191  */
     158/** Source Route failed. */
    192159#define ICMP_SR_FAILED          5
    193160
    194 /** Destination network unknown.
    195  */
     161/** Destination network unknown. */
    196162#define ICMP_NET_UNKNOWN        6
    197163
    198 /** Destination host unknown.
    199  */
     164/** Destination host unknown. */
    200165#define ICMP_HOST_UNKNOWN       7
    201166
    202 /** Source host isolated (obsolete).
    203  */
     167/** Source host isolated (obsolete). */
    204168#define ICMP_HOST_ISOLATED      8
    205169
    206 /** Destination network administratively prohibited.
    207  */
     170/** Destination network administratively prohibited. */
    208171#define ICMP_NET_ANO            9
    209172
    210 /** Destination host administratively prohibited.
    211  */
     173/** Destination host administratively prohibited. */
    212174#define ICMP_HOST_ANO           10
    213175
    214 /** Network unreachable for this type of service.
    215  */
     176/** Network unreachable for this type of service. */
    216177#define ICMP_NET_UNR_TOS        11
    217178
    218 /** Host unreachable for this type of service.
    219  */
     179/** Host unreachable for this type of service. */
    220180#define ICMP_HOST_UNR_TOS       12
    221181
    222 /** Communication administratively prohibited by filtering.
    223  */
     182/** Communication administratively prohibited by filtering. */
    224183#define ICMP_PKT_FILTERED       13
    225184
    226 /** Host precedence violation.
    227  */
     185/** Host precedence violation. */
    228186#define ICMP_PREC_VIOLATION     14
    229187
    230 /** Precedence cutoff in effect.
    231  */
     188/** Precedence cutoff in effect. */
    232189#define ICMP_PREC_CUTOFF        15
    233190
    234191/*@}*/
    235192
    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). */
    242197#define ICMP_REDIR_NET          0
    243198
    244 /** Host redirect.
    245  */
     199/** Host redirect. */
    246200#define ICMP_REDIR_HOST         1
    247201
    248 /** Network redirect for this type of service.
    249  */
     202/** Network redirect for this type of service. */
    250203#define ICMP_REDIR_NETTOS       2
    251204
    252 /** Host redirect for this type of service.
    253  */
     205/** Host redirect for this type of service. */
    254206#define ICMP_REDIR_HOSTTOS      3
    255207
    256208/*@}*/
    257209
    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. */
    264214#define ICMP_ALTERNATE_HOST     0
    265215
    266216/*@}*/
    267217
    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. */
    274222#define ICMP_ROUTER_NORMAL      0
    275223
    276 /** Does not route common traffic.
    277  */
     224/** Does not route common traffic. */
    278225#define ICMP_ROUTER_NO_NORMAL_TRAFFIC   16
    279226
    280227/*@}*/
    281228
    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. */
    288233#define ICMP_EXC_TTL            0
    289234
    290 /** Reassembly TTL exceeded.
    291  */
     235/** Reassembly TTL exceeded. */
    292236#define ICMP_EXC_FRAGTIME       1
    293237
    294238/*@}*/
    295239
    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. */
    302244#define ICMP_PARAM_POINTER      0
    303245
    304 /** Missing required option.
    305  */
     246/** Missing required option. */
    306247#define ICMP_PARAM_MISSING      1
    307248
    308 /** Bad length.
    309  */
     249/** Bad length. */
    310250#define ICMP_PARAM_LENGTH       2
    311251
    312252/*@}*/
    313253
    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. */
    328264#define ICMP_PHOTURIS_DECOMPRESSION             2
    329265
    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. */
    336270#define ICMP_PHOTURIS_NEED_AUTHENTICATION       4
    337271
    338 /** Need authorization.
    339  */
     272/** Need authorization. */
    340273#define ICMP_PHOTURIS_NEED_AUTHORIZATION        5
    341274
Note: See TracChangeset for help on using the changeset viewer.