35#ifndef _NETINET_IP_ICMP_H_
36#define _NETINET_IP_ICMP_H_
90#define icmp_pptr icmp_hun.ih_pptr
91#define icmp_gwaddr icmp_hun.ih_gwaddr
92#define icmp_id icmp_hun.ih_idseq.icd_id
93#define icmp_seq icmp_hun.ih_idseq.icd_seq
94#define icmp_void icmp_hun.ih_void
95#define icmp_pmvoid icmp_hun.ih_pmtu.ipm_void
96#define icmp_nextmtu icmp_hun.ih_pmtu.ipm_nextmtu
97#define icmp_num_addrs icmp_hun.ih_rtradv.irt_num_addrs
98#define icmp_wpa icmp_hun.ih_rtradv.irt_wpa
99#define icmp_lifetime icmp_hun.ih_rtradv.irt_lifetime
118#define icmp_otime icmp_dun.id_ts.its_otime
119#define icmp_rtime icmp_dun.id_ts.its_rtime
120#define icmp_ttime icmp_dun.id_ts.its_ttime
121#define icmp_ip icmp_dun.id_ip.idi_ip
122#define icmp_radv icmp_dun.id_radv
123#define icmp_mask icmp_dun.id_mask
124#define icmp_data icmp_dun.id_data
136#define ICMP_TSLEN (8 + 3 * sizeof (uint32_t))
137#define ICMP_MASKLEN 12
138#define ICMP_ADVLENMIN (8 + sizeof (struct ip) + 8)
139#define ICMP_ADVLEN(p) (8 + ((p)->icmp_ip.ip_hl << 2) + 8)
148#define ICMP_ADVLENPREF(p) (8 + ((p)->icmp_ip.ip_hl << 2) + 8 + 8 + 12)
153#define ICMP_ECHOREPLY 0
154#define ICMP_UNREACH 3
155#define ICMP_UNREACH_NET 0
156#define ICMP_UNREACH_HOST 1
157#define ICMP_UNREACH_PROTOCOL 2
158#define ICMP_UNREACH_PORT 3
159#define ICMP_UNREACH_NEEDFRAG 4
160#define ICMP_UNREACH_SRCFAIL 5
161#define ICMP_UNREACH_NET_UNKNOWN 6
162#define ICMP_UNREACH_HOST_UNKNOWN 7
163#define ICMP_UNREACH_ISOLATED 8
164#define ICMP_UNREACH_NET_PROHIB 9
165#define ICMP_UNREACH_HOST_PROHIB 10
166#define ICMP_UNREACH_TOSNET 11
167#define ICMP_UNREACH_TOSHOST 12
168#define ICMP_UNREACH_FILTER_PROHIB 13
169#define ICMP_UNREACH_HOST_PRECEDENCE 14
170#define ICMP_UNREACH_PRECEDENCE_CUTOFF 15
171#define ICMP_SOURCEQUENCH 4
172#define ICMP_REDIRECT 5
173#define ICMP_REDIRECT_NET 0
174#define ICMP_REDIRECT_HOST 1
175#define ICMP_REDIRECT_TOSNET 2
176#define ICMP_REDIRECT_TOSHOST 3
177#define ICMP_ALTHOSTADDR 6
179#define ICMP_ROUTERADVERT 9
180#define ICMP_ROUTERADVERT_NORMAL 0
181#define ICMP_ROUTERADVERT_NOROUTE_COMMON 16
182#define ICMP_ROUTERSOLICIT 10
183#define ICMP_TIMXCEED 11
184#define ICMP_TIMXCEED_INTRANS 0
185#define ICMP_TIMXCEED_REASS 1
186#define ICMP_PARAMPROB 12
187#define ICMP_PARAMPROB_ERRATPTR 0
188#define ICMP_PARAMPROB_OPTABSENT 1
189#define ICMP_PARAMPROB_LENGTH 2
190#define ICMP_TSTAMP 13
191#define ICMP_TSTAMPREPLY 14
193#define ICMP_IREQREPLY 16
194#define ICMP_MASKREQ 17
195#define ICMP_MASKREPLY 18
196#define ICMP_TRACEROUTE 30
197#define ICMP_DATACONVERR 31
198#define ICMP_MOBILE_REDIRECT 32
199#define ICMP_IPV6_WHEREAREYOU 33
200#define ICMP_IPV6_IAMHERE 34
201#define ICMP_MOBILE_REGREQUEST 35
202#define ICMP_MOBILE_REGREPLY 36
204#define ICMP_PHOTURIS 40
205#define ICMP_PHOTURIS_UNKNOWN_INDEX 1
206#define ICMP_PHOTURIS_AUTH_FAILED 2
207#define ICMP_PHOTURIS_DECRYPT_FAILED 3
209#define ICMP_MAXTYPE 40
211#define ICMP_INFOTYPE(type) \
212 ((type) == ICMP_ECHOREPLY || (type) == ICMP_ECHO || \
213 (type) == ICMP_ROUTERADVERT || (type) == ICMP_ROUTERSOLICIT || \
214 (type) == ICMP_TSTAMP || (type) == ICMP_TSTAMPREPLY || \
215 (type) == ICMP_IREQ || (type) == ICMP_IREQREPLY || \
216 (type) == ICMP_MASKREQ || (type) == ICMP_MASKREPLY)
int ip_next_mtu(int, int)
int icmp_input(struct mbuf **, int *, int)
void icmp_error(struct mbuf *, int, int, uint32_t, int)
struct icmp_ra_addr id_radv
struct icmp::@21::ih_rtradv ih_rtradv
struct icmp::@22::id_ip id_ip
struct icmp::@21::ih_idseq ih_idseq
struct icmp::@21::ih_pmtu ih_pmtu
struct icmp::@22::id_ts id_ts