summaryrefslogtreecommitdiffstats
path: root/include/net/ip6_fib.h
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2006-10-13 09:17:25 +0200
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-03 06:22:07 +0100
commit7a3025b1b3a0173be5de6ced18754b909da27b38 (patch)
treedbb121ce5b9e2e97ee1e022093249eb2ed7cc3be /include/net/ip6_fib.h
parent[IPV6] ROUTE: Use &rt->u.dst instead of cast. (diff)
downloadlinux-7a3025b1b3a0173be5de6ced18754b909da27b38.tar.xz
linux-7a3025b1b3a0173be5de6ced18754b909da27b38.zip
[IPV6]: Introduce ip6_dst_idev() to get inet6_dev{} stored in dst_entry{}.
Otherwise, we will see a lot of casts... Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Diffstat (limited to 'include/net/ip6_fib.h')
-rw-r--r--include/net/ip6_fib.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h
index e4438de3bd6b..f9cde44f93b4 100644
--- a/include/net/ip6_fib.h
+++ b/include/net/ip6_fib.h
@@ -107,6 +107,11 @@ struct rt6_info
u8 rt6i_protocol;
};
+static inline struct inet6_dev *ip6_dst_idev(struct dst_entry *dst)
+{
+ return ((struct rt6_info *)dst)->rt6i_idev;
+}
+
struct fib6_walker_t
{
struct fib6_walker_t *prev, *next;