提交 75ce7cea 编写于 作者: E Eric Dumazet 提交者: David S. Miller

[NET]: Introduce union in struct dst_entry to hold 'next' pointer

This patch introduces an anonymous union to nicely express the fact that all
objects inherited from struct dst_entry should access to the generic 'next'
pointer but with appropriate type verification.

This patch is a prereq before following patches.
Signed-off-by: NEric Dumazet <dada1@cosmosbay.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 f7b14315
......@@ -37,7 +37,12 @@ struct sk_buff;
struct dst_entry
{
struct dst_entry *next;
union {
struct dst_entry *next;
struct rtable *rt_next;
struct rt6_info *rt6_next;
struct dn_route *dn_next;
};
atomic_t __refcnt; /* client references */
int __use;
struct dst_entry *child;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册