ovsdb: Synchronize comments and code in ovsdb_file_commit().
[sliver-openvswitch.git] / datapath / linux / compat / include / linux / tcp.h
1 #ifndef __LINUX_TCP_WRAPPER_H
2 #define __LINUX_TCP_WRAPPER_H 1
3
4 #include_next <linux/tcp.h>
5
6 #ifndef HAVE_SKBUFF_HEADER_HELPERS
7 static inline struct tcphdr *tcp_hdr(const struct sk_buff *skb)
8 {
9         return (struct tcphdr *)skb_transport_header(skb);
10 }
11
12 static inline unsigned int tcp_hdrlen(const struct sk_buff *skb)
13 {
14         return tcp_hdr(skb)->doff * 4;
15 }
16 #endif /* !HAVE_SKBUFF_HEADER_HELPERS */
17
18 #endif