[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>
This commit is contained in:
committed by
David S. Miller
parent
ea2ae17d64
commit
967b05f64e
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user