2009-11-24 02:26:31

by Arnaud Lacombe

[permalink] [raw]
Subject: [PATCH 11/13] Add more `skb->dst' accessors

Signed-off-by: Arnaud Lacombe <[email protected]>
---
compat-2.6.31.h | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/compat-2.6.31.h b/compat-2.6.31.h
index a91e033..6b2dd5e 100644
--- a/compat-2.6.31.h
+++ b/compat-2.6.31.h
@@ -99,6 +99,21 @@ static inline void skb_dst_drop(struct sk_buff *skb)
skb->dst = NULL;
}

+static inline struct dst_entry *skb_dst(const struct sk_buff *skb)
+{
+ return (struct dst_entry *)skb->dst;
+}
+
+static inline void skb_dst_set(struct sk_buff *skb, struct dst_entry *dst)
+{
+ skb->dst = (unsigned long)dst;
+}
+
+static inline struct rtable *skb_rtable(const struct sk_buff *skb)
+{
+ return (struct rtable *)skb_dst(skb);
+}
+
extern int genl_register_family_with_ops(struct genl_family *family,
struct genl_ops *ops, size_t n_ops);

--
1.6.3.3.385.g60647.dirty