]> err.no Git - linux-2.6/blobdiff - include/linux/tcp.h
[PATCH] zd1211rw: Extend RF layer
[linux-2.6] / include / linux / tcp.h
index 415193e171e4c1a7eab24b2433351a298dd381f3..c6b9f92e8289949bde61f0ea384f48349d5a083f 100644 (file)
@@ -178,6 +178,21 @@ struct tcp_md5sig {
 #include <net/inet_connection_sock.h>
 #include <net/inet_timewait_sock.h>
 
+static inline struct tcphdr *tcp_hdr(const struct sk_buff *skb)
+{
+       return (struct tcphdr *)skb_transport_header(skb);
+}
+
+static inline unsigned int tcp_hdrlen(const struct sk_buff *skb)
+{
+       return tcp_hdr(skb)->doff * 4;
+}
+
+static inline unsigned int tcp_optlen(const struct sk_buff *skb)
+{
+       return (tcp_hdr(skb)->doff - 5) * 4;
+}
+
 /* This defines a selective acknowledgement block. */
 struct tcp_sack_block_wire {
        __be32  start_seq;
@@ -302,7 +317,7 @@ struct tcp_sock {
        u32     snd_ssthresh;   /* Slow start size threshold            */
        u32     snd_cwnd;       /* Sending congestion window            */
        u16     snd_cwnd_cnt;   /* Linear increase counter              */
-       u16     snd_cwnd_clamp; /* Do not allow snd_cwnd to grow above this */
+       u32     snd_cwnd_clamp; /* Do not allow snd_cwnd to grow above this */
        u32     snd_cwnd_used;
        u32     snd_cwnd_stamp;