Index: sys/netinet/ip_var.h =================================================================== --- sys/netinet/ip_var.h +++ sys/netinet/ip_var.h @@ -52,7 +52,7 @@ struct in_addr ih_dst; /* destination internet address */ }; -#ifdef _KERNEL +#if defined(_KERNEL) || defined(_KERNEL_UT) /* * Ip reassembly queue structure. Each fragment * being reassembled is attached to one of these structures. @@ -70,7 +70,7 @@ u_char ipq_nfrags; /* # frags in this packet */ struct label *ipq_label; /* MAC label */ }; -#endif /* _KERNEL */ +#endif /* _KERNEL || _KERNEL_UT */ /* * Structure stored in mbuf in inpcb.ip_options @@ -85,7 +85,8 @@ char ipopt_list[MAX_IPOPTLEN]; /* options proper */ }; -#if defined(_NETINET_IN_VAR_H_) && defined(_KERNEL) +#if defined(_NETINET_IN_VAR_H_) && (defined(_KERNEL) \ + || defined(_KERNEL_UT)) /* * Structure attached to inpcb.ip_moptions and * passed to ip_output when IP multicast options are in use. @@ -135,7 +136,7 @@ uint64_t ips_badaddr; /* invalid address on header */ }; -#ifdef _KERNEL +#if defined(_KERNEL) || defined(_KERNEL_UT) #include #include @@ -301,6 +302,6 @@ extern int (*ng_ipfw_input_p)(struct mbuf **, struct ip_fw_args *, bool); extern int (*ip_dn_ctl_ptr)(struct sockopt *); extern int (*ip_dn_io_ptr)(struct mbuf **, struct ip_fw_args *); -#endif /* _KERNEL */ +#endif /* _KERNEL || _KERNEL_UT */ #endif /* !_NETINET_IP_VAR_H_ */ Index: sys/netinet6/ip6_var.h =================================================================== --- sys/netinet6/ip6_var.h +++ sys/netinet6/ip6_var.h @@ -68,7 +68,7 @@ #include -#ifdef _KERNEL +#if defined(_KERNEL) || defined(_KERNEL_UT) struct ip6asfrag; /* frag6.c */ TAILQ_HEAD(ip6fraghead, ip6asfrag); @@ -98,7 +98,8 @@ uint32_t ip6dc_off; /* offset to next header */ }; -#if defined(_NETINET6_IN6_VAR_H_) && defined(_KERNEL) +#if defined(_NETINET6_IN6_VAR_H_) && (defined(_KERNEL) \ + || defined(_KERNEL_UT)) /* * Structure attached to inpcb.in6p_moptions and * passed to ip6_output when IPv6 multicast options are in use. @@ -246,7 +247,7 @@ uint64_t ip6s_sources_rule[IP6S_RULESMAX]; }; -#ifdef _KERNEL +#if defined(_KERNEL) || defined(_KERNEL_UT) #include VNET_PCPUSTAT_DECLARE(struct ip6stat, ip6stat); @@ -257,7 +258,7 @@ #define IP6STAT_DEC(name) IP6STAT_SUB(name, 1) #endif -#ifdef _KERNEL +#if defined(_KERNEL) || defined(_KERNEL_UT) /* flags passed to ip6_output as last parameter */ #define IPV6_UNSPECSRC 0x01 /* allow :: as the source address */ #define IPV6_FORWARDING 0x02 /* most of IPv6 header exists */ @@ -419,6 +420,6 @@ u_int32_t ip6_randomid(void); u_int32_t ip6_randomflowlabel(void); void in6_delayed_cksum(struct mbuf *m, uint32_t plen, u_short offset); -#endif /* _KERNEL */ +#endif /* _KERNEL || _KERNEL_UT */ #endif /* !_NETINET6_IP6_VAR_H_ */