summaryrefslogtreecommitdiffstats
path: root/freebsd/sys/netinet6/in6.h
diff options
context:
space:
mode:
Diffstat (limited to 'freebsd/sys/netinet6/in6.h')
-rw-r--r--freebsd/sys/netinet6/in6.h70
1 files changed, 50 insertions, 20 deletions
diff --git a/freebsd/sys/netinet6/in6.h b/freebsd/sys/netinet6/in6.h
index 616f1009..62c5e0b0 100644
--- a/freebsd/sys/netinet6/in6.h
+++ b/freebsd/sys/netinet6/in6.h
@@ -361,11 +361,11 @@ extern const struct in6_addr in6addr_linklocal_allv2routers;
#define IFA6_IS_DEPRECATED(a) \
((a)->ia6_lifetime.ia6t_pltime != ND6_INFINITE_LIFETIME && \
- (u_int32_t)((time_second - (a)->ia6_updatetime)) > \
+ (u_int32_t)((time_uptime - (a)->ia6_updatetime)) > \
(a)->ia6_lifetime.ia6t_pltime)
#define IFA6_IS_INVALID(a) \
((a)->ia6_lifetime.ia6t_vltime != ND6_INFINITE_LIFETIME && \
- (u_int32_t)((time_second - (a)->ia6_updatetime)) > \
+ (u_int32_t)((time_uptime - (a)->ia6_updatetime)) > \
(a)->ia6_lifetime.ia6t_vltime)
#endif /* _KERNEL */
@@ -376,12 +376,24 @@ extern const struct in6_addr in6addr_linklocal_allv2routers;
struct route_in6 {
struct rtentry *ro_rt;
struct llentry *ro_lle;
- struct in6_addr *ro_ia6;
- int ro_flags;
+ /*
+ * ro_prepend and ro_plen are only used for bpf to pass in a
+ * preformed header. They are not cacheable.
+ */
+ char *ro_prepend;
+ uint16_t ro_plen;
+ uint16_t ro_flags;
+ uint16_t ro_mtu; /* saved ro_rt mtu */
+ uint16_t spare;
struct sockaddr_in6 ro_dst;
};
#endif
+#ifdef _KERNEL
+#define MTAG_ABI_IPV6 1444287380 /* IPv6 ABI */
+#define IPV6_TAG_DIRECT 0 /* direct-dispatch IPv6 */
+#endif /* _KERNEL */
+
/*
* Options for use with [gs]etsockopt at the IPV6 level.
* First word of comment is data type; bool is stored in int.
@@ -424,8 +436,7 @@ struct route_in6 {
#define IPV6_IPSEC_POLICY 28 /* struct; get/set security policy */
#endif /* IPSEC */
-#define IPV6_FAITH 29 /* bool; accept FAITH'ed connections */
-
+ /* 29; unused; was IPV6_FAITH */
#if 1 /* IPV6FIREWALL */
#define IPV6_FW_ADD 30 /* add a firewall rule to chain */
#define IPV6_FW_DEL 31 /* delete a firewall rule from chain */
@@ -481,6 +492,14 @@ struct route_in6 {
#define IPV6_BINDANY 64 /* bool: allow bind to any address */
+#define IPV6_BINDMULTI 65 /* bool; allow multibind to same addr/port */
+#define IPV6_RSS_LISTEN_BUCKET 66 /* int; set RSS listen bucket */
+#define IPV6_FLOWID 67 /* int; flowid of given socket */
+#define IPV6_FLOWTYPE 68 /* int; flowtype of given socket */
+#define IPV6_RSSBUCKETID 69 /* int; RSS bucket ID of given socket */
+#define IPV6_RECVFLOWID 70 /* bool; receive IP6 flowid/flowtype w/ datagram */
+#define IPV6_RECVRSSBUCKETID 71 /* bool; receive IP6 RSS bucket id w/ datagram */
+
/*
* The following option is private; do not use it from user applications.
* It is deliberately defined to the same value as IP_MSFILTER.
@@ -574,7 +593,7 @@ struct ip6_mtuinfo {
#define IPV6CTL_SOURCECHECK 10 /* verify source route and intf */
#define IPV6CTL_SOURCECHECK_LOGINT 11 /* minimume logging interval */
#define IPV6CTL_ACCEPT_RTADV 12
-#define IPV6CTL_KEEPFAITH 13
+ /* 13; unused; was: IPV6CTL_KEEPFAITH */
#define IPV6CTL_LOG_INTERVAL 14
#define IPV6CTL_HDRNESTLIMIT 15
#define IPV6CTL_DAD_COUNT 16
@@ -588,9 +607,9 @@ struct ip6_mtuinfo {
#define IPV6CTL_MAPPED_ADDR 23
#endif
#define IPV6CTL_V6ONLY 24
-#define IPV6CTL_RTEXPIRE 25 /* cloned route expiration time */
-#define IPV6CTL_RTMINEXPIRE 26 /* min value for expiration time */
-#define IPV6CTL_RTMAXCACHE 27 /* trigger level for dynamic expire */
+/* IPV6CTL_RTEXPIRE 25 deprecated */
+/* IPV6CTL_RTMINEXPIRE 26 deprecated */
+/* IPV6CTL_RTMAXCACHE 27 deprecated */
#define IPV6CTL_USETEMPADDR 32 /* use temporary addresses (RFC3041) */
#define IPV6CTL_TEMPPLTIME 33 /* preferred lifetime for tmpaddrs */
@@ -618,17 +637,25 @@ struct ip6_mtuinfo {
* receiving IF. */
#define IPV6CTL_RFC6204W3 50 /* Accept defroute even when forwarding
enabled */
-#define IPV6CTL_MAXID 51
+#define IPV6CTL_INTRQMAXLEN 51 /* max length of IPv6 netisr queue */
+#define IPV6CTL_INTRDQMAXLEN 52 /* max length of direct IPv6 netisr
+ * queue */
+#define IPV6CTL_MAXID 53
#endif /* __BSD_VISIBLE */
/*
- * Redefinition of mbuf flags
- */
-#define M_AUTHIPHDR M_PROTO2
-#define M_DECRYPTED M_PROTO3
-#define M_LOOP M_PROTO4
-#define M_AUTHIPDGM M_PROTO5
-#define M_RTALERT_MLD M_PROTO6
+ * Since both netinet/ and netinet6/ call into netipsec/ and netpfil/,
+ * the protocol specific mbuf flags are shared between them.
+ */
+#define M_FASTFWD_OURS M_PROTO1 /* changed dst to local */
+#define M_IP6_NEXTHOP M_PROTO2 /* explicit ip nexthop */
+#define M_IP_NEXTHOP M_PROTO2 /* explicit ip nexthop */
+#define M_SKIP_FIREWALL M_PROTO3 /* skip firewall processing */
+#define M_AUTHIPHDR M_PROTO4
+#define M_DECRYPTED M_PROTO5
+#define M_LOOP M_PROTO6
+#define M_AUTHIPDGM M_PROTO7
+#define M_RTALERT_MLD M_PROTO8
#ifdef _KERNEL
struct cmsghdr;
@@ -636,9 +663,13 @@ struct ip6_hdr;
int in6_cksum_pseudo(struct ip6_hdr *, uint32_t, uint8_t, uint16_t);
int in6_cksum(struct mbuf *, u_int8_t, u_int32_t, u_int32_t);
+int in6_cksum_partial(struct mbuf *, u_int8_t, u_int32_t, u_int32_t,
+ u_int32_t);
int in6_localaddr(struct in6_addr *);
int in6_localip(struct in6_addr *);
-int in6_addrscope(struct in6_addr *);
+int in6_ifhasaddr(struct ifnet *, struct in6_addr *);
+int in6_addrscope(const struct in6_addr *);
+char *ip6_sprintf(char *, const struct in6_addr *);
struct in6_ifaddr *in6_ifawithifp(struct ifnet *, struct in6_addr *);
extern void in6_if_up(struct ifnet *);
struct sockaddr;
@@ -656,7 +687,6 @@ extern void addrsel_policy_init(void);
#define sin6tosa(sin6) ((struct sockaddr *)(sin6))
#define ifatoia6(ifa) ((struct in6_ifaddr *)(ifa))
-extern int (*faithprefix_p)(struct in6_addr *);
#endif /* _KERNEL */
#ifndef _SIZE_T_DECLARED