aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/inet_connection_sock.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/inet_connection_sock.h')
-rw-r--r--include/net/inet_connection_sock.h35
1 files changed, 16 insertions, 19 deletions
diff --git a/include/net/inet_connection_sock.h b/include/net/inet_connection_sock.h
index 0320bbb7d7b5..481fe1c9044c 100644
--- a/include/net/inet_connection_sock.h
+++ b/include/net/inet_connection_sock.h
@@ -41,9 +41,11 @@ struct inet_connection_sock_af_ops {
41 int (*rebuild_header)(struct sock *sk); 41 int (*rebuild_header)(struct sock *sk);
42 void (*sk_rx_dst_set)(struct sock *sk, const struct sk_buff *skb); 42 void (*sk_rx_dst_set)(struct sock *sk, const struct sk_buff *skb);
43 int (*conn_request)(struct sock *sk, struct sk_buff *skb); 43 int (*conn_request)(struct sock *sk, struct sk_buff *skb);
44 struct sock *(*syn_recv_sock)(struct sock *sk, struct sk_buff *skb, 44 struct sock *(*syn_recv_sock)(const struct sock *sk, struct sk_buff *skb,
45 struct request_sock *req, 45 struct request_sock *req,
46 struct dst_entry *dst); 46 struct dst_entry *dst,
47 struct request_sock *req_unhash,
48 bool *own_req);
47 u16 net_header_len; 49 u16 net_header_len;
48 u16 net_frag_header_len; 50 u16 net_frag_header_len;
49 u16 sockaddr_len; 51 u16 sockaddr_len;
@@ -258,31 +260,25 @@ inet_csk_rto_backoff(const struct inet_connection_sock *icsk,
258 260
259struct sock *inet_csk_accept(struct sock *sk, int flags, int *err); 261struct sock *inet_csk_accept(struct sock *sk, int flags, int *err);
260 262
261struct request_sock *inet_csk_search_req(struct sock *sk,
262 const __be16 rport,
263 const __be32 raddr,
264 const __be32 laddr);
265int inet_csk_bind_conflict(const struct sock *sk, 263int inet_csk_bind_conflict(const struct sock *sk,
266 const struct inet_bind_bucket *tb, bool relax); 264 const struct inet_bind_bucket *tb, bool relax);
267int inet_csk_get_port(struct sock *sk, unsigned short snum); 265int inet_csk_get_port(struct sock *sk, unsigned short snum);
268 266
269struct dst_entry *inet_csk_route_req(struct sock *sk, struct flowi4 *fl4, 267struct dst_entry *inet_csk_route_req(const struct sock *sk, struct flowi4 *fl4,
270 const struct request_sock *req); 268 const struct request_sock *req);
271struct dst_entry *inet_csk_route_child_sock(struct sock *sk, struct sock *newsk, 269struct dst_entry *inet_csk_route_child_sock(const struct sock *sk,
270 struct sock *newsk,
272 const struct request_sock *req); 271 const struct request_sock *req);
273 272
274static inline void inet_csk_reqsk_queue_add(struct sock *sk, 273void inet_csk_reqsk_queue_add(struct sock *sk, struct request_sock *req,
275 struct request_sock *req, 274 struct sock *child);
276 struct sock *child)
277{
278 reqsk_queue_add(&inet_csk(sk)->icsk_accept_queue, req, sk, child);
279}
280
281void inet_csk_reqsk_queue_hash_add(struct sock *sk, struct request_sock *req, 275void inet_csk_reqsk_queue_hash_add(struct sock *sk, struct request_sock *req,
282 unsigned long timeout); 276 unsigned long timeout);
277struct sock *inet_csk_complete_hashdance(struct sock *sk, struct sock *child,
278 struct request_sock *req,
279 bool own_req);
283 280
284static inline void inet_csk_reqsk_queue_added(struct sock *sk, 281static inline void inet_csk_reqsk_queue_added(struct sock *sk)
285 const unsigned long timeout)
286{ 282{
287 reqsk_queue_added(&inet_csk(sk)->icsk_accept_queue); 283 reqsk_queue_added(&inet_csk(sk)->icsk_accept_queue);
288} 284}
@@ -299,10 +295,11 @@ static inline int inet_csk_reqsk_queue_young(const struct sock *sk)
299 295
300static inline int inet_csk_reqsk_queue_is_full(const struct sock *sk) 296static inline int inet_csk_reqsk_queue_is_full(const struct sock *sk)
301{ 297{
302 return reqsk_queue_is_full(&inet_csk(sk)->icsk_accept_queue); 298 return inet_csk_reqsk_queue_len(sk) >= sk->sk_max_ack_backlog;
303} 299}
304 300
305void inet_csk_reqsk_queue_drop(struct sock *sk, struct request_sock *req); 301void inet_csk_reqsk_queue_drop(struct sock *sk, struct request_sock *req);
302void inet_csk_reqsk_queue_drop_and_put(struct sock *sk, struct request_sock *req);
306 303
307void inet_csk_destroy_sock(struct sock *sk); 304void inet_csk_destroy_sock(struct sock *sk);
308void inet_csk_prepare_forced_close(struct sock *sk); 305void inet_csk_prepare_forced_close(struct sock *sk);
@@ -316,7 +313,7 @@ static inline unsigned int inet_csk_listen_poll(const struct sock *sk)
316 (POLLIN | POLLRDNORM) : 0; 313 (POLLIN | POLLRDNORM) : 0;
317} 314}
318 315
319int inet_csk_listen_start(struct sock *sk, const int nr_table_entries); 316int inet_csk_listen_start(struct sock *sk, int backlog);
320void inet_csk_listen_stop(struct sock *sk); 317void inet_csk_listen_stop(struct sock *sk);
321 318
322void inet_csk_addr2sockaddr(struct sock *sk, struct sockaddr *uaddr); 319void inet_csk_addr2sockaddr(struct sock *sk, struct sockaddr *uaddr);