diff options
| author | Wim Van Sebroeck <wim@iguana.be> | 2007-05-01 02:53:01 -0400 |
|---|---|---|
| committer | Wim Van Sebroeck <wim@iguana.be> | 2007-05-01 02:53:01 -0400 |
| commit | 48a7afe314bfc4d7f50e1608632f503dbba7e013 (patch) | |
| tree | 4a80e6b96321a71affd1bacea817de93be08894b /include/linux/tcp.h | |
| parent | fb8f7ba077b5c665432082ab205bcd2cb01f6a3c (diff) | |
| parent | dc87c3985e9b442c60994308a96f887579addc39 (diff) | |
Merge /pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'include/linux/tcp.h')
| -rw-r--r-- | include/linux/tcp.h | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/include/linux/tcp.h b/include/linux/tcp.h index 29d3089038ab..c6b9f92e8289 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h | |||
| @@ -178,6 +178,21 @@ 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 struct tcphdr *tcp_hdr(const struct sk_buff *skb) | ||
| 182 | { | ||
| 183 | return (struct tcphdr *)skb_transport_header(skb); | ||
| 184 | } | ||
| 185 | |||
| 186 | static inline unsigned int tcp_hdrlen(const struct sk_buff *skb) | ||
| 187 | { | ||
| 188 | return tcp_hdr(skb)->doff * 4; | ||
| 189 | } | ||
| 190 | |||
| 191 | static inline unsigned int tcp_optlen(const struct sk_buff *skb) | ||
| 192 | { | ||
| 193 | return (tcp_hdr(skb)->doff - 5) * 4; | ||
| 194 | } | ||
| 195 | |||
| 181 | /* This defines a selective acknowledgement block. */ | 196 | /* This defines a selective acknowledgement block. */ |
| 182 | struct tcp_sack_block_wire { | 197 | struct tcp_sack_block_wire { |
| 183 | __be32 start_seq; | 198 | __be32 start_seq; |
| @@ -242,6 +257,8 @@ struct tcp_sock { | |||
| 242 | * See RFC793 and RFC1122. The RFC writes these in capitals. | 257 | * See RFC793 and RFC1122. The RFC writes these in capitals. |
| 243 | */ | 258 | */ |
| 244 | u32 rcv_nxt; /* What we want to receive next */ | 259 | u32 rcv_nxt; /* What we want to receive next */ |
| 260 | u32 copied_seq; /* Head of yet unread data */ | ||
| 261 | u32 rcv_wup; /* rcv_nxt on last window update sent */ | ||
| 245 | u32 snd_nxt; /* Next sequence we send */ | 262 | u32 snd_nxt; /* Next sequence we send */ |
| 246 | 263 | ||
| 247 | u32 snd_una; /* First byte we want an ack for */ | 264 | u32 snd_una; /* First byte we want an ack for */ |
| @@ -300,17 +317,15 @@ struct tcp_sock { | |||
| 300 | u32 snd_ssthresh; /* Slow start size threshold */ | 317 | u32 snd_ssthresh; /* Slow start size threshold */ |
| 301 | u32 snd_cwnd; /* Sending congestion window */ | 318 | u32 snd_cwnd; /* Sending congestion window */ |
| 302 | u16 snd_cwnd_cnt; /* Linear increase counter */ | 319 | u16 snd_cwnd_cnt; /* Linear increase counter */ |
| 303 | u16 snd_cwnd_clamp; /* Do not allow snd_cwnd to grow above this */ | 320 | u32 snd_cwnd_clamp; /* Do not allow snd_cwnd to grow above this */ |
| 304 | u32 snd_cwnd_used; | 321 | u32 snd_cwnd_used; |
| 305 | u32 snd_cwnd_stamp; | 322 | u32 snd_cwnd_stamp; |
| 306 | 323 | ||
| 307 | struct sk_buff_head out_of_order_queue; /* Out of order segments go here */ | 324 | struct sk_buff_head out_of_order_queue; /* Out of order segments go here */ |
| 308 | 325 | ||
| 309 | u32 rcv_wnd; /* Current receiver window */ | 326 | u32 rcv_wnd; /* Current receiver window */ |
| 310 | u32 rcv_wup; /* rcv_nxt on last window update sent */ | ||
| 311 | u32 write_seq; /* Tail(+1) of data held in tcp send buffer */ | 327 | u32 write_seq; /* Tail(+1) of data held in tcp send buffer */ |
| 312 | u32 pushed_seq; /* Last pushed seq, required to talk to windows */ | 328 | u32 pushed_seq; /* Last pushed seq, required to talk to windows */ |
| 313 | u32 copied_seq; /* Head of yet unread data */ | ||
| 314 | 329 | ||
| 315 | /* SACKs data */ | 330 | /* SACKs data */ |
| 316 | struct tcp_sack_block duplicate_sack[1]; /* D-SACK block */ | 331 | struct tcp_sack_block duplicate_sack[1]; /* D-SACK block */ |
