diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/tcp.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/tcp.h b/include/linux/tcp.h index 18a468dd5055..244ae0dacf4a 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h | |||
@@ -178,6 +178,16 @@ struct tcp_md5sig { | |||
178 | #include <net/inet_connection_sock.h> | 178 | #include <net/inet_connection_sock.h> |
179 | #include <net/inet_timewait_sock.h> | 179 | #include <net/inet_timewait_sock.h> |
180 | 180 | ||
181 | static inline unsigned int tcp_hdrlen(const struct sk_buff *skb) | ||
182 | { | ||
183 | return skb->h.th->doff * 4; | ||
184 | } | ||
185 | |||
186 | static inline unsigned int tcp_optlen(const struct sk_buff *skb) | ||
187 | { | ||
188 | return (skb->h.th->doff - 5) * 4; | ||
189 | } | ||
190 | |||
181 | /* This defines a selective acknowledgement block. */ | 191 | /* This defines a selective acknowledgement block. */ |
182 | struct tcp_sack_block_wire { | 192 | struct tcp_sack_block_wire { |
183 | __be32 start_seq; | 193 | __be32 start_seq; |