Skip to content

Commit

Permalink
[NET]: Introduce union in struct dst_entry to hold 'next' pointer
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Feb 11, 2007
1 parent f7b1431 commit 75ce7ce
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion include/net/dst.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 75ce7ce

Please sign in to comment.