mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-09 06:33:34 +00:00
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>
This commit is contained in:
parent
b4bc88a868
commit
55dc5a9f2f
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user