Lines Matching refs:sock

36 #include <net/sock.h>
54 void tcp_time_wait(struct sock *sk, int state, int timeo);
263 static inline bool tcp_under_memory_pressure(const struct sock *sk)
288 static inline bool tcp_out_of_memory(struct sock *sk)
296 static inline void tcp_wmem_free_skb(struct sock *sk, struct sk_buff *skb)
306 void sk_forced_mem_schedule(struct sock *sk, int size);
308 bool tcp_check_oom(struct sock *sk, int shift);
322 void tcp_shutdown(struct sock *sk, int how);
327 void tcp_remove_empty_skb(struct sock *sk);
328 int tcp_sendmsg(struct sock *sk, struct msghdr *msg, size_t size);
329 int tcp_sendmsg_locked(struct sock *sk, struct msghdr *msg, size_t size);
330 int tcp_sendmsg_fastopen(struct sock *sk, struct msghdr *msg, int *copied,
332 void tcp_splice_eof(struct socket *sock);
333 int tcp_send_mss(struct sock *sk, int *size_goal, int flags);
334 int tcp_wmem_schedule(struct sock *sk, int copy);
335 void tcp_push(struct sock *sk, int flags, int mss_now, int nonagle,
337 void tcp_release_cb(struct sock *sk);
339 void tcp_write_timer_handler(struct sock *sk);
340 void tcp_delack_timer_handler(struct sock *sk);
341 int tcp_ioctl(struct sock *sk, int cmd, int *karg);
342 int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb);
343 void tcp_rcv_established(struct sock *sk, struct sk_buff *skb);
344 void tcp_rcv_space_adjust(struct sock *sk);
345 int tcp_twsk_unique(struct sock *sk, struct sock *sktw, void *twp);
346 void tcp_twsk_destructor(struct sock *sk);
351 struct sk_buff *tcp_stream_alloc_skb(struct sock *sk, gfp_t gfp,
354 static inline void tcp_dec_quickack_mode(struct sock *sk)
387 struct sock *tcp_check_req(struct sock *sk, struct sk_buff *skb,
390 int tcp_child_process(struct sock *parent, struct sock *child,
392 void tcp_enter_loss(struct sock *sk);
393 void tcp_cwnd_reduction(struct sock *sk, int newly_acked_sacked, int newly_lost, int flag);
395 void tcp_update_metrics(struct sock *sk);
396 void tcp_init_metrics(struct sock *sk);
399 void __tcp_close(struct sock *sk, long timeout);
400 void tcp_close(struct sock *sk, long timeout);
401 void tcp_init_sock(struct sock *sk);
402 void tcp_init_transfer(struct sock *sk, int bpf_op, struct sk_buff *skb);
403 __poll_t tcp_poll(struct file *file, struct socket *sock,
405 int do_tcp_getsockopt(struct sock *sk, int level,
407 int tcp_getsockopt(struct sock *sk, int level, int optname,
410 int do_tcp_setsockopt(struct sock *sk, int level, int optname,
412 int tcp_setsockopt(struct sock *sk, int level, int optname, sockptr_t optval,
414 void tcp_set_keepalive(struct sock *sk, int val);
416 int tcp_recvmsg(struct sock *sk, struct msghdr *msg, size_t len,
418 int tcp_set_rcvlowat(struct sock *sk, int val);
419 int tcp_set_window_clamp(struct sock *sk, int val);
422 void tcp_recv_timestamp(struct msghdr *msg, const struct sock *sk,
424 void tcp_data_ready(struct sock *sk);
426 int tcp_mmap(struct file *file, struct socket *sock,
437 u16 tcp_v4_get_syncookie(struct sock *sk, struct iphdr *iph,
439 u16 tcp_v6_get_syncookie(struct sock *sk, struct ipv6hdr *iph,
444 struct sock *sk, struct tcphdr *th);
449 void tcp_v4_send_check(struct sock *sk, struct sk_buff *skb);
450 void tcp_v4_mtu_reduced(struct sock *sk);
451 void tcp_req_err(struct sock *sk, u32 seq, bool abort);
452 void tcp_ld_RTO_revert(struct sock *sk, u32 seq);
453 int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb);
454 struct sock *tcp_create_openreq_child(const struct sock *sk,
457 void tcp_ca_openreq_child(struct sock *sk, const struct dst_entry *dst);
458 struct sock *tcp_v4_syn_recv_sock(const struct sock *sk, struct sk_buff *skb,
463 int tcp_v4_do_rcv(struct sock *sk, struct sk_buff *skb);
464 int tcp_v4_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len);
465 int tcp_connect(struct sock *sk);
471 struct sk_buff *tcp_make_synack(const struct sock *sk, struct dst_entry *dst,
476 int tcp_disconnect(struct sock *sk, int flags);
478 void tcp_finish_connect(struct sock *sk, struct sk_buff *skb);
479 int tcp_send_rcvq(struct sock *sk, struct msghdr *msg, size_t size);
480 void inet_sk_rx_dst_set(struct sock *sk, const struct sk_buff *skb);
483 struct sock *tcp_get_cookie_sock(struct sock *sk, struct sk_buff *skb,
488 struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb);
491 struct sock *sk, struct sk_buff *skb);
509 static inline void tcp_synq_overflow(const struct sock *sk)
533 static inline bool tcp_synq_no_recent_overflow(const struct sock *sk)
583 struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb);
591 void tcp_skb_entail(struct sock *sk, struct sk_buff *skb);
593 void __tcp_push_pending_frames(struct sock *sk, unsigned int cur_mss,
595 int __tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb, int segs);
596 int tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb, int segs);
597 void tcp_retransmit_timer(struct sock *sk);
598 void tcp_xmit_retransmit_queue(struct sock *);
599 void tcp_simple_retransmit(struct sock *);
600 void tcp_enter_recovery(struct sock *sk, bool ece_ack);
601 int tcp_trim_head(struct sock *, struct sk_buff *, u32);
606 int tcp_fragment(struct sock *sk, enum tcp_queue tcp_queue,
610 void tcp_send_probe0(struct sock *);
611 int tcp_write_wakeup(struct sock *, int mib);
612 void tcp_send_fin(struct sock *sk);
613 void tcp_send_active_reset(struct sock *sk, gfp_t priority);
614 int tcp_send_synack(struct sock *);
615 void tcp_push_one(struct sock *, unsigned int mss_now);
616 void __tcp_send_ack(struct sock *sk, u32 rcv_nxt);
617 void tcp_send_ack(struct sock *sk);
618 void tcp_send_delayed_ack(struct sock *sk);
619 void tcp_send_loss_probe(struct sock *sk);
620 bool tcp_schedule_loss_probe(struct sock *sk, bool advancing_rto);
625 void tcp_rearm_rto(struct sock *sk);
626 void tcp_synack_rtt_meas(struct sock *sk, struct request_sock *req);
627 void tcp_reset(struct sock *sk, struct sk_buff *skb);
628 void tcp_fin(struct sock *sk);
629 void tcp_check_space(struct sock *sk);
630 void tcp_sack_compress_send_ack(struct sock *sk);
633 void tcp_init_xmit_timers(struct sock *);
634 static inline void tcp_clear_xmit_timers(struct sock *sk)
645 unsigned int tcp_sync_mss(struct sock *sk, u32 pmtu);
646 unsigned int tcp_current_mss(struct sock *sk);
647 u32 tcp_clamp_probe0_to_user_timeout(const struct sock *sk, u32 when);
673 void tcp_get_info(struct sock *, struct tcp_info *);
676 int tcp_read_sock(struct sock *sk, read_descriptor_t *desc,
678 int tcp_read_skb(struct sock *sk, skb_read_actor_t recv_actor);
679 struct sk_buff *tcp_recv_skb(struct sock *sk, u32 seq, u32 *off);
680 void tcp_read_done(struct sock *sk, size_t len);
682 void tcp_initialize_rcv_mss(struct sock *sk);
684 int tcp_mtu_to_mss(struct sock *sk, int pmtu);
685 int tcp_mss_to_mtu(struct sock *sk, int mss);
686 void tcp_mtup_init(struct sock *sk);
688 static inline void tcp_bound_rto(const struct sock *sk)
702 if (sk_is_mptcp((struct sock *)tp))
715 static inline void tcp_fast_path_check(struct sock *sk)
726 u32 tcp_delack_max(const struct sock *sk);
729 static inline u32 tcp_rto_min(struct sock *sk)
739 static inline u32 tcp_rto_min_us(struct sock *sk)
772 u32 __tcp_select_window(struct sock *sk);
774 void tcp_send_window_probe(struct sock *sk);
944 INDIRECT_CALLABLE_DECLARE(void tcp_v6_send_check(struct sock *sk, struct sk_buff *skb));
1068 u32 (*ssthresh)(struct sock *sk);
1071 void (*cong_avoid)(struct sock *sk, u32 ack, u32 acked);
1074 void (*set_state)(struct sock *sk, u8 new_state);
1077 void (*cwnd_event)(struct sock *sk, enum tcp_ca_event ev);
1080 void (*in_ack_event)(struct sock *sk, u32 flags);
1083 void (*pkts_acked)(struct sock *sk, const struct ack_sample *sample);
1086 u32 (*min_tso_segs)(struct sock *sk);
1091 void (*cong_control)(struct sock *sk, const struct rate_sample *rs);
1095 u32 (*undo_cwnd)(struct sock *sk);
1097 u32 (*sndbuf_expand)(struct sock *sk);
1101 size_t (*get_info)(struct sock *sk, u32 ext, int *attr,
1111 void (*init)(struct sock *sk);
1113 void (*release)(struct sock *sk);
1122 void tcp_assign_congestion_control(struct sock *sk);
1123 void tcp_init_congestion_control(struct sock *sk);
1124 void tcp_cleanup_congestion_control(struct sock *sk);
1130 int tcp_set_congestion_control(struct sock *sk, const char *name, bool load,
1135 u32 tcp_reno_ssthresh(struct sock *sk);
1136 u32 tcp_reno_undo_cwnd(struct sock *sk);
1137 void tcp_reno_cong_avoid(struct sock *sk, u32 ack, u32 acked);
1152 static inline bool tcp_ca_needs_ecn(const struct sock *sk)
1159 static inline void tcp_ca_event(struct sock *sk, const enum tcp_ca_event event)
1168 void tcp_set_ca_state(struct sock *sk, const u8 ca_state);
1171 void tcp_rate_skb_sent(struct sock *sk, struct sk_buff *skb);
1172 void tcp_rate_skb_delivered(struct sock *sk, struct sk_buff *skb,
1174 void tcp_rate_gen(struct sock *sk, u32 delivered, u32 lost,
1176 void tcp_rate_check_app_limited(struct sock *sk);
1247 static inline bool tcp_in_cwnd_reduction(const struct sock *sk)
1257 static inline __u32 tcp_current_ssthresh(const struct sock *sk)
1272 void tcp_enter_cwr(struct sock *sk);
1302 static inline bool tcp_is_cwnd_limited(const struct sock *sk)
1322 static inline bool tcp_needs_internal_pacing(const struct sock *sk)
1330 static inline unsigned long tcp_pacing_delay(const struct sock *sk)
1337 static inline void tcp_reset_xmit_timer(struct sock *sk,
1352 static inline unsigned long tcp_probe0_base(const struct sock *sk)
1358 static inline unsigned long tcp_probe0_when(const struct sock *sk,
1368 static inline void tcp_check_probe_timer(struct sock *sk)
1400 bool tcp_add_backlog(struct sock *sk, struct sk_buff *skb,
1404 int tcp_filter(struct sock *sk, struct sk_buff *skb);
1405 void tcp_set_state(struct sock *sk, int state);
1406 void tcp_done(struct sock *sk);
1407 int tcp_abort(struct sock *sk, int err);
1415 void tcp_cwnd_restart(struct sock *sk, s32 delta);
1417 static inline void tcp_slow_start_after_idle_check(struct sock *sk)
1432 void tcp_select_initial_window(const struct sock *sk, int __space,
1444 static inline int tcp_win_from_space(const struct sock *sk, int space)
1458 static inline int tcp_space_from_win(const struct sock *sk, int win)
1463 static inline void tcp_scaling_ratio_init(struct sock *sk)
1473 static inline int tcp_space(const struct sock *sk)
1480 static inline int tcp_full_space(const struct sock *sk)
1485 static inline void __tcp_adjust_rcv_ssthresh(struct sock *sk, u32 new_ssthresh)
1496 static inline void tcp_adjust_rcv_ssthresh(struct sock *sk)
1501 void tcp_cleanup_rbuf(struct sock *sk, int copied);
1502 void __tcp_cleanup_rbuf(struct sock *sk, int copied);
1510 static inline bool tcp_rmem_pressure(const struct sock *sk)
1523 static inline bool tcp_epollin_ready(const struct sock *sk, int target)
1536 const struct sock *sk_listener,
1539 void tcp_enter_memory_pressure(struct sock *sk);
1540 void tcp_leave_memory_pressure(struct sock *sk);
1544 struct net *net = sock_net((struct sock *)tp);
1557 struct net *net = sock_net((struct sock *)tp);
1568 struct net *net = sock_net((struct sock *)tp);
1587 static inline int tcp_fin_time(const struct sock *sk)
1685 /* - sock block */
1722 const struct sock *sk, const struct sk_buff *skb);
1723 int tcp_md5_do_add(struct sock *sk, const union tcp_md5_addr *addr,
1726 int tcp_md5_key_copy(struct sock *sk, const union tcp_md5_addr *addr,
1730 int tcp_md5_do_del(struct sock *sk, const union tcp_md5_addr *addr,
1732 struct tcp_md5sig_key *tcp_v4_md5_lookup(const struct sock *sk,
1733 const struct sock *addr_sk);
1738 struct tcp_md5sig_key *__tcp_md5_do_lookup(const struct sock *sk, int l3index,
1742 tcp_md5_do_lookup(const struct sock *sk, int l3index,
1751 tcp_inbound_md5_hash(const struct sock *sk, const struct sk_buff *skb,
1759 tcp_md5_do_lookup(const struct sock *sk, int l3index,
1766 tcp_inbound_md5_hash(const struct sock *sk, const struct sk_buff *skb,
1789 void tcp_fastopen_cache_get(struct sock *sk, u16 *mss,
1791 void tcp_fastopen_cache_set(struct sock *sk, u16 mss,
1803 void tcp_fastopen_destroy_cipher(struct sock *sk);
1805 int tcp_fastopen_reset_cipher(struct net *net, struct sock *sk,
1809 void tcp_fastopen_add_skb(struct sock *sk, struct sk_buff *skb);
1810 struct sock *tcp_try_fastopen(struct sock *sk, struct sk_buff *skb,
1815 bool tcp_fastopen_cookie_check(struct sock *sk, u16 *mss,
1817 bool tcp_fastopen_defer_connect(struct sock *sk, int *err);
1830 void tcp_fastopen_active_disable(struct sock *sk);
1831 bool tcp_fastopen_active_should_disable(struct sock *sk);
1832 void tcp_fastopen_active_disable_ofo_check(struct sock *sk);
1833 void tcp_fastopen_active_detect_blackhole(struct sock *sk, bool expired);
1837 struct tcp_fastopen_context *tcp_fastopen_get_ctx(const struct sock *sk)
1875 void tcp_chrono_start(struct sock *sk, const enum tcp_chrono type);
1876 void tcp_chrono_stop(struct sock *sk, const enum tcp_chrono type);
1895 void tcp_write_queue_purge(struct sock *sk);
1897 static inline struct sk_buff *tcp_rtx_queue_head(const struct sock *sk)
1902 static inline struct sk_buff *tcp_rtx_queue_tail(const struct sock *sk)
1907 static inline struct sk_buff *tcp_write_queue_tail(const struct sock *sk)
1915 static inline struct sk_buff *tcp_send_head(const struct sock *sk)
1920 static inline bool tcp_skb_is_last(const struct sock *sk,
1933 static inline bool tcp_write_queue_empty(const struct sock *sk)
1940 static inline bool tcp_rtx_queue_empty(const struct sock *sk)
1945 static inline bool tcp_rtx_and_write_queues_empty(const struct sock *sk)
1950 static inline void tcp_add_write_queue_tail(struct sock *sk, struct sk_buff *skb)
1962 struct sock *sk)
1967 static inline void tcp_unlink_write_queue(struct sk_buff *skb, struct sock *sk)
1975 static inline void tcp_rtx_queue_unlink(struct sk_buff *skb, struct sock *sk)
1981 static inline void tcp_rtx_queue_unlink_and_free(struct sk_buff *skb, struct sock *sk)
1988 static inline void tcp_push_pending_frames(struct sock *sk)
2012 static inline void tcp_advance_highest_sack(struct sock *sk, struct sk_buff *skb)
2017 static inline struct sk_buff *tcp_highest_sack(struct sock *sk)
2022 static inline void tcp_highest_sack_reset(struct sock *sk)
2028 static inline void tcp_highest_sack_replace(struct sock *sk,
2037 static inline bool inet_sk_transparent(const struct sock *sk)
2073 struct sock *syn_wait_sk;
2081 void tcp_v4_destroy_sock(struct sock *sk);
2096 struct net *net = sock_net((struct sock *)tp);
2104 bool tcp_stream_memory_free(const struct sock *sk, int wake);
2111 int tcp_rtx_synack(const struct sock *sk, struct request_sock *req);
2114 struct sock *sk, struct sk_buff *skb);
2119 struct tcp_md5sig_key *(*md5_lookup) (const struct sock *sk,
2120 const struct sock *addr_sk);
2123 const struct sock *sk,
2125 int (*md5_parse)(struct sock *sk,
2135 struct tcp_md5sig_key *(*req_md5_lookup)(const struct sock *sk,
2136 const struct sock *addr_sk);
2139 const struct sock *sk,
2146 struct dst_entry *(*route_req)(const struct sock *sk,
2152 int (*send_synack)(const struct sock *sk, struct dst_entry *dst,
2166 const struct sock *sk, struct sk_buff *skb,
2175 const struct sock *sk, struct sk_buff *skb,
2188 void tcp_mark_skb_lost(struct sock *sk, struct sk_buff *skb);
2189 void tcp_newreno_mark_lost(struct sock *sk, bool snd_una_advanced);
2192 extern bool tcp_rack_mark_lost(struct sock *sk);
2195 extern void tcp_rack_reo_timeout(struct sock *sk);
2196 extern void tcp_rack_update_reo_wnd(struct sock *sk, struct rate_sample *rs);
2215 static inline void tcp_plb_init(const struct sock *sk,
2221 void tcp_plb_update_state(const struct sock *sk, struct tcp_plb_state *plb,
2223 void tcp_plb_check_rehash(struct sock *sk, struct tcp_plb_state *plb);
2224 void tcp_plb_update_state_upon_rto(struct sock *sk, struct tcp_plb_state *plb);
2227 static inline s64 tcp_rto_delta_us(const struct sock *sk)
2272 static inline int tcp_inq(struct sock *sk)
2296 int tcp_peek_len(struct socket *sock);
2314 * We forced "struct sock" to be const qualified to make sure
2317 * make sock writable again.
2319 static inline void tcp_listendrop(const struct sock *sk)
2321 atomic_inc(&((struct sock *)sk)->sk_drops);
2339 int (*init)(struct sock *sk);
2341 void (*update)(struct sock *sk, struct proto *p,
2342 void (*write_space)(struct sock *sk));
2344 void (*release)(struct sock *sk);
2346 int (*get_info)(struct sock *sk, struct sk_buff *skb);
2347 size_t (*get_info_size)(const struct sock *sk);
2349 void (*clone)(const struct request_sock *req, struct sock *newsk,
2357 int tcp_set_ulp(struct sock *sk, const char *name);
2359 void tcp_cleanup_ulp(struct sock *sk);
2360 void tcp_update_ulp(struct sock *sk, struct proto *p,
2361 void (*write_space)(struct sock *sk));
2372 int tcp_bpf_update_proto(struct sock *sk, struct sk_psock *psock, bool restore);
2373 void tcp_bpf_clone(const struct sock *sk, struct sock *newsk);
2377 void tcp_eat_skb(struct sock *sk, struct sk_buff *skb);
2379 static inline void tcp_eat_skb(struct sock *sk, struct sk_buff *skb)
2384 int tcp_bpf_sendmsg_redir(struct sock *sk, bool ingress,
2389 static inline void tcp_bpf_clone(const struct sock *sk, struct sock *newsk)
2416 static inline int tcp_call_bpf(struct sock *sk, int op, u32 nargs, u32 *args)
2440 static inline int tcp_call_bpf_2arg(struct sock *sk, int op, u32 arg1, u32 arg2)
2447 static inline int tcp_call_bpf_3arg(struct sock *sk, int op, u32 arg1, u32 arg2,
2456 static inline int tcp_call_bpf(struct sock *sk, int op, u32 nargs, u32 *args)
2461 static inline int tcp_call_bpf_2arg(struct sock *sk, int op, u32 arg1, u32 arg2)
2466 static inline int tcp_call_bpf_3arg(struct sock *sk, int op, u32 arg1, u32 arg2,
2474 static inline u32 tcp_timeout_init(struct sock *sk)
2485 static inline u32 tcp_rwnd_init_bpf(struct sock *sk)
2496 static inline bool tcp_bpf_ca_needs_ecn(struct sock *sk)
2501 static inline void tcp_bpf_rtt(struct sock *sk)
2513 void (*cad)(struct sock *sk, u32 ack_seq));
2529 static inline u64 tcp_transmit_time(const struct sock *sk)