diff options
author | Ingo Molnar <mingo@elte.hu> | 2010-03-15 08:17:33 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-03-15 08:17:33 +0100 |
commit | 12b8aeee3e51654fb95a3baff2e093f2513bb87d (patch) | |
tree | 73f78d62591b197cd53747e36a2f3d707b79a50b /include/net/ip6_route.h | |
parent | time: Add xtime, wall_to_monotonic to feature-removal-schedule (diff) | |
parent | Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 (diff) | |
download | linux-dev-12b8aeee3e51654fb95a3baff2e093f2513bb87d.tar.xz linux-dev-12b8aeee3e51654fb95a3baff2e093f2513bb87d.zip |
Merge branch 'linus' into timers/core
Conflicts:
Documentation/feature-removal-schedule.txt
Merge reason: Resolve the conflict, update to upstream.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/net/ip6_route.h')
-rw-r--r-- | include/net/ip6_route.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h index 4a808de7c0f6..68f67836e146 100644 --- a/include/net/ip6_route.h +++ b/include/net/ip6_route.h @@ -37,6 +37,24 @@ struct route_info { #define RT6_LOOKUP_F_SRCPREF_PUBLIC 0x00000010 #define RT6_LOOKUP_F_SRCPREF_COA 0x00000020 +/* + * rt6_srcprefs2flags() and rt6_flags2srcprefs() translate + * between IPV6_ADDR_PREFERENCES socket option values + * IPV6_PREFER_SRC_TMP = 0x1 + * IPV6_PREFER_SRC_PUBLIC = 0x2 + * IPV6_PREFER_SRC_COA = 0x4 + * and above RT6_LOOKUP_F_SRCPREF_xxx flags. + */ +static inline int rt6_srcprefs2flags(unsigned int srcprefs) +{ + /* No need to bitmask because srcprefs have only 3 bits. */ + return srcprefs << 3; +} + +static inline unsigned int rt6_flags2srcprefs(int flags) +{ + return (flags >> 3) & 7; +} extern void ip6_route_input(struct sk_buff *skb); |