[SK_BUFF]: Introduce skb_reset_transport_header(skb)
[deliverable/linux.git] / include / linux / skbuff.h
index 6440c78fe625ddee7363bdfc7bc66b57995ce64c..7c1f1756e482dd587f00ea2237afd86f9b8e292a 100644 (file)
@@ -247,9 +247,6 @@ struct sk_buff {
        } h;
 
        union {
-               struct iphdr    *iph;
-               struct ipv6hdr  *ipv6h;
-               struct arphdr   *arph;
                unsigned char   *raw;
        } nh;
 
@@ -960,11 +957,31 @@ static inline void skb_reserve(struct sk_buff *skb, int len)
        skb->tail += len;
 }
 
+static inline void skb_reset_transport_header(struct sk_buff *skb)
+{
+       skb->h.raw = skb->data;
+}
+
+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 void skb_set_network_header(struct sk_buff *skb, const int offset)
+{
+       skb->nh.raw = skb->data + offset;
+}
+
+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;
This page took 0.025428 seconds and 5 git commands to generate.