Lines Matching refs:sk
36 int (*queue_xmit)(struct sock *sk, struct sk_buff *skb, struct flowi *fl);
37 void (*send_check)(struct sock *sk, struct sk_buff *skb);
38 int (*rebuild_header)(struct sock *sk);
39 void (*sk_rx_dst_set)(struct sock *sk, const struct sk_buff *skb);
40 int (*conn_request)(struct sock *sk, struct sk_buff *skb);
41 struct sock *(*syn_recv_sock)(const struct sock *sk, struct sk_buff *skb,
47 int (*setsockopt)(struct sock *sk, int level, int optname,
49 int (*getsockopt)(struct sock *sk, int level, int optname,
51 void (*mtu_reduced)(struct sock *sk);
95 unsigned int (*icsk_sync_mss)(struct sock *sk, u32 pmtu);
145 #define inet_csk(ptr) container_of_const(ptr, struct inet_connection_sock, icsk_inet.sk)
147 static inline void *inet_csk_ca(const struct sock *sk) in inet_csk_ca() argument
149 return (void *)inet_csk(sk)->icsk_ca_priv; in inet_csk_ca()
152 struct sock *inet_csk_clone_lock(const struct sock *sk,
165 void inet_csk_init_xmit_timers(struct sock *sk,
169 void inet_csk_clear_xmit_timers(struct sock *sk);
170 void inet_csk_clear_xmit_timers_sync(struct sock *sk);
172 static inline void inet_csk_schedule_ack(struct sock *sk) in inet_csk_schedule_ack() argument
174 inet_csk(sk)->icsk_ack.pending |= ICSK_ACK_SCHED; in inet_csk_schedule_ack()
177 static inline int inet_csk_ack_scheduled(const struct sock *sk) in inet_csk_ack_scheduled() argument
179 return inet_csk(sk)->icsk_ack.pending & ICSK_ACK_SCHED; in inet_csk_ack_scheduled()
182 static inline void inet_csk_delack_init(struct sock *sk) in inet_csk_delack_init() argument
184 memset(&inet_csk(sk)->icsk_ack, 0, sizeof(inet_csk(sk)->icsk_ack)); in inet_csk_delack_init()
199 static inline void inet_csk_clear_xmit_timer(struct sock *sk, const int what) in inet_csk_clear_xmit_timer() argument
201 struct inet_connection_sock *icsk = inet_csk(sk); in inet_csk_clear_xmit_timer()
206 sk_stop_timer(sk, &icsk->icsk_retransmit_timer); in inet_csk_clear_xmit_timer()
212 sk_stop_timer(sk, &icsk->icsk_delack_timer); in inet_csk_clear_xmit_timer()
222 static inline void inet_csk_reset_xmit_timer(struct sock *sk, const int what, in inet_csk_reset_xmit_timer() argument
226 struct inet_connection_sock *icsk = inet_csk(sk); in inet_csk_reset_xmit_timer()
230 sk, what, when, (void *)_THIS_IP_); in inet_csk_reset_xmit_timer()
238 sk_reset_timer(sk, &icsk->icsk_retransmit_timer, when); in inet_csk_reset_xmit_timer()
242 sk_reset_timer(sk, &icsk->icsk_delack_timer, when); in inet_csk_reset_xmit_timer()
257 struct sock *inet_csk_accept(struct sock *sk, struct proto_accept_arg *arg);
259 int inet_csk_get_port(struct sock *sk, unsigned short snum);
261 struct dst_entry *inet_csk_route_req(const struct sock *sk, struct flowi4 *fl4,
263 struct dst_entry *inet_csk_route_child_sock(const struct sock *sk,
267 struct sock *inet_csk_reqsk_queue_add(struct sock *sk,
270 bool inet_csk_reqsk_queue_hash_add(struct sock *sk, struct request_sock *req,
272 struct sock *inet_csk_complete_hashdance(struct sock *sk, struct sock *child,
276 static inline void inet_csk_reqsk_queue_added(struct sock *sk) in inet_csk_reqsk_queue_added() argument
278 reqsk_queue_added(&inet_csk(sk)->icsk_accept_queue); in inet_csk_reqsk_queue_added()
281 static inline int inet_csk_reqsk_queue_len(const struct sock *sk) in inet_csk_reqsk_queue_len() argument
283 return reqsk_queue_len(&inet_csk(sk)->icsk_accept_queue); in inet_csk_reqsk_queue_len()
286 static inline int inet_csk_reqsk_queue_is_full(const struct sock *sk) in inet_csk_reqsk_queue_is_full() argument
288 return inet_csk_reqsk_queue_len(sk) > READ_ONCE(sk->sk_max_ack_backlog); in inet_csk_reqsk_queue_is_full()
291 bool inet_csk_reqsk_queue_drop(struct sock *sk, struct request_sock *req);
292 void inet_csk_reqsk_queue_drop_and_put(struct sock *sk, struct request_sock *req);
302 static inline void inet_csk_prepare_for_destroy_sock(struct sock *sk) in inet_csk_prepare_for_destroy_sock() argument
305 sock_set_flag(sk, SOCK_DEAD); in inet_csk_prepare_for_destroy_sock()
306 this_cpu_inc(*sk->sk_prot->orphan_count); in inet_csk_prepare_for_destroy_sock()
309 void inet_csk_destroy_sock(struct sock *sk);
310 void inet_csk_prepare_forced_close(struct sock *sk);
315 static inline __poll_t inet_csk_listen_poll(const struct sock *sk) in inet_csk_listen_poll() argument
317 return !reqsk_queue_empty(&inet_csk(sk)->icsk_accept_queue) ? in inet_csk_listen_poll()
321 int inet_csk_listen_start(struct sock *sk);
322 void inet_csk_listen_stop(struct sock *sk);
326 struct sock *sk);
328 struct dst_entry *inet_csk_update_pmtu(struct sock *sk, u32 mtu);
330 static inline void inet_csk_enter_pingpong_mode(struct sock *sk) in inet_csk_enter_pingpong_mode() argument
332 inet_csk(sk)->icsk_ack.pingpong = in inet_csk_enter_pingpong_mode()
333 READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_pingpong_thresh); in inet_csk_enter_pingpong_mode()
336 static inline void inet_csk_exit_pingpong_mode(struct sock *sk) in inet_csk_exit_pingpong_mode() argument
338 inet_csk(sk)->icsk_ack.pingpong = 0; in inet_csk_exit_pingpong_mode()
341 static inline bool inet_csk_in_pingpong_mode(struct sock *sk) in inet_csk_in_pingpong_mode() argument
343 return inet_csk(sk)->icsk_ack.pingpong >= in inet_csk_in_pingpong_mode()
344 READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_pingpong_thresh); in inet_csk_in_pingpong_mode()
347 static inline void inet_csk_inc_pingpong_cnt(struct sock *sk) in inet_csk_inc_pingpong_cnt() argument
349 struct inet_connection_sock *icsk = inet_csk(sk); in inet_csk_inc_pingpong_cnt()
355 static inline bool inet_csk_has_ulp(const struct sock *sk) in inet_csk_has_ulp() argument
357 return inet_test_bit(IS_ICSK, sk) && !!inet_csk(sk)->icsk_ulp_ops; in inet_csk_has_ulp()
360 static inline void inet_init_csk_locks(struct sock *sk) in inet_init_csk_locks() argument
362 struct inet_connection_sock *icsk = inet_csk(sk); in inet_init_csk_locks()