projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
58be242
)
net/skbuff: Introduce skb_mac_offset()
author
Amir Vadai
<
[email protected]
>
Tue, 7 Feb 2017 07:56:06 +0000
(09:56 +0200)
committer
David S. Miller
<
[email protected]
>
Fri, 10 Feb 2017 18:18:33 +0000
(13:18 -0500)
Introduce skb_mac_offset() that could be used to get mac header offset.
Signed-off-by: Amir Vadai <
[email protected]
>
Reviewed-by: Or Gerlitz <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
include/linux/skbuff.h
patch
|
blob
|
history
diff --git
a/include/linux/skbuff.h
b/include/linux/skbuff.h
index f1adddc1c5ac67c350e280d89abc3f3c10e2dbac..69ccd26369112031a9c47b246da6e94d576c1ebd 100644
(file)
--- a/
include/linux/skbuff.h
+++ b/
include/linux/skbuff.h
@@
-2184,6
+2184,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;