Skip to content

Commit 55dc5a9

Browse files
tomratbertdavem330
authored andcommitted
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>
1 parent b4bc88a commit 55dc5a9

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎include/linux/skbuff.h‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1939,6 +1939,11 @@ static inline unsigned char *skb_inner_transport_header(const struct sk_buff
19391939
return skb->head + skb->inner_transport_header;
19401940
}
19411941

1942+
static inline int skb_inner_transport_offset(const struct sk_buff *skb)
1943+
{
1944+
return skb_inner_transport_header(skb) - skb->data;
1945+
}
1946+
19421947
static inline void skb_reset_inner_transport_header(struct sk_buff *skb)
19431948
{
19441949
skb->inner_transport_header = skb->data - skb->head;

0 commit comments

Comments
 (0)