66#ifndef _NETINET6_IP6_VAR_H_
67#define _NETINET6_IP6_VAR_H_
101#if defined(_NETINET6_IN6_VAR_H_) && defined(_KERNEL)
108 struct ifnet *im6o_multicast_ifp;
109 u_char im6o_multicast_hlim;
110 u_char im6o_multicast_loop;
111 struct ip6_mfilter_head im6o_head;
125#define ip6po_rthdr ip6po_rhinfo.ip6po_rhi_rthdr
126#define ip6po_route ip6po_rhinfo.ip6po_rhi_route
133#define ip6po_nexthop ip6po_nhinfo.ip6po_nhi_nexthop
134#define ip6po_nextroute ip6po_nhinfo.ip6po_nhi_route
160#define IP6PO_MINMTU_MCASTONLY -1
161#define IP6PO_MINMTU_DISABLE 0
162#define IP6PO_MINMTU_ALL 1
166#define IP6PO_TEMPADDR_SYSTEM -1
167#define IP6PO_TEMPADDR_NOTPREFER 0
168#define IP6PO_TEMPADDR_PREFER 1
172#define IP6PO_REACHCONF 0x01
173#define IP6PO_MINMTU 0x02
175#define IP6PO_DONTFRAG 0x04
176#define IP6PO_USECOA 0x08
208#define IP6S_HDRCNT 256
211#define IP6S_M2MMAX 32
224#define IP6S_RULESMAX 16
225#define IP6S_SCOPECNT 16
250#include <sys/counter.h>
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)
262#define IPV6_UNSPECSRC 0x01
263#define IPV6_FORWARDING 0x02
264#define IPV6_MINMTU 0x04
266#ifdef __NO_STRICT_ALIGNMENT
267#define IP6_HDR_ALIGNED_P(ip) 1
269#define IP6_HDR_ALIGNED_P(ip) ((((intptr_t) (ip)) & 3) == 0)
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)
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)
314#define V_ip6_auto_flowlabel VNET(ip6_auto_flowlabel)
315#define V_ip6_auto_linklocal VNET(ip6_auto_linklocal)
321#define V_ip6_use_tempaddr VNET(ip6_use_tempaddr)
322#define V_ip6_prefer_tempaddr VNET(ip6_prefer_tempaddr)
326#define V_ip6_use_defzone VNET(ip6_use_defzone)
329#define V_inet6_pfil_head VNET(inet6_pfil_head)
330#define PFIL_INET6_NAME "inet6"
334#define V_ip6stealth VNET(ip6stealth)
339#define V_nd6_ignore_ipv6_only_ra VNET(nd6_ignore_ipv6_only_ra)
359int ip6_nexthdr(
const struct mbuf *,
int,
int,
int *);
360int ip6_lasthdr(
const struct mbuf *,
int,
int,
int *);
362extern int (*
ip6_mforward)(
struct ip6_hdr *,
struct ifnet *,
368 struct mbuf **,
int *);
371int ip6_sysctl(
int *, u_int,
void *,
size_t *,
void *,
size_t);
379 struct ip6_moptions *,
struct ifnet **,
390int ip6_fragment(
struct ifnet *,
struct mbuf *,
int, u_char,
int,
405int rip6_output(
struct mbuf *,
struct socket *, ...);
407 int,
struct mbuf *,
struct mbuf *,
struct mbuf *,
struct thread *);
413 struct inpcb *,
struct ucred *,
int,
struct in6_addr *,
int *);
415 uint32_t,
struct ifnet *,
struct in6_addr *,
int *);
417 struct ip6_moptions *,
struct route_in6 *,
struct ifnet **,
418 struct nhop_object **, u_int, uint32_t);
int ip6_sysctl(int *, u_int, void *, size_t *, void *, size_t)
VNET_DECLARE(int, ip6_defhlim)
int rip6_ctloutput(struct socket *, struct sockopt *)
int route6_input(struct mbuf **, int *, int)
int ip6_process_hopopts(struct mbuf *, u_int8_t *, int, u_int32_t *, u_int32_t *)
void ip6_initpktopts(struct ip6_pktopts *)
int ip6proto_register(short)
int ip6_nexthdr(const struct mbuf *, int, int, int *)
struct ip6_pktopts * ip6_copypktopts(struct ip6_pktopts *, int)
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)
TAILQ_HEAD(ip6fraghead, ip6asfrag)
u_int32_t ip6_randomflowlabel(void)
int ip6_get_prevhdr(const struct mbuf *, int)
int ip6_output(struct mbuf *, struct ip6_pktopts *, struct route_in6 *, int, struct ip6_moptions *, struct ifnet **, struct inpcb *)
int ip6_deletefraghdr(struct mbuf *, int, int)
int ip6_fragment(struct ifnet *, struct mbuf *, int, u_char, int, uint32_t)
int ip6proto_unregister(short)
int in6_selectsrc_socket(struct sockaddr_in6 *, struct ip6_pktopts *, struct inpcb *, struct ucred *, int, struct in6_addr *, int *)
int ip6_ctloutput(struct socket *, struct sockopt *)
int rip6_input(struct mbuf **, int *, int)
int ip6_lasthdr(const struct mbuf *, int, int, int *)
int in6_selectsrc_addr(uint32_t, const struct in6_addr *, uint32_t, struct ifnet *, struct in6_addr *, int *)
struct pr_usrreqs rip6_usrreqs
void ip6_direct_input(struct mbuf *)
int ip6_optlen(struct inpcb *)
int none_input(struct mbuf **, int *, int)
void rip6_ctlinput(int, struct sockaddr *, void *)
void ip6_mloopback(struct ifnet *, struct mbuf *)
struct mbuf ** ip6_savecontrol_v4(struct inpcb *, struct mbuf *, struct mbuf **, int *)
int icmp6_ctloutput(struct socket *, struct sockopt *sopt)
int in6_selectroute(struct sockaddr_in6 *, struct ip6_pktopts *, struct ip6_moptions *, struct route_in6 *, struct ifnet **, struct nhop_object **, u_int, uint32_t)
int frag6_input(struct mbuf **, int *, int)
void frag6_slowtimo(void)
void ip6_freepcbopts(struct ip6_pktopts *)
void ip6_clearpktopts(struct ip6_pktopts *, int)
int ip6_raw_ctloutput(struct socket *, struct sockopt *)
void ip6_notify_pmtu(struct inpcb *, struct sockaddr_in6 *, u_int32_t)
void ip6_input(struct mbuf *)
int rip6_output(struct mbuf *, struct socket *,...)
void ip6_savecontrol(struct inpcb *, struct mbuf *, struct mbuf **)
u_int32_t ip6_randomid(void)
int ip6_unknown_opt(u_int8_t *, struct mbuf *, int)
int ip6_setpktopts(struct mbuf *, struct ip6_pktopts *, struct ip6_pktopts *, struct ucred *, int)
VNET_PCPUSTAT_DECLARE(struct ip6stat, ip6stat)
int(* ip6_mforward)(struct ip6_hdr *, struct ifnet *, struct mbuf *)
void ip6_forward(struct mbuf *, int)
int dest6_input(struct mbuf **, int *, int)
struct ip6_hbh * ip6po_hbh
int ip6po_prefer_tempaddr
struct in6_pktinfo * ip6po_pktinfo
struct ip6_dest * ip6po_dest2
struct ip6_dest * ip6po_dest1
struct route_in6 ip6po_nhi_route
struct sockaddr * ip6po_nhi_nexthop
struct route_in6 ip6po_rhi_route
struct ip6_rthdr * ip6po_rhi_rthdr
struct in6_addr ip6q_src ip6q_dst
TAILQ_ENTRY(ip6q) ip6q_tq
struct label * ip6q_label
struct ip6fraghead ip6q_frags
uint64_t ip6s_m2m[IP6S_M2MMAX]
uint64_t ip6s_sources_deprecated[IP6S_SCOPECNT]
uint64_t ip6s_exthdrtoolong
uint64_t ip6s_sources_sameif[IP6S_SCOPECNT]
uint64_t ip6s_redirectsent
uint64_t ip6s_sources_none
uint64_t ip6s_cantforward
uint64_t ip6s_fragdropped
uint64_t ip6s_reassembled
uint64_t ip6s_fragoverflow
uint64_t ip6s_fragtimeout
uint64_t ip6s_nxthist[IP6S_HDRCNT]
uint64_t ip6s_sources_rule[IP6S_RULESMAX]
uint64_t ip6s_sources_otherif[IP6S_SCOPECNT]
uint64_t ip6s_sources_samescope[IP6S_SCOPECNT]
uint64_t ip6s_sources_otherscope[IP6S_SCOPECNT]
uint64_t ip6s_atomicfrags