Changeset 1550
- Timestamp:
- Oct 9, 2004, 10:39:47 AM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/emx/include/netinet/ip_icmp.h
-
Property cvs2svn:cvs-rev
changed from
1.2
to1.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. 6 11 * 7 12 * Redistribution and use in source and binary forms, with or without … … 13 18 * notice, this list of conditions and the following disclaimer in the 14 19 * documentation and/or other materials provided with the distribution. 15 * 3. All advertising materials mentioning features or use of this software16 * must display the following acknowledgement:17 * This product includes software developed by the University of18 * California, Berkeley and its contributors.19 20 * 4. Neither the name of the University nor the names of its contributors 20 21 * may be used to endorse or promote products derived from this software … … 33 34 * SUCH DAMAGE. 34 35 * 35 * from: @(#)ip_icmp.h 7.5 (Berkeley) 6/28/9036 * $Id$36 * @(#)ip_icmp.h 8.1 (Berkeley) 6/10/93 37 * $FreeBSD: src/sys/netinet/ip_icmp.h,v 1.22 2004/04/07 20:46:13 imp Exp $ 37 38 */ 38 39 … … 44 45 * Per RFC 792, September 1981. 45 46 */ 47 48 #ifdef __USE_LIBC_TCPIP 49 /* 50 * Internal of an ICMP Router Advertisement 51 */ 52 struct icmp_ra_addr { 53 u_int32_t ira_addr; 54 u_int32_t ira_preference; 55 }; 56 #endif 46 57 47 58 /* … … 61 72 } ih_idseq; 62 73 int ih_void; 63 #ifndef TCPV40HDRS 64 74 75 #if !defined(TCPV40HDRS) || defined(__USE_LIBC_TCPIP) 65 76 /* ICMP_UNREACH_NEEDFRAG -- Path MTU Discovery (RFC1191) */ 66 77 struct ih_pmtu { … … 68 79 n_short ipm_nextmtu; 69 80 } ih_pmtu; 81 82 #ifdef __USE_LIBC_TCPIP 83 struct ih_rtradv { 84 u_char irt_num_addrs; 85 u_char irt_wpa; 86 u_int16_t irt_lifetime; 87 } ih_rtradv; 88 #endif 70 89 #endif 71 90 } icmp_hun; … … 75 94 #define icmp_seq icmp_hun.ih_idseq.icd_seq 76 95 #define icmp_void icmp_hun.ih_void 77 #if ndef TCPV40HDRS96 #if !defined(TCPV40HDRS) || defined(__USE_LIBC_TCPIP) 78 97 #define icmp_pmvoid icmp_hun.ih_pmtu.ipm_void 79 98 #define icmp_nextmtu icmp_hun.ih_pmtu.ipm_nextmtu 99 #ifdef __USE_LIBC_TCPIP 100 #define icmp_num_addrs icmp_hun.ih_rtradv.irt_num_addrs 101 #define icmp_wpa icmp_hun.ih_rtradv.irt_wpa 102 #define icmp_lifetime icmp_hun.ih_rtradv.irt_lifetime 103 #endif 80 104 #endif 81 105 union { 82 struct id_ts { 83 n_time its_otime; 84 n_time its_rtime; 85 n_time its_ttime; 106 struct id_ts { /* ICMP Timestamp */ 107 n_time its_otime; /* Originate */ 108 n_time its_rtime; /* Receive */ 109 n_time its_ttime; /* Transmit */ 86 110 } id_ts; 87 111 struct id_ip { … … 89 113 /* options and then 64 bits of data */ 90 114 } id_ip; 115 #ifdef __USE_LIBC_TCPIP 116 struct icmp_ra_addr id_radv; 117 u_int32_t id_mask; 118 #else 91 119 u_long id_mask; 120 #endif 92 121 char id_data[1]; 93 122 } icmp_dun; … … 96 125 #define icmp_ttime icmp_dun.id_ts.its_ttime 97 126 #define icmp_ip icmp_dun.id_ip.idi_ip 127 #ifdef __USE_LIBC_TCPIP 128 #define icmp_radv icmp_dun.id_radv 129 #endif 98 130 #define icmp_mask icmp_dun.id_mask 99 131 #define icmp_data icmp_dun.id_data … … 104 136 * Lower bounds on packet lengths for various types. 105 137 * For the error advice packets must first insure that the 106 * packet is large enough tto contain the returned ip header.138 * packet is large enough to contain the returned ip header. 107 139 * Only then can we do the check to see if 64 bits of packet 108 140 * data have been returned, since we need to check the returned … … 127 159 #define ICMP_UNREACH_NEEDFRAG 4 /* IP_DF caused drop */ 128 160 #define ICMP_UNREACH_SRCFAIL 5 /* src route failed */ 129 #if ndef TCPV40HDRS161 #if !defined(TCPV40HDRS) || defined(__USE_LIBC_TCPIP) 130 162 #define ICMP_UNREACH_NET_UNKNOWN 6 /* unknown net */ 131 163 #define ICMP_UNREACH_HOST_UNKNOWN 7 /* unknown host */ … … 135 167 #define ICMP_UNREACH_TOSNET 11 /* bad tos for net */ 136 168 #define ICMP_UNREACH_TOSHOST 12 /* bad tos for host */ 169 #ifdef __USE_LIBC_TCPIP 170 #define ICMP_UNREACH_FILTER_PROHIB 13 /* admin prohib */ 171 #define ICMP_UNREACH_HOST_PRECEDENCE 14 /* host prec vio. */ 172 #define ICMP_UNREACH_PRECEDENCE_CUTOFF 15 /* prec cutoff */ 173 #endif 137 174 #endif 138 175 #define ICMP_SOURCEQUENCH 4 /* packet lost, slow down */ … … 142 179 #define ICMP_REDIRECT_TOSNET 2 /* for tos and net */ 143 180 #define ICMP_REDIRECT_TOSHOST 3 /* for tos and host */ 181 #ifdef __USE_LIBC_TCPIP 182 #define ICMP_ALTHOSTADDR 6 /* alternate host address */ 183 #endif 144 184 #define ICMP_ECHO 8 /* echo service */ 145 #if ndef TCPV40HDRS185 #if !defined(TCPV40HDRS) || defined(__USE_LIBC_TCPIP) 146 186 #define ICMP_ROUTERADVERT 9 /* router advertisement */ 187 #ifdef __USE_LIBC_TCPIP 188 #define ICMP_ROUTERADVERT_NORMAL 0 /* normal advertisement */ 189 #define ICMP_ROUTERADVERT_NOROUTE_COMMON 16 /* selective routing */ 190 #endif 147 191 #define ICMP_ROUTERSOLICIT 10 /* router solicitation */ 148 192 #endif … … 151 195 #define ICMP_TIMXCEED_REASS 1 /* ttl==0 in reass */ 152 196 #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 154 201 #define ICMP_PARAMPROB_OPTABSENT 1 /* req. opt. absent */ 202 #ifdef __USE_LIBC_TCPIP 203 #define ICMP_PARAMPROB_LENGTH 2 /* bad length */ 204 #endif 155 205 #endif 156 206 #define ICMP_TSTAMP 13 /* timestamp request */ … … 160 210 #define ICMP_MASKREQ 17 /* address mask request */ 161 211 #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 163 230 #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 172 234 #define ICMP_INFOTYPE(type) \ 173 235 ((type) == ICMP_ECHOREPLY || (type) == ICMP_ECHO || \ … … 176 238 (type) == ICMP_IREQ || (type) == ICMP_IREQREPLY || \ 177 239 (type) == ICMP_MASKREQ || (type) == ICMP_MASKREPLY) 240 #else 241 #define ICMP_INFOTYPE(type) \ 242 ((type) == ICMP_ECHOREPLY || (type) == ICMP_ECHO || \ 243 (type) == ICMP_TSTAMP || (type) == ICMP_TSTAMPREPLY || \ 244 (type) == ICMP_IREQ || (type) == ICMP_IREQREPLY || \ 245 (type) == ICMP_MASKREQ || (type) == ICMP_MASKREPLY) 246 #endif 247 248 #ifdef _KERNEL 249 void icmp_error(struct mbuf *, int, int, n_long, struct ifnet *); 250 void icmp_input(struct mbuf *, int); 178 251 #endif 179 252 -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.