Changeset 1550


Ignore:
Timestamp:
Oct 9, 2004, 10:39:47 AM (21 years ago)
Author:
bird
Message:

Updated to FreeBSD 5.2 level.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/emx/include/netinet/ip_icmp.h

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r1549 r1550  
    1 /* Modified for emx by hv 1994
    2  * Modified for gcc/os2 by bird 2003
    3  *
    4  * Copyright (c) 1982, 1986 Regents of the University of California.
    5  * All rights reserved.
     1/** $Id$ */
     2/** @file
     3 * FreeBSD 5.2
     4 * @changed bird (2003): modified for gcc/os2
     5 * @changed bird (2004): updated to FreeBSD 5.2 and __USE_LIBC_TCPIP
     6 */
     7
     8/*
     9 * Copyright (c) 1982, 1986, 1993
     10 *      The Regents of the University of California.  All rights reserved.
    611 *
    712 * Redistribution and use in source and binary forms, with or without
     
    1318 *    notice, this list of conditions and the following disclaimer in the
    1419 *    documentation and/or other materials provided with the distribution.
    15  * 3. All advertising materials mentioning features or use of this software
    16  *    must display the following acknowledgement:
    17  *      This product includes software developed by the University of
    18  *      California, Berkeley and its contributors.
    1920 * 4. Neither the name of the University nor the names of its contributors
    2021 *    may be used to endorse or promote products derived from this software
     
    3334 * SUCH DAMAGE.
    3435 *
    35  *      from: @(#)ip_icmp.h     7.5 (Berkeley) 6/28/90
    36  *      $Id$
     36 *     
     37 *$
    3738 */
    3839
     
    4445 * Per RFC 792, September 1981.
    4546 */
     47
     48
     49
     50
     51
     52
     53
     54
     55
     56
    4657
    4758/*
     
    6172                } ih_idseq;
    6273                int ih_void;
    63 #ifndef TCPV40HDRS
    64 
     74
     75#if !defined(TCPV40HDRS) || defined(__USE_LIBC_TCPIP)
    6576                /* ICMP_UNREACH_NEEDFRAG -- Path MTU Discovery (RFC1191) */
    6677                struct ih_pmtu {
     
    6879                        n_short ipm_nextmtu;
    6980                } ih_pmtu;
     81
     82
     83
     84
     85
     86
     87
     88
    7089#endif
    7190        } icmp_hun;
     
    7594#define icmp_seq        icmp_hun.ih_idseq.icd_seq
    7695#define icmp_void       icmp_hun.ih_void
    77 #ifndef TCPV40HDRS
     96#if
    7897#define icmp_pmvoid     icmp_hun.ih_pmtu.ipm_void
    7998#define icmp_nextmtu    icmp_hun.ih_pmtu.ipm_nextmtu
     99
     100
     101
     102
     103
    80104#endif
    81105        union {
    82                 struct id_ts {
    83                         n_time its_otime;
    84                         n_time its_rtime;
    85                         n_time its_ttime;
     106                struct id_ts {
     107                        n_time its_otime;
     108                        n_time its_rtime;
     109                        n_time its_ttime;
    86110                } id_ts;
    87111                struct id_ip  {
     
    89113                        /* options and then 64 bits of data */
    90114                } id_ip;
     115
     116
     117
     118
    91119                u_long  id_mask;
     120
    92121                char    id_data[1];
    93122        } icmp_dun;
     
    96125#define icmp_ttime      icmp_dun.id_ts.its_ttime
    97126#define icmp_ip         icmp_dun.id_ip.idi_ip
     127
     128
     129
    98130#define icmp_mask       icmp_dun.id_mask
    99131#define icmp_data       icmp_dun.id_data
     
    104136 * Lower bounds on packet lengths for various types.
    105137 * For the error advice packets must first insure that the
    106  * packet is large enought to contain the returned ip header.
     138 * packet is large enough to contain the returned ip header.
    107139 * Only then can we do the check to see if 64 bits of packet
    108140 * data have been returned, since we need to check the returned
     
    127159#define         ICMP_UNREACH_NEEDFRAG   4               /* IP_DF caused drop */
    128160#define         ICMP_UNREACH_SRCFAIL    5               /* src route failed */
    129 #ifndef TCPV40HDRS
     161#if
    130162#define         ICMP_UNREACH_NET_UNKNOWN 6              /* unknown net */
    131163#define         ICMP_UNREACH_HOST_UNKNOWN 7             /* unknown host */
     
    135167#define         ICMP_UNREACH_TOSNET     11              /* bad tos for net */
    136168#define         ICMP_UNREACH_TOSHOST    12              /* bad tos for host */
     169
     170
     171
     172
     173
    137174#endif
    138175#define ICMP_SOURCEQUENCH       4               /* packet lost, slow down */
     
    142179#define         ICMP_REDIRECT_TOSNET    2               /* for tos and net */
    143180#define         ICMP_REDIRECT_TOSHOST   3               /* for tos and host */
     181
     182
     183
    144184#define ICMP_ECHO               8               /* echo service */
    145 #ifndef TCPV40HDRS
     185#if
    146186#define ICMP_ROUTERADVERT       9               /* router advertisement */
     187
     188
     189
     190
    147191#define ICMP_ROUTERSOLICIT      10              /* router solicitation */
    148192#endif
     
    151195#define         ICMP_TIMXCEED_REASS     1               /* ttl==0 in reass */
    152196#define ICMP_PARAMPROB          12              /* ip header bad */
    153 #ifndef TCPV40HDRS
     197#if !defined(TCPV40HDRS) || defined(__USE_LIBC_TCPIP)
     198#ifdef __USE_LIBC_TCPIP
     199#define         ICMP_PARAMPROB_ERRATPTR 0               /* error at param ptr */
     200#endif
    154201#define         ICMP_PARAMPROB_OPTABSENT 1              /* req. opt. absent */
     202
     203
     204
    155205#endif
    156206#define ICMP_TSTAMP             13              /* timestamp request */
     
    160210#define ICMP_MASKREQ            17              /* address mask request */
    161211#define ICMP_MASKREPLY          18              /* address mask reply */
    162 
     212#ifdef __USE_LIBC_TCPIP
     213#define ICMP_TRACEROUTE         30              /* traceroute */
     214#define ICMP_DATACONVERR        31              /* data conversion error */
     215#define ICMP_MOBILE_REDIRECT    32              /* mobile host redirect */
     216#define ICMP_IPV6_WHEREAREYOU   33              /* IPv6 where-are-you */
     217#define ICMP_IPV6_IAMHERE       34              /* IPv6 i-am-here */
     218#define ICMP_MOBILE_REGREQUEST  35              /* mobile registration req */
     219#define ICMP_MOBILE_REGREPLY    36              /* mobile registration reply */
     220#define ICMP_SKIP               39              /* SKIP */
     221#define ICMP_PHOTURIS           40              /* Photuris */
     222#define         ICMP_PHOTURIS_UNKNOWN_INDEX     1       /* unknown sec index */
     223#define         ICMP_PHOTURIS_AUTH_FAILED       2       /* auth failed */
     224#define         ICMP_PHOTURIS_DECRYPT_FAILED    3       /* decrypt failed */
     225#endif
     226
     227#ifdef __USE_LIBC_TCPIP
     228#define ICMP_MAXTYPE            40
     229#else
    163230#define ICMP_MAXTYPE            18
    164 
    165 #ifdef TCPV40HDRS
    166 #define ICMP_INFOTYPE(type) \
    167         ((type) == ICMP_ECHOREPLY || (type) == ICMP_ECHO || \
    168         (type) == ICMP_TSTAMP || (type) == ICMP_TSTAMPREPLY || \
    169         (type) == ICMP_IREQ || (type) == ICMP_IREQREPLY || \
    170         (type) == ICMP_MASKREQ || (type) == ICMP_MASKREPLY)
    171 #else
     231#endif
     232
     233#ifndef TCPV40HDRS
    172234#define ICMP_INFOTYPE(type) \
    173235        ((type) == ICMP_ECHOREPLY || (type) == ICMP_ECHO || \
     
    176238        (type) == ICMP_IREQ || (type) == ICMP_IREQREPLY || \
    177239        (type) == ICMP_MASKREQ || (type) == ICMP_MASKREPLY)
     240
     241
     242
     243
     244
     245
     246
     247
     248
     249
     250
    178251#endif
    179252
Note: See TracChangeset for help on using the changeset viewer.