1 #ifndef __LINUX_TCP_WRAPPER_H
2 #define __LINUX_TCP_WRAPPER_H 1
4 #include_next <linux/tcp.h>
7 #include <linux/skbuff.h>
9 static inline struct tcphdr *tcp_hdr(const struct sk_buff *skb)
11 return (struct tcphdr *)skb_transport_header(skb);
14 static inline unsigned int tcp_hdrlen(const struct sk_buff *skb)
16 return tcp_hdr(skb)->doff * 4;
19 static inline unsigned int tcp_optlen(const struct sk_buff *skb)
21 return (tcp_hdr(skb)->doff - 5) * 4;