/*
- * Copyright (c) 2000-2013 Apple Inc. All rights reserved.
+ * Copyright (c) 2000-2016 Apple Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
struct mbuf *ip6e_dest1;
struct mbuf *ip6e_rthdr;
struct mbuf *ip6e_dest2;
+ boolean_t merged;
};
/*
*/
#endif /* BSD_KERNEL_PRIVATE */
+#define IP6S_SRCRULE_COUNT 16
+#include <netinet6/scope6_var.h>
+
struct ip6stat {
u_quad_t ip6s_total; /* total packets received */
u_quad_t ip6s_tooshort; /* packet too short */
u_quad_t ip6s_localout; /* total ip packets generated here */
u_quad_t ip6s_odropped; /* lost packets due to nobufs, etc. */
u_quad_t ip6s_reassembled; /* total packets reassembled ok */
+ u_quad_t ip6s_atmfrag_rcvd; /* atomic fragments received */
u_quad_t ip6s_fragmented; /* datagrams successfully fragmented */
u_quad_t ip6s_ofragments; /* output fragments created */
u_quad_t ip6s_cantfrag; /* don't fragment flag was set, etc. */
/*
* statistics for improvement of the source address selection
* algorithm:
- * XXX: hardcoded 16 = # of ip6 multicast scope types + 1
*/
/* number of times that address selection fails */
u_quad_t ip6s_sources_none;
/* number of times that an address on the outgoing I/F is chosen */
- u_quad_t ip6s_sources_sameif[16];
+ u_quad_t ip6s_sources_sameif[SCOPE6_ID_MAX];
/* number of times that an address on a non-outgoing I/F is chosen */
- u_quad_t ip6s_sources_otherif[16];
+ u_quad_t ip6s_sources_otherif[SCOPE6_ID_MAX];
/*
* number of times that an address that has the same scope
* from the destination is chosen.
*/
- u_quad_t ip6s_sources_samescope[16];
+ u_quad_t ip6s_sources_samescope[SCOPE6_ID_MAX];
/*
* number of times that an address that has a different scope
* from the destination is chosen.
*/
- u_quad_t ip6s_sources_otherscope[16];
+ u_quad_t ip6s_sources_otherscope[SCOPE6_ID_MAX];
/* number of times that a deprecated address is chosen */
- u_quad_t ip6s_sources_deprecated[16];
+ u_quad_t ip6s_sources_deprecated[SCOPE6_ID_MAX];
u_quad_t ip6s_forward_cachehit;
u_quad_t ip6s_forward_cachemiss;
/* number of times that each rule of source selection is applied. */
- u_quad_t ip6s_sources_rule[16];
+ u_quad_t ip6s_sources_rule[IP6S_SRCRULE_COUNT];
+
+ /* number of times we ignored address on expensive secondary interfaces */
+ u_quad_t ip6s_sources_skip_expensive_secondary_if;
+
/* pkt dropped, no mbufs for control data */
u_quad_t ip6s_pktdropcntrl;
/* duplicate address detection collisions */
u_quad_t ip6s_dad_collide;
+
+ /* DAD NS looped back */
+ u_quad_t ip6s_dad_loopcount;
+};
+
+enum ip6s_sources_rule_index {
+ IP6S_SRCRULE_0, IP6S_SRCRULE_1, IP6S_SRCRULE_2, IP6S_SRCRULE_3, IP6S_SRCRULE_4,
+ IP6S_SRCRULE_5, IP6S_SRCRULE_5_5, IP6S_SRCRULE_6, IP6S_SRCRULE_7,
+ IP6S_SRCRULE_7x, IP6S_SRCRULE_8
};
#ifdef BSD_KERNEL_PRIVATE
#define IP6OAF_BOUND_IF 0x00000002 /* boundif value is valid */
#define IP6OAF_BOUND_SRCADDR 0x00000004 /* bound to src address */
#define IP6OAF_NO_CELLULAR 0x00000010 /* skip IFT_CELLULAR */
+#define IP6OAF_NO_EXPENSIVE 0x00000020 /* skip IFEF_EXPENSIVE */
+#define IP6OAF_AWDL_UNRESTRICTED 0x00000040 /* privileged AWDL */
+#define IP6OAF_QOSMARKING_ALLOWED 0x00000080 /* policy allows Fastlane DSCP marking */
+#define IP6OAF_INTCOPROC_ALLOWED 0x00000100 /* access to internal coproc interfaces */
u_int32_t ip6oa_retflags; /* IP6OARF return flags (see below) */
#define IP6OARF_IFDENIED 0x00000001 /* denied access to interface */
+ int ip6oa_sotc; /* traffic class for Fastlane DSCP mapping */
+ int ip6oa_netsvctype;
};
extern struct ip6stat ip6stat; /* statistics */
extern int ip6_maxifprefixes; /* Max acceptable prefixes via RA per IF */
extern int ip6_maxifdefrouters; /* Max acceptable def routers via RA */
extern int ip6_maxdynroutes; /* Max # of routes created via redirect */
-#if MROUTING
-extern struct socket *ip6_mrouter; /* multicast routing daemon */
-#endif /* MROUTING */
extern int ip6_sendredirects; /* send IP redirects when forwarding? */
extern int ip6_accept_rtadv; /* deprecated */
extern int ip6_log_interval;
extern struct pr_usrreqs rip6_usrreqs;
extern struct pr_usrreqs icmp6_dgram_usrreqs;
-extern int ip6_doscopedroute;
-
struct sockopt;
struct inpcb;
struct in6_ifaddr;
extern struct ip6aux *ip6_findaux(struct mbuf *);
extern void ip6_delaux(struct mbuf *);
-#if MROUTING
-extern int ip6_mforward(struct ip6_hdr *, struct ifnet *, struct mbuf *);
-#endif /* MROUTING */
extern int ip6_process_hopopts(struct mbuf *, u_int8_t *, int, u_int32_t *,
u_int32_t *);
extern struct mbuf **ip6_savecontrol_v4(struct inpcb *, struct mbuf *,