c526537e157f0fee85db5c19b459673c3c46022c
[sliver-openvswitch.git] / datapath / linux / compat / include / linux / netfilter_bridge.h
1 #ifndef __LINUX_NETFILTER_BRIDGE_WRAPPER_H
2 #define __LINUX_NETFILTER_BRIDGE_WRAPPER_H
3
4 #include_next <linux/netfilter_bridge.h>
5
6 #include <linux/version.h>
7 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
8
9 #include <linux/if_vlan.h>
10 #include <linux/if_pppox.h>
11
12 static inline unsigned int nf_bridge_encap_header_len(const struct sk_buff *skb)
13 {
14         switch (skb->protocol) {
15         case __constant_htons(ETH_P_8021Q):
16                 return VLAN_HLEN;
17         default:
18                 return 0;
19         }
20 }
21
22 #endif /* linux version < 2.6.22 */
23
24 #endif