diff options
author | Tom Herbert <tom@herbertland.com> | 2015-12-14 11:19:40 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-12-15 16:49:57 -0500 |
commit | 55dc5a9f2f2afd32d7b1bda44a5fc95e67a3371f (patch) | |
tree | c514375cba59d0ba55b3db5aa71267d140e7f804 /include/linux/skbuff.h | |
parent | b4bc88a868edb878827499f0fb049b9f83fc2710 (diff) |
net: Add skb_inner_transport_offset function
Same thing as skb_transport_offset but returns the offset of the inner
transport header (when skb->encpasulation is set).
Signed-off-by: Tom Herbert <tom@herbertland.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r-- | include/linux/skbuff.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index af4f6ac025b6..2393373c9d08 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -1939,6 +1939,11 @@ static inline unsigned char *skb_inner_transport_header(const struct sk_buff return skb->head + skb->inner_transport_header; } +static inline int skb_inner_transport_offset(const struct sk_buff *skb) +{ + return skb_inner_transport_header(skb) - skb->data; +} + static inline void skb_reset_inner_transport_header(struct sk_buff *skb) { skb->inner_transport_header = skb->data - skb->head; |