Message ID | 20170207075608.8430-2-amir@vadai.me |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index c6a78e1892b6..a1b73b794a38 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -2182,6 +2182,11 @@ static inline unsigned char *skb_mac_header(const struct sk_buff *skb) return skb->head + skb->mac_header; } +static inline int skb_mac_offset(const struct sk_buff *skb) +{ + return skb_mac_header(skb) - skb->data; +} + static inline int skb_mac_header_was_set(const struct sk_buff *skb) { return skb->mac_header != (typeof(skb->mac_header))~0U;