aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2008-03-24 20:37:42 -0400
committerYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2008-03-24 21:24:01 -0400
commit7cbca67c073263c179f605bdbbdc565ab29d801d (patch)
tree124ce8c81f3e033790416d3d16bd23e2f7bfed07 /include
parent1d5d236d309ab90fa6aedf712f586b3595721373 (diff)
[IPV6]: Support Source Address Selection API (RFC5014).
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/in6.h11
-rw-r--r--include/linux/ipv6.h6
-rw-r--r--include/net/addrconf.h1
-rw-r--r--include/net/ip6_route.h9
4 files changed, 23 insertions, 4 deletions
diff --git a/include/linux/in6.h b/include/linux/in6.h
index 2a61c82af115..f674000c6c99 100644
--- a/include/linux/in6.h
+++ b/include/linux/in6.h
@@ -249,4 +249,15 @@ struct in6_flowlabel_req
249 * IP6T_SO_GET_REVISION_TARGET 69 249 * IP6T_SO_GET_REVISION_TARGET 69
250 */ 250 */
251 251
252/* RFC5014: Source address selection */
253#define IPV6_ADDR_PREFERENCES 72
254
255#define IPV6_PREFER_SRC_TMP 0x0001
256#define IPV6_PREFER_SRC_PUBLIC 0x0002
257#define IPV6_PREFER_SRC_PUBTMP_DEFAULT 0x0100
258#define IPV6_PREFER_SRC_COA 0x0004
259#define IPV6_PREFER_SRC_HOME 0x0400
260#define IPV6_PREFER_SRC_CGA 0x0008
261#define IPV6_PREFER_SRC_NONCGA 0x0800
262
252#endif 263#endif
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h
index 87ae4e389ce1..c9ba0da16ce9 100644
--- a/include/linux/ipv6.h
+++ b/include/linux/ipv6.h
@@ -322,7 +322,11 @@ struct ipv6_pinfo {
322 __u8 recverr:1, 322 __u8 recverr:1,
323 sndflow:1, 323 sndflow:1,
324 pmtudisc:2, 324 pmtudisc:2,
325 ipv6only:1; 325 ipv6only:1,
326 srcprefs:3; /* 001: prefer temporary address
327 * 010: prefer public address
328 * 100: prefer care-of address
329 */
326 __u8 tclass; 330 __u8 tclass;
327 331
328 __u32 dst_cookie; 332 __u32 dst_cookie;
diff --git a/include/net/addrconf.h b/include/net/addrconf.h
index edcb4bbaab7d..c9276c72764d 100644
--- a/include/net/addrconf.h
+++ b/include/net/addrconf.h
@@ -78,6 +78,7 @@ extern struct inet6_ifaddr *ipv6_get_ifaddr(struct net *net,
78 78
79extern int ipv6_dev_get_saddr(struct net_device *dev, 79extern int ipv6_dev_get_saddr(struct net_device *dev,
80 struct in6_addr *daddr, 80 struct in6_addr *daddr,
81 unsigned int srcprefs,
81 struct in6_addr *saddr); 82 struct in6_addr *saddr);
82extern int ipv6_get_lladdr(struct net_device *dev, 83extern int ipv6_get_lladdr(struct net_device *dev,
83 struct in6_addr *addr, 84 struct in6_addr *addr,
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h
index 5c3b67c86aef..3ae6799c2b14 100644
--- a/include/net/ip6_route.h
+++ b/include/net/ip6_route.h
@@ -30,9 +30,12 @@ struct route_info {
30#include <linux/ip.h> 30#include <linux/ip.h>
31#include <linux/ipv6.h> 31#include <linux/ipv6.h>
32 32
33#define RT6_LOOKUP_F_IFACE 0x1 33#define RT6_LOOKUP_F_IFACE 0x00000001
34#define RT6_LOOKUP_F_REACHABLE 0x2 34#define RT6_LOOKUP_F_REACHABLE 0x00000002
35#define RT6_LOOKUP_F_HAS_SADDR 0x4 35#define RT6_LOOKUP_F_HAS_SADDR 0x00000004
36#define RT6_LOOKUP_F_SRCPREF_TMP 0x00000008
37#define RT6_LOOKUP_F_SRCPREF_PUBLIC 0x00000010
38#define RT6_LOOKUP_F_SRCPREF_COA 0x00000020
36 39
37extern struct rt6_info *ip6_null_entry; 40extern struct rt6_info *ip6_null_entry;
38 41