diff options
author | William Allen Simpson <william.allen.simpson@gmail.com> | 2009-12-02 13:14:19 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-12-03 01:07:24 -0500 |
commit | 519855c508b9a17878c0977a3cdefc09b59b30df (patch) | |
tree | df6840c5c1560a84cb777b1855ec22c90c3df8d9 /include/net/tcp.h | |
parent | da5c78c82629a167794436e4306b4cf1faddea90 (diff) |
TCPCT part 1c: sysctl_tcp_cookie_size, socket option TCP_COOKIE_TRANSACTIONS
Define sysctl (tcp_cookie_size) to turn on and off the cookie option
default globally, instead of a compiled configuration option.
Define per socket option (TCP_COOKIE_TRANSACTIONS) for setting constant
data values, retrieving variable cookie values, and other facilities.
Move inline tcp_clear_options() unchanged from net/tcp.h to linux/tcp.h,
near its corresponding struct tcp_options_received (prior to changes).
This is a straightforward re-implementation of an earlier (year-old)
patch that no longer applies cleanly, with permission of the original
author (Adam Langley):
http://thread.gmane.org/gmane.linux.network/102586
These functions will also be used in subsequent patches that implement
additional features.
Requires:
net: TCP_MSS_DEFAULT, TCP_MSS_DESIRED
Signed-off-by: William.Allen.Simpson@gmail.com
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/tcp.h')
-rw-r--r-- | include/net/tcp.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h index 4a99a8e39121..738b65f01e26 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -234,6 +234,7 @@ extern int sysctl_tcp_base_mss; | |||
234 | extern int sysctl_tcp_workaround_signed_windows; | 234 | extern int sysctl_tcp_workaround_signed_windows; |
235 | extern int sysctl_tcp_slow_start_after_idle; | 235 | extern int sysctl_tcp_slow_start_after_idle; |
236 | extern int sysctl_tcp_max_ssthresh; | 236 | extern int sysctl_tcp_max_ssthresh; |
237 | extern int sysctl_tcp_cookie_size; | ||
237 | 238 | ||
238 | extern atomic_t tcp_memory_allocated; | 239 | extern atomic_t tcp_memory_allocated; |
239 | extern struct percpu_counter tcp_sockets_allocated; | 240 | extern struct percpu_counter tcp_sockets_allocated; |
@@ -340,11 +341,6 @@ static inline void tcp_dec_quickack_mode(struct sock *sk, | |||
340 | 341 | ||
341 | extern void tcp_enter_quickack_mode(struct sock *sk); | 342 | extern void tcp_enter_quickack_mode(struct sock *sk); |
342 | 343 | ||
343 | static inline void tcp_clear_options(struct tcp_options_received *rx_opt) | ||
344 | { | ||
345 | rx_opt->tstamp_ok = rx_opt->sack_ok = rx_opt->wscale_ok = rx_opt->snd_wscale = 0; | ||
346 | } | ||
347 | |||
348 | #define TCP_ECN_OK 1 | 344 | #define TCP_ECN_OK 1 |
349 | #define TCP_ECN_QUEUE_CWR 2 | 345 | #define TCP_ECN_QUEUE_CWR 2 |
350 | #define TCP_ECN_DEMAND_CWR 4 | 346 | #define TCP_ECN_DEMAND_CWR 4 |