summaryrefslogtreecommitdiffstats
path: root/sys/netinet6/ip6_var.h
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2003-11-04 20:22:33 +0000
committerume <ume@FreeBSD.org>2003-11-04 20:22:33 +0000
commit41930d5085a3db8a98276354d742fd4bd5d2bcdc (patch)
tree3ed0ed6cb3790bc3d6f177c4e14cd2ab91640de7 /sys/netinet6/ip6_var.h
parent51a7ecabf175e87ddc5bf4b21224e08d6cd9f202 (diff)
downloadFreeBSD-src-41930d5085a3db8a98276354d742fd4bd5d2bcdc.zip
FreeBSD-src-41930d5085a3db8a98276354d742fd4bd5d2bcdc.tar.gz
source address selection part of RFC3484.
TODO: since there is scope issue to be solved, multicast and link-local address are treated as special for workaround for now. Obtained from: KAME
Diffstat (limited to 'sys/netinet6/ip6_var.h')
-rw-r--r--sys/netinet6/ip6_var.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/netinet6/ip6_var.h b/sys/netinet6/ip6_var.h
index fecb610..42377bc 100644
--- a/sys/netinet6/ip6_var.h
+++ b/sys/netinet6/ip6_var.h
@@ -244,6 +244,9 @@ struct ip6stat {
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];
};
#ifdef _KERNEL
@@ -322,6 +325,8 @@ extern int ip6_lowportmin; /* minimum reserved port */
extern int ip6_lowportmax; /* maximum reserved port */
extern int ip6_use_tempaddr; /* whether to use temporary addresses. */
+extern int ip6_prefer_tempaddr; /* whether to prefer temporary addresses
+ in the source address selection */
#ifdef PFIL_HOOKS
extern struct pfil_head inet6_pfil_hook;
@@ -392,6 +397,12 @@ int rip6_usrreq __P((struct socket *,
int dest6_input __P((struct mbuf **, int *, int));
int none_input __P((struct mbuf **, int *, int));
+struct in6_addr *in6_selectsrc __P((struct sockaddr_in6 *,
+ struct ip6_pktopts *, struct ip6_moptions *, struct route_in6 *,
+ struct in6_addr *, int *));
+int in6_selectroute __P((struct sockaddr_in6 *, struct ip6_pktopts *,
+ struct ip6_moptions *, struct route_in6 *, struct ifnet **,
+ struct rtentry **, int));
#ifdef RANDOM_IP_ID
u_int32_t ip6_randomid __P((void));
u_int32_t ip6_randomflowlabel __P((void));
OpenPOWER on IntegriCloud