aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/skbuff.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r--include/linux/skbuff.h26
1 files changed, 24 insertions, 2 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index d8f7d74d5a4d..7c5036d11feb 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -596,7 +596,8 @@ struct sk_buff {
596 __u8 ndisc_nodetype:2; 596 __u8 ndisc_nodetype:2;
597#endif 597#endif
598 __u8 ipvs_property:1; 598 __u8 ipvs_property:1;
599 /* 5 or 7 bit hole */ 599 __u8 inner_protocol_type:1;
600 /* 4 or 6 bit hole */
600 601
601#ifdef CONFIG_NET_SCHED 602#ifdef CONFIG_NET_SCHED
602 __u16 tc_index; /* traffic control index */ 603 __u16 tc_index; /* traffic control index */
@@ -632,7 +633,11 @@ struct sk_buff {
632 __u32 reserved_tailroom; 633 __u32 reserved_tailroom;
633 }; 634 };
634 635
635 __be16 inner_protocol; 636 union {
637 __be16 inner_protocol;
638 __u8 inner_ipproto;
639 };
640
636 __u16 inner_transport_header; 641 __u16 inner_transport_header;
637 __u16 inner_network_header; 642 __u16 inner_network_header;
638 __u16 inner_mac_header; 643 __u16 inner_mac_header;
@@ -1762,6 +1767,23 @@ static inline void skb_reserve(struct sk_buff *skb, int len)
1762 skb->tail += len; 1767 skb->tail += len;
1763} 1768}
1764 1769
1770#define ENCAP_TYPE_ETHER 0
1771#define ENCAP_TYPE_IPPROTO 1
1772
1773static inline void skb_set_inner_protocol(struct sk_buff *skb,
1774 __be16 protocol)
1775{
1776 skb->inner_protocol = protocol;
1777 skb->inner_protocol_type = ENCAP_TYPE_ETHER;
1778}
1779
1780static inline void skb_set_inner_ipproto(struct sk_buff *skb,
1781 __u8 ipproto)
1782{
1783 skb->inner_ipproto = ipproto;
1784 skb->inner_protocol_type = ENCAP_TYPE_IPPROTO;
1785}
1786
1765static inline void skb_reset_inner_headers(struct sk_buff *skb) 1787static inline void skb_reset_inner_headers(struct sk_buff *skb)
1766{ 1788{
1767 skb->inner_mac_header = skb->mac_header; 1789 skb->inner_mac_header = skb->mac_header;