]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/netinet/ip_flowid.h
xnu-6153.141.1.tar.gz
[apple/xnu.git] / bsd / netinet / ip_flowid.h
index 1fe2103113062d760a853d4012d99d7469a93a9e..3c68a809f3be55a22f8636289625ee99943e8336 100644 (file)
@@ -78,7 +78,7 @@ struct ip_flow_id {
 
 #define IS_IP6_FLOW_ID(id)      ((id)->addr_type == 6)
 
-#ifdef KERNEL
+#ifdef BSD_KERNEL_PRIVATE
 struct route_in6;
 struct sockaddr_in6;
 struct pf_rule;
@@ -96,8 +96,8 @@ struct ip_fw_args {
        struct ip_fw            *fwa_ipfw_rule; /* matching IPFW rule           */
        struct pf_rule          *fwa_pf_rule;   /* matching PF rule             */
        struct ether_header     *fwa_eh;        /* for bridged packets          */
-       int                     fwa_flags;      /* for dummynet                 */
-       int                     fwa_oflags;     /* for dummynet         */
+       int                     fwa_flags;      /* for dummynet                 */
+       int                     fwa_oflags;     /* for dummynet         */
        union {
                struct ip_out_args  *_fwa_ipoa;     /* for dummynet                */
                struct ip6_out_args *_fwa_ip6oa;    /* for dummynet               */
@@ -111,11 +111,10 @@ struct ip_fw_args {
                struct sockaddr_in6 *_fwa_dst6;     /* for IPv6 dummynet         */
        } fwa_dst_;
        struct route_in6        *fwa_ro6_pmtu;  /* for IPv6 output */
-       struct ifnet            *fwa_origifp;   /* for IPv6 output */
-       u_int32_t               fwa_mtu;        /* for IPv6 output */
-       int                     fwa_alwaysfrag; /* for IPv6 output */
-       u_int32_t               fwa_unfragpartlen;  /* for IPv6 output */
-       struct ip6_exthdrs      *fwa_exthdrs;   /* for IPv6 output */
+       struct ifnet            *fwa_origifp;   /* for IPv6 output */
+       u_int32_t               fwa_mtu;        /* for IPv6 output */
+       u_int32_t               fwa_unfragpartlen;  /* for IPv6 output */
+       struct ip6_exthdrs      *fwa_exthdrs;   /* for IPv6 output */
        struct ip_flow_id       fwa_id;         /* grabbed from IP header       */
        u_int16_t               fwa_divert_rule;/* divert cookie                */
        u_int32_t               fwa_cookie;
@@ -127,6 +126,14 @@ struct ip_fw_args {
 #define fwa_dst fwa_dst_._fwa_dst
 #define fwa_dst6 fwa_dst_._fwa_dst6
 
-#endif /* KERNEL */
+/* Allocate a separate structure for inputs args to save space and bzero time */
+struct ip_fw_in_args {
+       struct sockaddr_in      *fwai_next_hop; /* forward address            */
+       struct ip_fw            *fwai_ipfw_rule;/* matching IPFW rule         */
+       struct pf_rule          *fwai_pf_rule;  /* matching PF rule           */
+       u_int16_t               fwai_divert_rule;/* divert cookie             */
+};
+
+#endif /* BSD_KERNEL_PRIVATE */
 
 #endif /* __IP_FLOWID_H__ */