aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/tcp.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/tcp.h')
-rw-r--r--include/linux/tcp.h58
1 files changed, 31 insertions, 27 deletions
diff --git a/include/linux/tcp.h b/include/linux/tcp.h
index b31b6b74aa28..fe77e1499ab7 100644
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -224,6 +224,12 @@ struct tcp_options_received {
224 u16 mss_clamp; /* Maximal mss, negotiated at connection setup */ 224 u16 mss_clamp; /* Maximal mss, negotiated at connection setup */
225}; 225};
226 226
227/* This is the max number of SACKS that we'll generate and process. It's safe
228 * to increse this, although since:
229 * size = TCPOLEN_SACK_BASE_ALIGNED (4) + n * TCPOLEN_SACK_PERBLOCK (8)
230 * only four options will fit in a standard TCP header */
231#define TCP_NUM_SACKS 4
232
227struct tcp_request_sock { 233struct tcp_request_sock {
228 struct inet_request_sock req; 234 struct inet_request_sock req;
229#ifdef CONFIG_TCP_MD5SIG 235#ifdef CONFIG_TCP_MD5SIG
@@ -291,10 +297,9 @@ struct tcp_sock {
291 u32 rcv_ssthresh; /* Current window clamp */ 297 u32 rcv_ssthresh; /* Current window clamp */
292 298
293 u32 frto_highmark; /* snd_nxt when RTO occurred */ 299 u32 frto_highmark; /* snd_nxt when RTO occurred */
294 u8 reordering; /* Packet reordering metric. */ 300 u16 advmss; /* Advertised MSS */
295 u8 frto_counter; /* Number of new acks after RTO */ 301 u8 frto_counter; /* Number of new acks after RTO */
296 u8 nonagle; /* Disable Nagle algorithm? */ 302 u8 nonagle; /* Disable Nagle algorithm? */
297 u8 keepalive_probes; /* num of allowed keep alive probes */
298 303
299/* RTT measurement */ 304/* RTT measurement */
300 u32 srtt; /* smoothed round trip time << 3 */ 305 u32 srtt; /* smoothed round trip time << 3 */
@@ -305,6 +310,13 @@ struct tcp_sock {
305 310
306 u32 packets_out; /* Packets which are "in flight" */ 311 u32 packets_out; /* Packets which are "in flight" */
307 u32 retrans_out; /* Retransmitted packets out */ 312 u32 retrans_out; /* Retransmitted packets out */
313
314 u16 urg_data; /* Saved octet of OOB data and control flags */
315 u8 ecn_flags; /* ECN status bits. */
316 u8 reordering; /* Packet reordering metric. */
317 u32 snd_up; /* Urgent pointer */
318
319 u8 keepalive_probes; /* num of allowed keep alive probes */
308/* 320/*
309 * Options received (usually on last packet, some only on SYN packets). 321 * Options received (usually on last packet, some only on SYN packets).
310 */ 322 */
@@ -320,13 +332,23 @@ struct tcp_sock {
320 u32 snd_cwnd_used; 332 u32 snd_cwnd_used;
321 u32 snd_cwnd_stamp; 333 u32 snd_cwnd_stamp;
322 334
323 struct sk_buff_head out_of_order_queue; /* Out of order segments go here */
324
325 u32 rcv_wnd; /* Current receiver window */ 335 u32 rcv_wnd; /* Current receiver window */
326 u32 write_seq; /* Tail(+1) of data held in tcp send buffer */ 336 u32 write_seq; /* Tail(+1) of data held in tcp send buffer */
327 u32 pushed_seq; /* Last pushed seq, required to talk to windows */ 337 u32 pushed_seq; /* Last pushed seq, required to talk to windows */
338 u32 lost_out; /* Lost packets */
339 u32 sacked_out; /* SACK'd packets */
340 u32 fackets_out; /* FACK'd packets */
341 u32 tso_deferred;
342 u32 bytes_acked; /* Appropriate Byte Counting - RFC3465 */
328 343
329/* SACKs data */ 344 /* from STCP, retrans queue hinting */
345 struct sk_buff* lost_skb_hint;
346 struct sk_buff *scoreboard_skb_hint;
347 struct sk_buff *retransmit_skb_hint;
348
349 struct sk_buff_head out_of_order_queue; /* Out of order segments go here */
350
351 /* SACKs data, these 2 need to be together (see tcp_build_and_update_options) */
330 struct tcp_sack_block duplicate_sack[1]; /* D-SACK block */ 352 struct tcp_sack_block duplicate_sack[1]; /* D-SACK block */
331 struct tcp_sack_block selective_acks[4]; /* The SACKS themselves*/ 353 struct tcp_sack_block selective_acks[4]; /* The SACKS themselves*/
332 354
@@ -337,23 +359,12 @@ struct tcp_sock {
337 * sacked_out > 0) 359 * sacked_out > 0)
338 */ 360 */
339 361
340 /* from STCP, retrans queue hinting */
341 struct sk_buff* lost_skb_hint;
342
343 struct sk_buff *scoreboard_skb_hint;
344 struct sk_buff *retransmit_skb_hint;
345 struct sk_buff *forward_skb_hint;
346
347 int lost_cnt_hint; 362 int lost_cnt_hint;
348 int retransmit_cnt_hint; 363 u32 retransmit_high; /* L-bits may be on up to this seqno */
349 364
350 u32 lost_retrans_low; /* Sent seq after any rxmit (lowest) */ 365 u32 lost_retrans_low; /* Sent seq after any rxmit (lowest) */
351 366
352 u16 advmss; /* Advertised MSS */
353 u32 prior_ssthresh; /* ssthresh saved at recovery start */ 367 u32 prior_ssthresh; /* ssthresh saved at recovery start */
354 u32 lost_out; /* Lost packets */
355 u32 sacked_out; /* SACK'd packets */
356 u32 fackets_out; /* FACK'd packets */
357 u32 high_seq; /* snd_nxt at onset of congestion */ 368 u32 high_seq; /* snd_nxt at onset of congestion */
358 369
359 u32 retrans_stamp; /* Timestamp of the last retransmit, 370 u32 retrans_stamp; /* Timestamp of the last retransmit,
@@ -361,23 +372,14 @@ struct tcp_sock {
361 * the first SYN. */ 372 * the first SYN. */
362 u32 undo_marker; /* tracking retrans started here. */ 373 u32 undo_marker; /* tracking retrans started here. */
363 int undo_retrans; /* number of undoable retransmissions. */ 374 int undo_retrans; /* number of undoable retransmissions. */
364 u32 urg_seq; /* Seq of received urgent pointer */
365 u16 urg_data; /* Saved octet of OOB data and control flags */
366 u8 urg_mode; /* In urgent mode */
367 u8 ecn_flags; /* ECN status bits. */
368 u32 snd_up; /* Urgent pointer */
369
370 u32 total_retrans; /* Total retransmits for entire connection */ 375 u32 total_retrans; /* Total retransmits for entire connection */
371 u32 bytes_acked; /* Appropriate Byte Counting - RFC3465 */
372 376
377 u32 urg_seq; /* Seq of received urgent pointer */
373 unsigned int keepalive_time; /* time before keep alive takes place */ 378 unsigned int keepalive_time; /* time before keep alive takes place */
374 unsigned int keepalive_intvl; /* time interval between keep alive probes */ 379 unsigned int keepalive_intvl; /* time interval between keep alive probes */
375 int linger2;
376 380
377 unsigned long last_synq_overflow; 381 unsigned long last_synq_overflow;
378 382
379 u32 tso_deferred;
380
381/* Receiver side RTT estimation */ 383/* Receiver side RTT estimation */
382 struct { 384 struct {
383 u32 rtt; 385 u32 rtt;
@@ -405,6 +407,8 @@ struct tcp_sock {
405/* TCP MD5 Signagure Option information */ 407/* TCP MD5 Signagure Option information */
406 struct tcp_md5sig_info *md5sig_info; 408 struct tcp_md5sig_info *md5sig_info;
407#endif 409#endif
410
411 int linger2;
408}; 412};
409 413
410static inline struct tcp_sock *tcp_sk(const struct sock *sk) 414static inline struct tcp_sock *tcp_sk(const struct sock *sk)