]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/netinet6/ip6_var.h
xnu-3789.1.32.tar.gz
[apple/xnu.git] / bsd / netinet6 / ip6_var.h
index 30926d2dc8f65f2610f723cee3066418d0c947eb..e04dee46a1d065ab0b5f1fe3c46323cba4c5b724 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2014 Apple Inc. All rights reserved.
+ * Copyright (c) 2000-2016 Apple Inc. All rights reserved.
  *
  * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  *
@@ -182,6 +182,7 @@ struct ip6_exthdrs {
        struct mbuf *ip6e_dest1;
        struct mbuf *ip6e_rthdr;
        struct mbuf *ip6e_dest2;
+       boolean_t merged;
 };
 
 /*
@@ -253,6 +254,9 @@ struct      ip6_pktopts {
  */
 #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 */
@@ -268,6 +272,7 @@ struct      ip6stat {
        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. */
@@ -289,32 +294,35 @@ struct    ip6stat {
        /*
         * 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;
 
@@ -325,6 +333,9 @@ struct      ip6stat {
 
        /* 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 {
@@ -405,8 +416,12 @@ struct ip6_out_args {
 #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 */
@@ -454,8 +469,6 @@ extern int ip6_use_defzone;
 extern struct pr_usrreqs rip6_usrreqs;
 extern struct pr_usrreqs icmp6_dgram_usrreqs;
 
-extern int ip6_doscopedroute;
-
 struct sockopt;
 struct inpcb;
 struct in6_ifaddr;