Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet6/ip6_var.h
| Show First 20 Lines • Show All 62 Lines • ▼ Show 20 Lines | |||||
| * $FreeBSD$ | * $FreeBSD$ | ||||
| */ | */ | ||||
| #ifndef _NETINET6_IP6_VAR_H_ | #ifndef _NETINET6_IP6_VAR_H_ | ||||
| #define _NETINET6_IP6_VAR_H_ | #define _NETINET6_IP6_VAR_H_ | ||||
| #include <sys/epoch.h> | #include <sys/epoch.h> | ||||
| #ifdef _KERNEL | #if defined(_KERNEL) || defined(_KERNEL_UT) | ||||
| struct ip6asfrag; /* frag6.c */ | struct ip6asfrag; /* frag6.c */ | ||||
| TAILQ_HEAD(ip6fraghead, ip6asfrag); | TAILQ_HEAD(ip6fraghead, ip6asfrag); | ||||
| /* | /* | ||||
| * IP6 reassembly queue structure. Each fragment | * IP6 reassembly queue structure. Each fragment | ||||
| * being reassembled is attached to one of these structures. | * being reassembled is attached to one of these structures. | ||||
| */ | */ | ||||
| struct ip6q { | struct ip6q { | ||||
| Show All 13 Lines | |||||
| /* | /* | ||||
| * IP6 reinjecting structure. | * IP6 reinjecting structure. | ||||
| */ | */ | ||||
| struct ip6_direct_ctx { | struct ip6_direct_ctx { | ||||
| uint32_t ip6dc_nxt; /* next header to process */ | uint32_t ip6dc_nxt; /* next header to process */ | ||||
| uint32_t ip6dc_off; /* offset to next header */ | 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 | * Structure attached to inpcb.in6p_moptions and | ||||
| * passed to ip6_output when IPv6 multicast options are in use. | * passed to ip6_output when IPv6 multicast options are in use. | ||||
| * This structure is lazy-allocated. | * This structure is lazy-allocated. | ||||
| */ | */ | ||||
| struct ip6_moptions { | struct ip6_moptions { | ||||
| struct ifnet *im6o_multicast_ifp; /* ifp for outgoing multicasts */ | struct ifnet *im6o_multicast_ifp; /* ifp for outgoing multicasts */ | ||||
| u_char im6o_multicast_hlim; /* hoplimit for outgoing multicasts */ | u_char im6o_multicast_hlim; /* hoplimit for outgoing multicasts */ | ||||
| ▲ Show 20 Lines • Show All 131 Lines • ▼ Show 20 Lines | #define IP6S_SCOPECNT 16 | ||||
| uint64_t ip6s_sources_otherscope[IP6S_SCOPECNT]; | uint64_t ip6s_sources_otherscope[IP6S_SCOPECNT]; | ||||
| /* number of times that a deprecated address is chosen */ | /* number of times that a deprecated address is chosen */ | ||||
| uint64_t ip6s_sources_deprecated[IP6S_SCOPECNT]; | uint64_t ip6s_sources_deprecated[IP6S_SCOPECNT]; | ||||
| /* number of times that each rule of source selection is applied. */ | /* number of times that each rule of source selection is applied. */ | ||||
| uint64_t ip6s_sources_rule[IP6S_RULESMAX]; | uint64_t ip6s_sources_rule[IP6S_RULESMAX]; | ||||
| }; | }; | ||||
| #ifdef _KERNEL | #if defined(_KERNEL) || defined(_KERNEL_UT) | ||||
| #include <sys/counter.h> | #include <sys/counter.h> | ||||
| VNET_PCPUSTAT_DECLARE(struct ip6stat, ip6stat); | VNET_PCPUSTAT_DECLARE(struct ip6stat, ip6stat); | ||||
| #define IP6STAT_ADD(name, val) \ | #define IP6STAT_ADD(name, val) \ | ||||
| VNET_PCPUSTAT_ADD(struct ip6stat, ip6stat, name, (val)) | VNET_PCPUSTAT_ADD(struct ip6stat, ip6stat, name, (val)) | ||||
| #define IP6STAT_SUB(name, val) IP6STAT_ADD(name, -(val)) | #define IP6STAT_SUB(name, val) IP6STAT_ADD(name, -(val)) | ||||
| #define IP6STAT_INC(name) IP6STAT_ADD(name, 1) | #define IP6STAT_INC(name) IP6STAT_ADD(name, 1) | ||||
| #define IP6STAT_DEC(name) IP6STAT_SUB(name, 1) | #define IP6STAT_DEC(name) IP6STAT_SUB(name, 1) | ||||
| #endif | #endif | ||||
| #ifdef _KERNEL | #if defined(_KERNEL) || defined(_KERNEL_UT) | ||||
vangyzen: You could remove this `#endif / #if` pair. | |||||
| /* flags passed to ip6_output as last parameter */ | /* flags passed to ip6_output as last parameter */ | ||||
| #define IPV6_UNSPECSRC 0x01 /* allow :: as the source address */ | #define IPV6_UNSPECSRC 0x01 /* allow :: as the source address */ | ||||
| #define IPV6_FORWARDING 0x02 /* most of IPv6 header exists */ | #define IPV6_FORWARDING 0x02 /* most of IPv6 header exists */ | ||||
| #define IPV6_MINMTU 0x04 /* use minimum MTU (IPV6_USE_MIN_MTU) */ | #define IPV6_MINMTU 0x04 /* use minimum MTU (IPV6_USE_MIN_MTU) */ | ||||
| #ifdef __NO_STRICT_ALIGNMENT | #ifdef __NO_STRICT_ALIGNMENT | ||||
| #define IP6_HDR_ALIGNED_P(ip) 1 | #define IP6_HDR_ALIGNED_P(ip) 1 | ||||
| #else | #else | ||||
| ▲ Show 20 Lines • Show All 145 Lines • ▼ Show 20 Lines | |||||
| int in6_selectsrc_addr(uint32_t, const struct in6_addr *, | int in6_selectsrc_addr(uint32_t, const struct in6_addr *, | ||||
| uint32_t, struct ifnet *, struct in6_addr *, int *); | uint32_t, struct ifnet *, struct in6_addr *, int *); | ||||
| int in6_selectroute(struct sockaddr_in6 *, struct ip6_pktopts *, | int in6_selectroute(struct sockaddr_in6 *, struct ip6_pktopts *, | ||||
| struct ip6_moptions *, struct route_in6 *, struct ifnet **, | struct ip6_moptions *, struct route_in6 *, struct ifnet **, | ||||
| struct nhop_object **, u_int, uint32_t); | struct nhop_object **, u_int, uint32_t); | ||||
| u_int32_t ip6_randomid(void); | u_int32_t ip6_randomid(void); | ||||
| u_int32_t ip6_randomflowlabel(void); | u_int32_t ip6_randomflowlabel(void); | ||||
| void in6_delayed_cksum(struct mbuf *m, uint32_t plen, u_short offset); | void in6_delayed_cksum(struct mbuf *m, uint32_t plen, u_short offset); | ||||
| #endif /* _KERNEL */ | #endif /* _KERNEL || _KERNEL_UT */ | ||||
| #endif /* !_NETINET6_IP6_VAR_H_ */ | #endif /* !_NETINET6_IP6_VAR_H_ */ | ||||
You could remove this #endif / #if pair.