summaryrefslogtreecommitdiffstats
path: root/include/linux/skbuff.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2007-03-13 13:51:52 -0300
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-25 22:25:17 -0700
commit967b05f64e27d04a4c8879addd0e1c52137e2c9e (patch)
treec2c7ab3f0284903222d6d0864deaedbd4766b9b8 /include/linux/skbuff.h
parentea2ae17d6443abddc79480dc9f7af8feacabddc4 (diff)
downloadblackbird-op-linux-967b05f64e27d04a4c8879addd0e1c52137e2c9e.tar.gz
blackbird-op-linux-967b05f64e27d04a4c8879addd0e1c52137e2c9e.zip
[SK_BUFF]: Introduce skb_set_transport_header
For the cases where the transport header is being set to a offset from skb->data. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r--include/linux/skbuff.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 64c3c1687e49..684292efa823 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -962,6 +962,12 @@ static inline void skb_reset_transport_header(struct sk_buff *skb)
skb->h.raw = skb->data;
}
+static inline void skb_set_transport_header(struct sk_buff *skb,
+ const int offset)
+{
+ skb->h.raw = skb->data + offset;
+}
+
static inline int skb_transport_offset(const struct sk_buff *skb)
{
return skb->h.raw - skb->data;
OpenPOWER on IntegriCloud