aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/tcp.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/tcp.h')
-rw-r--r--include/net/tcp.h22
1 files changed, 12 insertions, 10 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 5cf9672c13e2..6630ab180f5c 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -461,7 +461,7 @@ struct sock *tcp_v4_syn_recv_sock(struct sock *sk, struct sk_buff *skb,
461int tcp_v4_do_rcv(struct sock *sk, struct sk_buff *skb); 461int tcp_v4_do_rcv(struct sock *sk, struct sk_buff *skb);
462int tcp_v4_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len); 462int tcp_v4_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len);
463int tcp_connect(struct sock *sk); 463int tcp_connect(struct sock *sk);
464struct sk_buff *tcp_make_synack(struct sock *sk, struct dst_entry *dst, 464struct sk_buff *tcp_make_synack(const struct sock *sk, struct dst_entry *dst,
465 struct request_sock *req, 465 struct request_sock *req,
466 struct tcp_fastopen_cookie *foc); 466 struct tcp_fastopen_cookie *foc);
467int tcp_disconnect(struct sock *sk, int flags); 467int tcp_disconnect(struct sock *sk, int flags);
@@ -1207,7 +1207,8 @@ static inline int tcp_full_space(const struct sock *sk)
1207} 1207}
1208 1208
1209extern void tcp_openreq_init_rwin(struct request_sock *req, 1209extern void tcp_openreq_init_rwin(struct request_sock *req,
1210 struct sock *sk, struct dst_entry *dst); 1210 const struct sock *sk_listener,
1211 const struct dst_entry *dst);
1211 1212
1212void tcp_enter_memory_pressure(struct sock *sk); 1213void tcp_enter_memory_pressure(struct sock *sk);
1213 1214
@@ -1371,16 +1372,16 @@ int tcp_md5_do_add(struct sock *sk, const union tcp_md5_addr *addr,
1371 int family, const u8 *newkey, u8 newkeylen, gfp_t gfp); 1372 int family, const u8 *newkey, u8 newkeylen, gfp_t gfp);
1372int tcp_md5_do_del(struct sock *sk, const union tcp_md5_addr *addr, 1373int tcp_md5_do_del(struct sock *sk, const union tcp_md5_addr *addr,
1373 int family); 1374 int family);
1374struct tcp_md5sig_key *tcp_v4_md5_lookup(struct sock *sk, 1375struct tcp_md5sig_key *tcp_v4_md5_lookup(const struct sock *sk,
1375 const struct sock *addr_sk); 1376 const struct sock *addr_sk);
1376 1377
1377#ifdef CONFIG_TCP_MD5SIG 1378#ifdef CONFIG_TCP_MD5SIG
1378struct tcp_md5sig_key *tcp_md5_do_lookup(struct sock *sk, 1379struct tcp_md5sig_key *tcp_md5_do_lookup(const struct sock *sk,
1379 const union tcp_md5_addr *addr, 1380 const union tcp_md5_addr *addr,
1380 int family); 1381 int family);
1381#define tcp_twsk_md5_key(twsk) ((twsk)->tw_md5_key) 1382#define tcp_twsk_md5_key(twsk) ((twsk)->tw_md5_key)
1382#else 1383#else
1383static inline struct tcp_md5sig_key *tcp_md5_do_lookup(struct sock *sk, 1384static inline struct tcp_md5sig_key *tcp_md5_do_lookup(const struct sock *sk,
1384 const union tcp_md5_addr *addr, 1385 const union tcp_md5_addr *addr,
1385 int family) 1386 int family)
1386{ 1387{
@@ -1675,7 +1676,7 @@ int tcp4_proc_init(void);
1675void tcp4_proc_exit(void); 1676void tcp4_proc_exit(void);
1676#endif 1677#endif
1677 1678
1678int tcp_rtx_synack(struct sock *sk, struct request_sock *req); 1679int tcp_rtx_synack(const struct sock *sk, struct request_sock *req);
1679int tcp_conn_request(struct request_sock_ops *rsk_ops, 1680int tcp_conn_request(struct request_sock_ops *rsk_ops,
1680 const struct tcp_request_sock_ops *af_ops, 1681 const struct tcp_request_sock_ops *af_ops,
1681 struct sock *sk, struct sk_buff *skb); 1682 struct sock *sk, struct sk_buff *skb);
@@ -1683,7 +1684,7 @@ int tcp_conn_request(struct request_sock_ops *rsk_ops,
1683/* TCP af-specific functions */ 1684/* TCP af-specific functions */
1684struct tcp_sock_af_ops { 1685struct tcp_sock_af_ops {
1685#ifdef CONFIG_TCP_MD5SIG 1686#ifdef CONFIG_TCP_MD5SIG
1686 struct tcp_md5sig_key *(*md5_lookup) (struct sock *sk, 1687 struct tcp_md5sig_key *(*md5_lookup) (const struct sock *sk,
1687 const struct sock *addr_sk); 1688 const struct sock *addr_sk);
1688 int (*calc_md5_hash)(char *location, 1689 int (*calc_md5_hash)(char *location,
1689 const struct tcp_md5sig_key *md5, 1690 const struct tcp_md5sig_key *md5,
@@ -1698,14 +1699,15 @@ struct tcp_sock_af_ops {
1698struct tcp_request_sock_ops { 1699struct tcp_request_sock_ops {
1699 u16 mss_clamp; 1700 u16 mss_clamp;
1700#ifdef CONFIG_TCP_MD5SIG 1701#ifdef CONFIG_TCP_MD5SIG
1701 struct tcp_md5sig_key *(*req_md5_lookup)(struct sock *sk, 1702 struct tcp_md5sig_key *(*req_md5_lookup)(const struct sock *sk,
1702 const struct sock *addr_sk); 1703 const struct sock *addr_sk);
1703 int (*calc_md5_hash) (char *location, 1704 int (*calc_md5_hash) (char *location,
1704 const struct tcp_md5sig_key *md5, 1705 const struct tcp_md5sig_key *md5,
1705 const struct sock *sk, 1706 const struct sock *sk,
1706 const struct sk_buff *skb); 1707 const struct sk_buff *skb);
1707#endif 1708#endif
1708 void (*init_req)(struct request_sock *req, struct sock *sk, 1709 void (*init_req)(struct request_sock *req,
1710 const struct sock *sk_listener,
1709 struct sk_buff *skb); 1711 struct sk_buff *skb);
1710#ifdef CONFIG_SYN_COOKIES 1712#ifdef CONFIG_SYN_COOKIES
1711 __u32 (*cookie_init_seq)(struct sock *sk, const struct sk_buff *skb, 1713 __u32 (*cookie_init_seq)(struct sock *sk, const struct sk_buff *skb,
@@ -1715,7 +1717,7 @@ struct tcp_request_sock_ops {
1715 const struct request_sock *req, 1717 const struct request_sock *req,
1716 bool *strict); 1718 bool *strict);
1717 __u32 (*init_seq)(const struct sk_buff *skb); 1719 __u32 (*init_seq)(const struct sk_buff *skb);
1718 int (*send_synack)(struct sock *sk, struct dst_entry *dst, 1720 int (*send_synack)(const struct sock *sk, struct dst_entry *dst,
1719 struct flowi *fl, struct request_sock *req, 1721 struct flowi *fl, struct request_sock *req,
1720 u16 queue_mapping, struct tcp_fastopen_cookie *foc); 1722 u16 queue_mapping, struct tcp_fastopen_cookie *foc);
1721 void (*queue_hash_add)(struct sock *sk, struct request_sock *req, 1723 void (*queue_hash_add)(struct sock *sk, struct request_sock *req,