]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - include/linux/skbuff.h
[SK_BUFF]: Introduce skb_network_header()
[net-next-2.6.git] / include / linux / skbuff.h
index dff81af454b7059994125c70a908d0cf3a4e2c06..76d30f34b98607992edab503e6e1a2dd45f40b31 100644 (file)
@@ -960,6 +960,21 @@ static inline void skb_reserve(struct sk_buff *skb, int len)
        skb->tail += len;
 }
 
+static inline unsigned char *skb_network_header(const struct sk_buff *skb)
+{
+       return skb->nh.raw;
+}
+
+static inline void skb_reset_network_header(struct sk_buff *skb)
+{
+       skb->nh.raw = skb->data;
+}
+
+static inline int skb_network_offset(const struct sk_buff *skb)
+{
+       return skb->nh.raw - skb->data;
+}
+
 static inline unsigned char *skb_mac_header(const struct sk_buff *skb)
 {
        return skb->mac.raw;