diff options
Diffstat (limited to 'include/net/inet_connection_sock.h')
-rw-r--r-- | include/net/inet_connection_sock.h | 35 |
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 | ||
259 | struct sock *inet_csk_accept(struct sock *sk, int flags, int *err); | 261 | struct sock *inet_csk_accept(struct sock *sk, int flags, int *err); |
260 | 262 | ||
261 | struct request_sock *inet_csk_search_req(struct sock *sk, | ||
262 | const __be16 rport, | ||
263 | const __be32 raddr, | ||
264 | const __be32 laddr); | ||
265 | int inet_csk_bind_conflict(const struct sock *sk, | 263 | int 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); |
267 | int inet_csk_get_port(struct sock *sk, unsigned short snum); | 265 | int inet_csk_get_port(struct sock *sk, unsigned short snum); |
268 | 266 | ||
269 | struct dst_entry *inet_csk_route_req(struct sock *sk, struct flowi4 *fl4, | 267 | struct 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); |
271 | struct dst_entry *inet_csk_route_child_sock(struct sock *sk, struct sock *newsk, | 269 | struct 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 | ||
274 | static inline void inet_csk_reqsk_queue_add(struct sock *sk, | 273 | void 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 | |||
281 | void inet_csk_reqsk_queue_hash_add(struct sock *sk, struct request_sock *req, | 275 | void inet_csk_reqsk_queue_hash_add(struct sock *sk, struct request_sock *req, |
282 | unsigned long timeout); | 276 | unsigned long timeout); |
277 | struct sock *inet_csk_complete_hashdance(struct sock *sk, struct sock *child, | ||
278 | struct request_sock *req, | ||
279 | bool own_req); | ||
283 | 280 | ||
284 | static inline void inet_csk_reqsk_queue_added(struct sock *sk, | 281 | static 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 | ||
300 | static inline int inet_csk_reqsk_queue_is_full(const struct sock *sk) | 296 | static 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 | ||
305 | void inet_csk_reqsk_queue_drop(struct sock *sk, struct request_sock *req); | 301 | void inet_csk_reqsk_queue_drop(struct sock *sk, struct request_sock *req); |
302 | void inet_csk_reqsk_queue_drop_and_put(struct sock *sk, struct request_sock *req); | ||
306 | 303 | ||
307 | void inet_csk_destroy_sock(struct sock *sk); | 304 | void inet_csk_destroy_sock(struct sock *sk); |
308 | void inet_csk_prepare_forced_close(struct sock *sk); | 305 | void 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 | ||
319 | int inet_csk_listen_start(struct sock *sk, const int nr_table_entries); | 316 | int inet_csk_listen_start(struct sock *sk, int backlog); |
320 | void inet_csk_listen_stop(struct sock *sk); | 317 | void inet_csk_listen_stop(struct sock *sk); |
321 | 318 | ||
322 | void inet_csk_addr2sockaddr(struct sock *sk, struct sockaddr *uaddr); | 319 | void inet_csk_addr2sockaddr(struct sock *sk, struct sockaddr *uaddr); |