Initial import
[openvswitch] / datapath / linux-2.4 / compat-2.4 / 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 #ifdef __KERNEL__
7 #include <linux/skbuff.h>
8
9 static inline struct tcphdr *tcp_hdr(const struct sk_buff *skb)
10 {
11         return (struct tcphdr *)skb_transport_header(skb);
12 }
13
14 static inline unsigned int tcp_hdrlen(const struct sk_buff *skb)
15 {
16         return tcp_hdr(skb)->doff * 4;
17 }
18
19 static inline unsigned int tcp_optlen(const struct sk_buff *skb)
20 {
21         return (tcp_hdr(skb)->doff - 5) * 4;
22 }
23 #endif
24
25 #endif