[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: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Eric Dumazet 2007-02-09 16:14:24 -08:00 committed by David S. Miller
parent f7b14315fa
commit 75ce7ceaa1
1 changed files with 6 additions and 1 deletions

View File

@ -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;