aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/tcp.h
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2008-04-19 12:17:34 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-04-19 12:17:34 -0400
commitcf816ecb533ab96b883dfdc0db174598b5b5c4d2 (patch)
tree1b7705db288ae2917105e624b01fdf81e0882bf1 /include/net/tcp.h
parentadf6d34e460387ee3e8f1e1875d52bff51212c7d (diff)
parent15f7d677ccff6f0f5de8a1ee43a792567e9f9de9 (diff)
Merge branch 'merge-fixes' into devel
Diffstat (limited to 'include/net/tcp.h')
-rw-r--r--include/net/tcp.h35
1 files changed, 25 insertions, 10 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 4fd3eb2f8ec2..633147cb6bbc 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -29,6 +29,7 @@
29#include <linux/skbuff.h> 29#include <linux/skbuff.h>
30#include <linux/dmaengine.h> 30#include <linux/dmaengine.h>
31#include <linux/crypto.h> 31#include <linux/crypto.h>
32#include <linux/cryptohash.h>
32 33
33#include <net/inet_connection_sock.h> 34#include <net/inet_connection_sock.h>
34#include <net/inet_timewait_sock.h> 35#include <net/inet_timewait_sock.h>
@@ -138,6 +139,7 @@ extern void tcp_time_wait(struct sock *sk, int state, int timeo);
138#define MAX_TCP_KEEPINTVL 32767 139#define MAX_TCP_KEEPINTVL 32767
139#define MAX_TCP_KEEPCNT 127 140#define MAX_TCP_KEEPCNT 127
140#define MAX_TCP_SYNCNT 127 141#define MAX_TCP_SYNCNT 127
142#define MAX_TCP_ACCEPT_DEFERRED 65535
141 143
142#define TCP_SYNQ_INTERVAL (HZ/5) /* Period of SYNACK timer */ 144#define TCP_SYNQ_INTERVAL (HZ/5) /* Period of SYNACK timer */
143 145
@@ -434,11 +436,20 @@ extern int tcp_disconnect(struct sock *sk, int flags);
434extern void tcp_unhash(struct sock *sk); 436extern void tcp_unhash(struct sock *sk);
435 437
436/* From syncookies.c */ 438/* From syncookies.c */
439extern __u32 syncookie_secret[2][16-4+SHA_DIGEST_WORDS];
437extern struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb, 440extern struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb,
438 struct ip_options *opt); 441 struct ip_options *opt);
439extern __u32 cookie_v4_init_sequence(struct sock *sk, struct sk_buff *skb, 442extern __u32 cookie_v4_init_sequence(struct sock *sk, struct sk_buff *skb,
440 __u16 *mss); 443 __u16 *mss);
441 444
445extern __u32 cookie_init_timestamp(struct request_sock *req);
446extern void cookie_check_timestamp(struct tcp_options_received *tcp_opt);
447
448/* From net/ipv6/syncookies.c */
449extern struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb);
450extern __u32 cookie_v6_init_sequence(struct sock *sk, struct sk_buff *skb,
451 __u16 *mss);
452
442/* tcp_output.c */ 453/* tcp_output.c */
443 454
444extern void __tcp_push_pending_frames(struct sock *sk, unsigned int cur_mss, 455extern void __tcp_push_pending_frames(struct sock *sk, unsigned int cur_mss,
@@ -776,11 +787,14 @@ extern void tcp_enter_cwr(struct sock *sk, const int set_ssthresh);
776extern __u32 tcp_init_cwnd(struct tcp_sock *tp, struct dst_entry *dst); 787extern __u32 tcp_init_cwnd(struct tcp_sock *tp, struct dst_entry *dst);
777 788
778/* Slow start with delack produces 3 packets of burst, so that 789/* Slow start with delack produces 3 packets of burst, so that
779 * it is safe "de facto". 790 * it is safe "de facto". This will be the default - same as
791 * the default reordering threshold - but if reordering increases,
792 * we must be able to allow cwnd to burst at least this much in order
793 * to not pull it back when holes are filled.
780 */ 794 */
781static __inline__ __u32 tcp_max_burst(const struct tcp_sock *tp) 795static __inline__ __u32 tcp_max_burst(const struct tcp_sock *tp)
782{ 796{
783 return 3; 797 return tp->reordering;
784} 798}
785 799
786/* Returns end sequence number of the receiver's advertised window */ 800/* Returns end sequence number of the receiver's advertised window */
@@ -950,6 +964,7 @@ static inline void tcp_openreq_init(struct request_sock *req,
950 struct inet_request_sock *ireq = inet_rsk(req); 964 struct inet_request_sock *ireq = inet_rsk(req);
951 965
952 req->rcv_wnd = 0; /* So that tcp_send_synack() knows! */ 966 req->rcv_wnd = 0; /* So that tcp_send_synack() knows! */
967 req->cookie_ts = 0;
953 tcp_rsk(req)->rcv_isn = TCP_SKB_CB(skb)->seq; 968 tcp_rsk(req)->rcv_isn = TCP_SKB_CB(skb)->seq;
954 req->mss = rx_opt->mss_clamp; 969 req->mss = rx_opt->mss_clamp;
955 req->ts_recent = rx_opt->saw_tstamp ? rx_opt->rcv_tsval : 0; 970 req->ts_recent = rx_opt->saw_tstamp ? rx_opt->rcv_tsval : 0;
@@ -1237,7 +1252,7 @@ static inline void tcp_insert_write_queue_after(struct sk_buff *skb,
1237 struct sk_buff *buff, 1252 struct sk_buff *buff,
1238 struct sock *sk) 1253 struct sock *sk)
1239{ 1254{
1240 __skb_append(skb, buff, &sk->sk_write_queue); 1255 __skb_queue_after(&sk->sk_write_queue, skb, buff);
1241} 1256}
1242 1257
1243/* Insert skb between prev and next on the write queue of sk. */ 1258/* Insert skb between prev and next on the write queue of sk. */
@@ -1315,25 +1330,25 @@ enum tcp_seq_states {
1315}; 1330};
1316 1331
1317struct tcp_seq_afinfo { 1332struct tcp_seq_afinfo {
1318 struct module *owner;
1319 char *name; 1333 char *name;
1320 sa_family_t family; 1334 sa_family_t family;
1321 int (*seq_show) (struct seq_file *m, void *v); 1335 struct file_operations seq_fops;
1322 struct file_operations *seq_fops; 1336 struct seq_operations seq_ops;
1323}; 1337};
1324 1338
1325struct tcp_iter_state { 1339struct tcp_iter_state {
1340 struct seq_net_private p;
1326 sa_family_t family; 1341 sa_family_t family;
1327 enum tcp_seq_states state; 1342 enum tcp_seq_states state;
1328 struct sock *syn_wait_sk; 1343 struct sock *syn_wait_sk;
1329 int bucket, sbucket, num, uid; 1344 int bucket, sbucket, num, uid;
1330 struct seq_operations seq_ops;
1331}; 1345};
1332 1346
1333extern int tcp_proc_register(struct tcp_seq_afinfo *afinfo); 1347extern int tcp_proc_register(struct net *net, struct tcp_seq_afinfo *afinfo);
1334extern void tcp_proc_unregister(struct tcp_seq_afinfo *afinfo); 1348extern void tcp_proc_unregister(struct net *net, struct tcp_seq_afinfo *afinfo);
1335 1349
1336extern struct request_sock_ops tcp_request_sock_ops; 1350extern struct request_sock_ops tcp_request_sock_ops;
1351extern struct request_sock_ops tcp6_request_sock_ops;
1337 1352
1338extern int tcp_v4_destroy_sock(struct sock *sk); 1353extern int tcp_v4_destroy_sock(struct sock *sk);
1339 1354
@@ -1375,7 +1390,7 @@ struct tcp_request_sock_ops {
1375#endif 1390#endif
1376}; 1391};
1377 1392
1378extern void tcp_v4_init(struct net_proto_family *ops); 1393extern void tcp_v4_init(void);
1379extern void tcp_init(void); 1394extern void tcp_init(void);
1380 1395
1381#endif /* _TCP_H */ 1396#endif /* _TCP_H */