33#ifndef _NETINET_IP_ICMP_H_
34#define _NETINET_IP_ICMP_H_
77#define icmp_pptr icmp_hun.ih_pptr
78#define icmp_gwaddr icmp_hun.ih_gwaddr
79#define icmp_id icmp_hun.ih_idseq.icd_id
80#define icmp_seq icmp_hun.ih_idseq.icd_seq
81#define icmp_void icmp_hun.ih_void
82#define icmp_pmvoid icmp_hun.ih_pmtu.ipm_void
83#define icmp_nextmtu icmp_hun.ih_pmtu.ipm_nextmtu
84#define icmp_num_addrs icmp_hun.ih_rtradv.irt_num_addrs
85#define icmp_wpa icmp_hun.ih_rtradv.irt_wpa
86#define icmp_lifetime icmp_hun.ih_rtradv.irt_lifetime
101#define icmp_otime icmp_dun.id_ts.its_otime
102#define icmp_rtime icmp_dun.id_ts.its_rtime
103#define icmp_ttime icmp_dun.id_ts.its_ttime
104#define icmp_ip icmp_dun.id_ip.idi_ip
105#define icmp_radv icmp_dun.id_radv
106#define icmp_mask icmp_dun.id_mask
107#define icmp_data icmp_dun.id_data
119#define ICMP_TSLEN (8 + 3 * sizeof (n_time))
120#define ICMP_MASKLEN 12
121#define ICMP_ADVLENMIN (8 + sizeof (struct ip) + 8)
123#define ICMP_ADVLEN(p) (8 + ((p)->icmp_ip.ip_hl << 2) + 8)
126#define ICMP_ADVLEN(p) (8 + (IP_VHL_HL((p)->icmp_ip.ip_vhl) << 2) + 8)
133#define ICMP_ECHOREPLY 0
134#define ICMP_UNREACH 3
135#define ICMP_UNREACH_NET 0
136#define ICMP_UNREACH_HOST 1
137#define ICMP_UNREACH_PROTOCOL 2
138#define ICMP_UNREACH_PORT 3
139#define ICMP_UNREACH_NEEDFRAG 4
140#define ICMP_UNREACH_SRCFAIL 5
141#define ICMP_UNREACH_NET_UNKNOWN 6
142#define ICMP_UNREACH_HOST_UNKNOWN 7
143#define ICMP_UNREACH_ISOLATED 8
144#define ICMP_UNREACH_NET_PROHIB 9
145#define ICMP_UNREACH_HOST_PROHIB 10
146#define ICMP_UNREACH_TOSNET 11
147#define ICMP_UNREACH_TOSHOST 12
148#define ICMP_UNREACH_FILTER_PROHIB 13
149#define ICMP_UNREACH_HOST_PRECEDENCE 14
150#define ICMP_UNREACH_PRECEDENCE_CUTOFF 15
151#define ICMP_SOURCEQUENCH 4
152#define ICMP_REDIRECT 5
153#define ICMP_REDIRECT_NET 0
154#define ICMP_REDIRECT_HOST 1
155#define ICMP_REDIRECT_TOSNET 2
156#define ICMP_REDIRECT_TOSHOST 3
158#define ICMP_ROUTERADVERT 9
159#define ICMP_ROUTERSOLICIT 10
160#define ICMP_TIMXCEED 11
161#define ICMP_TIMXCEED_INTRANS 0
162#define ICMP_TIMXCEED_REASS 1
163#define ICMP_PARAMPROB 12
164#define ICMP_PARAMPROB_OPTABSENT 1
165#define ICMP_TSTAMP 13
166#define ICMP_TSTAMPREPLY 14
168#define ICMP_IREQREPLY 16
169#define ICMP_MASKREQ 17
170#define ICMP_MASKREPLY 18
172#define ICMP_MAXTYPE 18
174#define ICMP_INFOTYPE(type) \
175 ((type) == ICMP_ECHOREPLY || (type) == ICMP_ECHO || \
176 (type) == ICMP_ROUTERADVERT || (type) == ICMP_ROUTERSOLICIT || \
177 (type) == ICMP_TSTAMP || (type) == ICMP_TSTAMPREPLY || \
178 (type) == ICMP_IREQ || (type) == ICMP_IREQREPLY || \
179 (type) == ICMP_MASKREQ || (type) == ICMP_MASKREPLY)
182void icmp_error
__P((
struct mbuf *,
int,
int, n_long,
struct ifnet *));
183void icmp_input
__P((
struct mbuf *,
int));
struct icmp::@433::ih_rtradv ih_rtradv
struct icmp::@433::ih_idseq ih_idseq
struct icmp_ra_addr id_radv
union icmp::@433 icmp_hun
union icmp::@434 icmp_dun
struct icmp::@433::ih_pmtu ih_pmtu
struct icmp::@434::id_ip id_ip
struct icmp::@434::id_ts id_ts