FreeBSD kernel IPv6 code
ip6_var.h
Go to the documentation of this file.
1/*-
2 * SPDX-License-Identifier: BSD-3-Clause
3 *
4 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * 3. Neither the name of the project nor the names of its contributors
16 * may be used to endorse or promote products derived from this software
17 * without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
20 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
23 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * SUCH DAMAGE.
30 *
31 * $KAME: ip6_var.h,v 1.62 2001/05/03 14:51:48 itojun Exp $
32 */
33
34/*-
35 * Copyright (c) 1982, 1986, 1993
36 * The Regents of the University of California. All rights reserved.
37 *
38 * Redistribution and use in source and binary forms, with or without
39 * modification, are permitted provided that the following conditions
40 * are met:
41 * 1. Redistributions of source code must retain the above copyright
42 * notice, this list of conditions and the following disclaimer.
43 * 2. Redistributions in binary form must reproduce the above copyright
44 * notice, this list of conditions and the following disclaimer in the
45 * documentation and/or other materials provided with the distribution.
46 * 3. Neither the name of the University nor the names of its contributors
47 * may be used to endorse or promote products derived from this software
48 * without specific prior written permission.
49 *
50 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
51 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
52 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
53 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
54 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
55 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
56 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
57 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
58 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
59 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
60 * SUCH DAMAGE.
61 *
62 * @(#)ip_var.h 8.1 (Berkeley) 6/10/93
63 * $FreeBSD$
64 */
65
66#ifndef _NETINET6_IP6_VAR_H_
67#define _NETINET6_IP6_VAR_H_
68
69#include <sys/epoch.h>
70
71#ifdef _KERNEL
72struct ip6asfrag; /* frag6.c */
73TAILQ_HEAD(ip6fraghead, ip6asfrag);
74
75/*
76 * IP6 reassembly queue structure. Each fragment
77 * being reassembled is attached to one of these structures.
78 */
79struct ip6q {
80 struct ip6fraghead ip6q_frags;
81 u_int32_t ip6q_ident;
82 u_int8_t ip6q_nxt;
83 u_int8_t ip6q_ecn;
84 u_int8_t ip6q_ttl;
85 struct in6_addr ip6q_src, ip6q_dst;
86 TAILQ_ENTRY(ip6q) ip6q_tq;
87 int ip6q_unfrglen; /* len of unfragmentable part */
88 int ip6q_nfrag; /* # of fragments */
89 struct label *ip6q_label;
90};
91#endif /* _KERNEL */
92
93/*
94 * IP6 reinjecting structure.
95 */
97 uint32_t ip6dc_nxt; /* next header to process */
98 uint32_t ip6dc_off; /* offset to next header */
99};
100
101#if defined(_NETINET6_IN6_VAR_H_) && defined(_KERNEL)
102/*
103 * Structure attached to inpcb.in6p_moptions and
104 * passed to ip6_output when IPv6 multicast options are in use.
105 * This structure is lazy-allocated.
106 */
107struct ip6_moptions {
108 struct ifnet *im6o_multicast_ifp; /* ifp for outgoing multicasts */
109 u_char im6o_multicast_hlim; /* hoplimit for outgoing multicasts */
110 u_char im6o_multicast_loop; /* 1 >= hear sends if a member */
111 struct ip6_mfilter_head im6o_head; /* group membership list */
112};
113#else
114struct ip6_moptions;
115#endif
116/*
117 * Control options for outgoing packets
118 */
119
120/* Routing header related info */
122 struct ip6_rthdr *ip6po_rhi_rthdr; /* Routing header */
123 struct route_in6 ip6po_rhi_route; /* Route to the 1st hop */
124};
125#define ip6po_rthdr ip6po_rhinfo.ip6po_rhi_rthdr
126#define ip6po_route ip6po_rhinfo.ip6po_rhi_route
127
128/* Nexthop related info */
130 struct sockaddr *ip6po_nhi_nexthop;
131 struct route_in6 ip6po_nhi_route; /* Route to the nexthop */
132};
133#define ip6po_nexthop ip6po_nhinfo.ip6po_nhi_nexthop
134#define ip6po_nextroute ip6po_nhinfo.ip6po_nhi_route
135
137 struct mbuf *ip6po_m; /* Pointer to mbuf storing the data */
138 int ip6po_hlim; /* Hoplimit for outgoing packets */
139
140 /* Outgoing IF/address information */
142
143 /* Next-hop address information */
145
146 struct ip6_hbh *ip6po_hbh; /* Hop-by-Hop options header */
147
148 /* Destination options header (before a routing header) */
149 struct ip6_dest *ip6po_dest1;
150
151 /* Routing header related info. */
153
154 /* Destination options header (after a routing header) */
155 struct ip6_dest *ip6po_dest2;
156
157 int ip6po_tclass; /* traffic class */
158
159 int ip6po_minmtu; /* fragment vs PMTU discovery policy */
160#define IP6PO_MINMTU_MCASTONLY -1 /* default; send at min MTU for multicast*/
161#define IP6PO_MINMTU_DISABLE 0 /* always perform pmtu disc */
162#define IP6PO_MINMTU_ALL 1 /* always send at min MTU */
163
164 int ip6po_prefer_tempaddr; /* whether temporary addresses are
165 preferred as source address */
166#define IP6PO_TEMPADDR_SYSTEM -1 /* follow the system default */
167#define IP6PO_TEMPADDR_NOTPREFER 0 /* not prefer temporary address */
168#define IP6PO_TEMPADDR_PREFER 1 /* prefer temporary address */
169
171#if 0 /* parameters in this block is obsolete. do not reuse the values. */
172#define IP6PO_REACHCONF 0x01 /* upper-layer reachability confirmation. */
173#define IP6PO_MINMTU 0x02 /* use minimum MTU (IPV6_USE_MIN_MTU) */
174#endif
175#define IP6PO_DONTFRAG 0x04 /* disable fragmentation (IPV6_DONTFRAG) */
176#define IP6PO_USECOA 0x08 /* use care of address */
177};
178
179/*
180 * Control options for incoming packets
181 */
182
183struct ip6stat {
184 uint64_t ip6s_total; /* total packets received */
185 uint64_t ip6s_tooshort; /* packet too short */
186 uint64_t ip6s_toosmall; /* not enough data */
187 uint64_t ip6s_fragments; /* fragments received */
188 uint64_t ip6s_fragdropped; /* frags dropped(dups, out of space) */
189 uint64_t ip6s_fragtimeout; /* fragments timed out */
190 uint64_t ip6s_fragoverflow; /* fragments that exceeded limit */
191 uint64_t ip6s_forward; /* packets forwarded */
192 uint64_t ip6s_cantforward; /* packets rcvd for unreachable dest */
193 uint64_t ip6s_redirectsent; /* packets forwarded on same net */
194 uint64_t ip6s_delivered; /* datagrams delivered to upper level*/
195 uint64_t ip6s_localout; /* total ip packets generated here */
196 uint64_t ip6s_odropped; /* lost packets due to nobufs, etc. */
197 uint64_t ip6s_reassembled; /* total packets reassembled ok */
198 uint64_t ip6s_atomicfrags; /* atomic fragments */
199 uint64_t ip6s_fragmented; /* datagrams successfully fragmented */
200 uint64_t ip6s_ofragments; /* output fragments created */
201 uint64_t ip6s_cantfrag; /* don't fragment flag was set, etc. */
202 uint64_t ip6s_badoptions; /* error in option processing */
203 uint64_t ip6s_noroute; /* packets discarded due to no route */
204 uint64_t ip6s_badvers; /* ip6 version != 6 */
205 uint64_t ip6s_rawout; /* total raw ip packets generated */
206 uint64_t ip6s_badscope; /* scope error */
207 uint64_t ip6s_notmember; /* don't join this multicast group */
208#define IP6S_HDRCNT 256 /* headers count */
209 uint64_t ip6s_nxthist[IP6S_HDRCNT]; /* next header history */
210 uint64_t ip6s_m1; /* one mbuf */
211#define IP6S_M2MMAX 32
212 uint64_t ip6s_m2m[IP6S_M2MMAX]; /* two or more mbuf */
213 uint64_t ip6s_mext1; /* one ext mbuf */
214 uint64_t ip6s_mext2m; /* two or more ext mbuf */
215 uint64_t ip6s_exthdrtoolong; /* ext hdr are not contiguous */
216 uint64_t ip6s_nogif; /* no match gif found */
217 uint64_t ip6s_toomanyhdr; /* discarded due to too many headers */
218
219 /*
220 * statistics for improvement of the source address selection
221 * algorithm:
222 * XXX: hardcoded 16 = # of ip6 multicast scope types + 1
223 */
224#define IP6S_RULESMAX 16
225#define IP6S_SCOPECNT 16
226 /* number of times that address selection fails */
228 /* number of times that an address on the outgoing I/F is chosen */
230 /* number of times that an address on a non-outgoing I/F is chosen */
232 /*
233 * number of times that an address that has the same scope
234 * from the destination is chosen.
235 */
237 /*
238 * number of times that an address that has a different scope
239 * from the destination is chosen.
240 */
242 /* number of times that a deprecated address is chosen */
244
245 /* number of times that each rule of source selection is applied. */
247};
248
249#ifdef _KERNEL
250#include <sys/counter.h>
251
253#define IP6STAT_ADD(name, val) \
254 VNET_PCPUSTAT_ADD(struct ip6stat, ip6stat, name, (val))
255#define IP6STAT_SUB(name, val) IP6STAT_ADD(name, -(val))
256#define IP6STAT_INC(name) IP6STAT_ADD(name, 1)
257#define IP6STAT_DEC(name) IP6STAT_SUB(name, 1)
258#endif
259
260#ifdef _KERNEL
261/* flags passed to ip6_output as last parameter */
262#define IPV6_UNSPECSRC 0x01 /* allow :: as the source address */
263#define IPV6_FORWARDING 0x02 /* most of IPv6 header exists */
264#define IPV6_MINMTU 0x04 /* use minimum MTU (IPV6_USE_MIN_MTU) */
265
266#ifdef __NO_STRICT_ALIGNMENT
267#define IP6_HDR_ALIGNED_P(ip) 1
268#else
269#define IP6_HDR_ALIGNED_P(ip) ((((intptr_t) (ip)) & 3) == 0)
270#endif
271
272VNET_DECLARE(int, ip6_defhlim); /* default hop limit */
273VNET_DECLARE(int, ip6_defmcasthlim); /* default multicast hop limit */
274VNET_DECLARE(int, ip6_forwarding); /* act as router? */
275VNET_DECLARE(int, ip6_use_deprecated); /* allow deprecated addr as source */
276VNET_DECLARE(int, ip6_rr_prune); /* router renumbering prefix
277 * walk list every 5 sec. */
278VNET_DECLARE(int, ip6_mcast_pmtu); /* enable pMTU discovery for multicast? */
279VNET_DECLARE(int, ip6_v6only);
280#define V_ip6_defhlim VNET(ip6_defhlim)
281#define V_ip6_defmcasthlim VNET(ip6_defmcasthlim)
282#define V_ip6_forwarding VNET(ip6_forwarding)
283#define V_ip6_use_deprecated VNET(ip6_use_deprecated)
284#define V_ip6_rr_prune VNET(ip6_rr_prune)
285#define V_ip6_mcast_pmtu VNET(ip6_mcast_pmtu)
286#define V_ip6_v6only VNET(ip6_v6only)
287
288VNET_DECLARE(struct socket *, ip6_mrouter); /* multicast routing daemon */
289VNET_DECLARE(int, ip6_sendredirects); /* send IP redirects when forwarding? */
290VNET_DECLARE(int, ip6_accept_rtadv); /* Acts as a host not a router */
291VNET_DECLARE(int, ip6_no_radr); /* No defroute from RA */
292VNET_DECLARE(int, ip6_norbit_raif); /* Disable R-bit in NA on RA
293 * receiving IF. */
294VNET_DECLARE(int, ip6_rfc6204w3); /* Accept defroute from RA even when
295 forwarding enabled */
296VNET_DECLARE(int, ip6_log_interval);
297VNET_DECLARE(time_t, ip6_log_time);
298VNET_DECLARE(int, ip6_hdrnestlimit); /* upper limit of # of extension
299 * headers */
300VNET_DECLARE(int, ip6_dad_count); /* DupAddrDetectionTransmits */
301#define V_ip6_mrouter VNET(ip6_mrouter)
302#define V_ip6_sendredirects VNET(ip6_sendredirects)
303#define V_ip6_accept_rtadv VNET(ip6_accept_rtadv)
304#define V_ip6_no_radr VNET(ip6_no_radr)
305#define V_ip6_norbit_raif VNET(ip6_norbit_raif)
306#define V_ip6_rfc6204w3 VNET(ip6_rfc6204w3)
307#define V_ip6_log_interval VNET(ip6_log_interval)
308#define V_ip6_log_time VNET(ip6_log_time)
309#define V_ip6_hdrnestlimit VNET(ip6_hdrnestlimit)
310#define V_ip6_dad_count VNET(ip6_dad_count)
311
312VNET_DECLARE(int, ip6_auto_flowlabel);
313VNET_DECLARE(int, ip6_auto_linklocal);
314#define V_ip6_auto_flowlabel VNET(ip6_auto_flowlabel)
315#define V_ip6_auto_linklocal VNET(ip6_auto_linklocal)
316
317VNET_DECLARE(int, ip6_use_tempaddr); /* Whether to use temporary addresses */
318VNET_DECLARE(int, ip6_prefer_tempaddr); /* Whether to prefer temporary
319 * addresses in the source address
320 * selection */
321#define V_ip6_use_tempaddr VNET(ip6_use_tempaddr)
322#define V_ip6_prefer_tempaddr VNET(ip6_prefer_tempaddr)
323
324VNET_DECLARE(int, ip6_use_defzone); /* Whether to use the default scope
325 * zone when unspecified */
326#define V_ip6_use_defzone VNET(ip6_use_defzone)
327
328VNET_DECLARE(struct pfil_head *, inet6_pfil_head);
329#define V_inet6_pfil_head VNET(inet6_pfil_head)
330#define PFIL_INET6_NAME "inet6"
331
332#ifdef IPSTEALTH
333VNET_DECLARE(int, ip6stealth);
334#define V_ip6stealth VNET(ip6stealth)
335#endif
336
337#ifdef EXPERIMENTAL
338VNET_DECLARE(int, nd6_ignore_ipv6_only_ra);
339#define V_nd6_ignore_ipv6_only_ra VNET(nd6_ignore_ipv6_only_ra)
340#endif
341
342extern struct pr_usrreqs rip6_usrreqs;
343struct sockopt;
344
345struct inpcb;
346
347int icmp6_ctloutput(struct socket *, struct sockopt *sopt);
348
349struct in6_ifaddr;
350int ip6proto_register(short);
351int ip6proto_unregister(short);
352
353void ip6_input(struct mbuf *);
354void ip6_direct_input(struct mbuf *);
355void ip6_freepcbopts(struct ip6_pktopts *);
356
357int ip6_unknown_opt(u_int8_t *, struct mbuf *, int);
358int ip6_get_prevhdr(const struct mbuf *, int);
359int ip6_nexthdr(const struct mbuf *, int, int, int *);
360int ip6_lasthdr(const struct mbuf *, int, int, int *);
361
362extern int (*ip6_mforward)(struct ip6_hdr *, struct ifnet *,
363 struct mbuf *);
364
365int ip6_process_hopopts(struct mbuf *, u_int8_t *, int, u_int32_t *,
366 u_int32_t *);
367struct mbuf **ip6_savecontrol_v4(struct inpcb *, struct mbuf *,
368 struct mbuf **, int *);
369void ip6_savecontrol(struct inpcb *, struct mbuf *, struct mbuf **);
370void ip6_notify_pmtu(struct inpcb *, struct sockaddr_in6 *, u_int32_t);
371int ip6_sysctl(int *, u_int, void *, size_t *, void *, size_t);
372
373void ip6_forward(struct mbuf *, int);
374
375void ip6_mloopback(struct ifnet *, struct mbuf *);
376int ip6_output(struct mbuf *, struct ip6_pktopts *,
377 struct route_in6 *,
378 int,
379 struct ip6_moptions *, struct ifnet **,
380 struct inpcb *);
381int ip6_ctloutput(struct socket *, struct sockopt *);
382int ip6_raw_ctloutput(struct socket *, struct sockopt *);
383void ip6_initpktopts(struct ip6_pktopts *);
384int ip6_setpktopts(struct mbuf *, struct ip6_pktopts *,
385 struct ip6_pktopts *, struct ucred *, int);
386void ip6_clearpktopts(struct ip6_pktopts *, int);
387struct ip6_pktopts *ip6_copypktopts(struct ip6_pktopts *, int);
388int ip6_optlen(struct inpcb *);
389int ip6_deletefraghdr(struct mbuf *, int, int);
390int ip6_fragment(struct ifnet *, struct mbuf *, int, u_char, int,
391 uint32_t);
392
393int route6_input(struct mbuf **, int *, int);
394
395void frag6_init(void);
396void frag6_destroy(void);
397int frag6_input(struct mbuf **, int *, int);
398void frag6_slowtimo(void);
399void frag6_drain(void);
400
401void rip6_init(void);
402int rip6_input(struct mbuf **, int *, int);
403void rip6_ctlinput(int, struct sockaddr *, void *);
404int rip6_ctloutput(struct socket *, struct sockopt *);
405int rip6_output(struct mbuf *, struct socket *, ...);
406int rip6_usrreq(struct socket *,
407 int, struct mbuf *, struct mbuf *, struct mbuf *, struct thread *);
408
409int dest6_input(struct mbuf **, int *, int);
410int none_input(struct mbuf **, int *, int);
411
412int in6_selectsrc_socket(struct sockaddr_in6 *, struct ip6_pktopts *,
413 struct inpcb *, struct ucred *, int, struct in6_addr *, int *);
414int in6_selectsrc_addr(uint32_t, const struct in6_addr *,
415 uint32_t, struct ifnet *, struct in6_addr *, int *);
416int in6_selectroute(struct sockaddr_in6 *, struct ip6_pktopts *,
417 struct ip6_moptions *, struct route_in6 *, struct ifnet **,
418 struct nhop_object **, u_int, uint32_t);
419u_int32_t ip6_randomid(void);
420u_int32_t ip6_randomflowlabel(void);
421void in6_delayed_cksum(struct mbuf *m, uint32_t plen, u_short offset);
422#endif /* _KERNEL */
423
424#endif /* !_NETINET6_IP6_VAR_H_ */
int ip6_sysctl(int *, u_int, void *, size_t *, void *, size_t)
VNET_DECLARE(int, ip6_defhlim)
int rip6_ctloutput(struct socket *, struct sockopt *)
Definition: raw_ip6.c:564
int route6_input(struct mbuf **, int *, int)
Definition: route6.c:62
int ip6_process_hopopts(struct mbuf *, u_int8_t *, int, u_int32_t *, u_int32_t *)
Definition: ip6_input.c:1012
void ip6_initpktopts(struct ip6_pktopts *)
Definition: ip6_output.c:2537
int ip6proto_register(short)
Definition: ip6_input.c:305
int ip6_nexthdr(const struct mbuf *, int, int, int *)
Definition: ip6_input.c:1642
struct ip6_pktopts * ip6_copypktopts(struct ip6_pktopts *, int)
Definition: ip6_output.c:2788
int rip6_usrreq(struct socket *, int, struct mbuf *, struct mbuf *, struct mbuf *, struct thread *)
void in6_delayed_cksum(struct mbuf *m, uint32_t plen, u_short offset)
Definition: ip6_output.c:200
TAILQ_HEAD(ip6fraghead, ip6asfrag)
#define IP6S_M2MMAX
Definition: ip6_var.h:211
u_int32_t ip6_randomflowlabel(void)
Definition: ip6_id.c:259
int ip6_get_prevhdr(const struct mbuf *, int)
Definition: ip6_input.c:1605
int ip6_output(struct mbuf *, struct ip6_pktopts *, struct route_in6 *, int, struct ip6_moptions *, struct ifnet **, struct inpcb *)
Definition: ip6_output.c:409
void frag6_destroy(void)
int ip6_deletefraghdr(struct mbuf *, int, int)
int ip6_fragment(struct ifnet *, struct mbuf *, int, u_char, int, uint32_t)
Definition: ip6_output.c:238
int ip6proto_unregister(short)
Definition: ip6_input.c:338
int in6_selectsrc_socket(struct sockaddr_in6 *, struct ip6_pktopts *, struct inpcb *, struct ucred *, int, struct in6_addr *, int *)
Definition: in6_src.c:544
int ip6_ctloutput(struct socket *, struct sockopt *)
Definition: ip6_output.c:1595
int rip6_input(struct mbuf **, int *, int)
Definition: raw_ip6.c:186
int ip6_lasthdr(const struct mbuf *, int, int, int *)
Definition: ip6_input.c:1717
int in6_selectsrc_addr(uint32_t, const struct in6_addr *, uint32_t, struct ifnet *, struct in6_addr *, int *)
Definition: in6_src.c:586
#define IP6S_HDRCNT
Definition: ip6_var.h:208
struct pr_usrreqs rip6_usrreqs
Definition: raw_ip6.c:902
void ip6_direct_input(struct mbuf *)
void frag6_drain(void)
Definition: frag6.c:1022
int ip6_optlen(struct inpcb *)
Definition: ip6_output.c:3365
int none_input(struct mbuf **, int *, int)
void rip6_ctlinput(int, struct sockaddr *, void *)
Definition: raw_ip6.c:327
void ip6_mloopback(struct ifnet *, struct mbuf *)
Definition: ip6_output.c:3297
struct mbuf ** ip6_savecontrol_v4(struct inpcb *, struct mbuf *, struct mbuf **, int *)
Definition: ip6_input.c:1190
int icmp6_ctloutput(struct socket *, struct sockopt *sopt)
Definition: icmp6.c:2661
int in6_selectroute(struct sockaddr_in6 *, struct ip6_pktopts *, struct ip6_moptions *, struct route_in6 *, struct ifnet **, struct nhop_object **, u_int, uint32_t)
Definition: in6_src.c:882
int frag6_input(struct mbuf **, int *, int)
Definition: frag6.c:360
void frag6_slowtimo(void)
Definition: frag6.c:887
void ip6_freepcbopts(struct ip6_pktopts *)
Definition: ip6_output.c:2807
#define IP6S_SCOPECNT
Definition: ip6_var.h:225
void ip6_clearpktopts(struct ip6_pktopts *, int)
Definition: ip6_output.c:2687
int ip6_raw_ctloutput(struct socket *, struct sockopt *)
Definition: ip6_output.c:2407
void ip6_notify_pmtu(struct inpcb *, struct sockaddr_in6 *, u_int32_t)
Definition: ip6_input.c:1560
void ip6_input(struct mbuf *)
Definition: ip6_input.c:542
int rip6_output(struct mbuf *, struct socket *,...)
Definition: raw_ip6.c:368
void frag6_init(void)
Definition: frag6.c:977
void ip6_savecontrol(struct inpcb *, struct mbuf *, struct mbuf **)
Definition: ip6_input.c:1389
u_int32_t ip6_randomid(void)
Definition: ip6_id.c:252
#define IP6S_RULESMAX
Definition: ip6_var.h:224
int ip6_unknown_opt(u_int8_t *, struct mbuf *, int)
Definition: ip6_input.c:1145
int ip6_setpktopts(struct mbuf *, struct ip6_pktopts *, struct ip6_pktopts *, struct ucred *, int)
Definition: ip6_output.c:2821
VNET_PCPUSTAT_DECLARE(struct ip6stat, ip6stat)
int(* ip6_mforward)(struct ip6_hdr *, struct ifnet *, struct mbuf *)
Definition: raw_ip6.c:151
void ip6_forward(struct mbuf *, int)
Definition: ip6_forward.c:92
void rip6_init(void)
int dest6_input(struct mbuf **, int *, int)
Definition: dest6.c:65
Definition: in6.h:97
uint32_t ip6dc_nxt
Definition: ip6_var.h:97
uint32_t ip6dc_off
Definition: ip6_var.h:98
struct ip6_hbh * ip6po_hbh
Definition: ip6_var.h:146
int ip6po_minmtu
Definition: ip6_var.h:159
int ip6po_prefer_tempaddr
Definition: ip6_var.h:164
int ip6po_hlim
Definition: ip6_var.h:138
int ip6po_flags
Definition: ip6_var.h:170
int ip6po_tclass
Definition: ip6_var.h:157
struct in6_pktinfo * ip6po_pktinfo
Definition: ip6_var.h:141
struct ip6_dest * ip6po_dest2
Definition: ip6_var.h:155
struct mbuf * ip6po_m
Definition: ip6_var.h:137
struct ip6_dest * ip6po_dest1
Definition: ip6_var.h:149
struct route_in6 ip6po_nhi_route
Definition: ip6_var.h:131
struct sockaddr * ip6po_nhi_nexthop
Definition: ip6_var.h:130
struct route_in6 ip6po_rhi_route
Definition: ip6_var.h:123
struct ip6_rthdr * ip6po_rhi_rthdr
Definition: ip6_var.h:122
Definition: ip6_var.h:79
u_int32_t ip6q_ident
Definition: ip6_var.h:81
struct in6_addr ip6q_src ip6q_dst
Definition: ip6_var.h:85
u_int8_t ip6q_ecn
Definition: ip6_var.h:83
TAILQ_ENTRY(ip6q) ip6q_tq
struct label * ip6q_label
Definition: ip6_var.h:89
u_int8_t ip6q_ttl
Definition: ip6_var.h:84
struct ip6fraghead ip6q_frags
Definition: ip6_var.h:80
u_int8_t ip6q_nxt
Definition: ip6_var.h:82
int ip6q_unfrglen
Definition: ip6_var.h:87
int ip6q_nfrag
Definition: ip6_var.h:88
uint64_t ip6s_m2m[IP6S_M2MMAX]
Definition: ip6_var.h:212
uint64_t ip6s_sources_deprecated[IP6S_SCOPECNT]
Definition: ip6_var.h:243
uint64_t ip6s_exthdrtoolong
Definition: ip6_var.h:215
uint64_t ip6s_sources_sameif[IP6S_SCOPECNT]
Definition: ip6_var.h:229
uint64_t ip6s_toomanyhdr
Definition: ip6_var.h:217
uint64_t ip6s_redirectsent
Definition: ip6_var.h:193
uint64_t ip6s_cantfrag
Definition: ip6_var.h:201
uint64_t ip6s_sources_none
Definition: ip6_var.h:227
uint64_t ip6s_mext1
Definition: ip6_var.h:213
uint64_t ip6s_cantforward
Definition: ip6_var.h:192
uint64_t ip6s_fragdropped
Definition: ip6_var.h:188
uint64_t ip6s_badoptions
Definition: ip6_var.h:202
uint64_t ip6s_reassembled
Definition: ip6_var.h:197
uint64_t ip6s_fragoverflow
Definition: ip6_var.h:190
uint64_t ip6s_notmember
Definition: ip6_var.h:207
uint64_t ip6s_toosmall
Definition: ip6_var.h:186
uint64_t ip6s_tooshort
Definition: ip6_var.h:185
uint64_t ip6s_odropped
Definition: ip6_var.h:196
uint64_t ip6s_rawout
Definition: ip6_var.h:205
uint64_t ip6s_badscope
Definition: ip6_var.h:206
uint64_t ip6s_ofragments
Definition: ip6_var.h:200
uint64_t ip6s_fragtimeout
Definition: ip6_var.h:189
uint64_t ip6s_localout
Definition: ip6_var.h:195
uint64_t ip6s_nxthist[IP6S_HDRCNT]
Definition: ip6_var.h:209
uint64_t ip6s_sources_rule[IP6S_RULESMAX]
Definition: ip6_var.h:246
uint64_t ip6s_sources_otherif[IP6S_SCOPECNT]
Definition: ip6_var.h:231
uint64_t ip6s_m1
Definition: ip6_var.h:210
uint64_t ip6s_sources_samescope[IP6S_SCOPECNT]
Definition: ip6_var.h:236
uint64_t ip6s_fragments
Definition: ip6_var.h:187
uint64_t ip6s_sources_otherscope[IP6S_SCOPECNT]
Definition: ip6_var.h:241
uint64_t ip6s_badvers
Definition: ip6_var.h:204
uint64_t ip6s_fragmented
Definition: ip6_var.h:199
uint64_t ip6s_mext2m
Definition: ip6_var.h:214
uint64_t ip6s_atomicfrags
Definition: ip6_var.h:198
uint64_t ip6s_total
Definition: ip6_var.h:184
uint64_t ip6s_delivered
Definition: ip6_var.h:194
uint64_t ip6s_noroute
Definition: ip6_var.h:203
uint64_t ip6s_forward
Definition: ip6_var.h:191
uint64_t ip6s_nogif
Definition: ip6_var.h:216