FreeBSD kernel IPv4 code
|
#include <netinet/tcp.h>
#include <netinet/tcp_fsm.h>
#include "opt_kern_tls.h"
#include <net/vnet.h>
#include <sys/mbuf.h>
#include <sys/ktls.h>
#include <sys/counter.h>
Go to the source code of this file.
Data Structures | |
struct | tseg_qent |
struct | sackblk |
struct | sackhole |
struct | sackhint |
struct | tcpcb |
struct | tcptemp |
struct | tcp_function_block |
struct | tcp_function |
struct | tcpopt |
struct | hc_metrics_lite |
struct | tcp_ifcap |
struct | tcptw |
struct | tcpstat |
struct | tcp_hhook_data |
struct | tcp_function_info |
Macros | |
#define | TCP_END_BYTE_INFO 8 /* Bytes that makeup the "end information array" */ |
#define | TCP_EI_EMPTY_SLOT 0 |
#define | TCP_EI_STATUS_CLIENT_FIN 0x1 |
#define | TCP_EI_STATUS_CLIENT_RST 0x2 |
#define | TCP_EI_STATUS_SERVER_FIN 0x3 |
#define | TCP_EI_STATUS_SERVER_RST 0x4 |
#define | TCP_EI_STATUS_RETRAN 0x5 |
#define | TCP_EI_STATUS_PROGRESS 0x6 |
#define | TCP_EI_STATUS_PERSIST_MAX 0x7 |
#define | TCP_EI_STATUS_KEEP_MAX 0x8 |
#define | TCP_EI_STATUS_DATA_A_CLOSE 0x9 |
#define | TCP_EI_STATUS_RST_IN_FRONT 0xa |
#define | TCP_EI_STATUS_2MSL 0xb |
#define | TCP_EI_STATUS_MAX_VALUE 0xb |
#define | TCP_EI_BITS_CLIENT_FIN 0x001 |
#define | TCP_EI_BITS_CLIENT_RST 0x002 |
#define | TCP_EI_BITS_SERVER_FIN 0x004 |
#define | TCP_EI_BITS_SERVER_RST 0x008 |
#define | TCP_EI_BITS_RETRAN 0x010 |
#define | TCP_EI_BITS_PROGRESS 0x020 |
#define | TCP_EI_BITS_PRESIST_MAX 0x040 |
#define | TCP_EI_BITS_KEEP_MAX 0x080 |
#define | TCP_EI_BITS_DATA_A_CLO 0x100 |
#define | TCP_EI_BITS_RST_IN_FR 0x200 /* a front state reset */ |
#define | TCP_EI_BITS_2MS_TIMER 0x400 /* 2 MSL timer expired */ |
#define | SEGQ_EMPTY(tp) TAILQ_EMPTY(&(tp)->t_segq) |
#define | TCP_TUNNELING_PORT_MIN 0 |
#define | TCP_TUNNELING_PORT_MAX 65535 |
#define | TCP_TUNNELING_PORT_DEFAULT 0 |
#define | TCP_TUNNELING_OVERHEAD_MIN sizeof(struct udphdr) |
#define | TCP_TUNNELING_OVERHEAD_MAX 1024 |
#define | TCP_TUNNELING_OVERHEAD_DEFAULT TCP_TUNNELING_OVERHEAD_MIN |
#define | TCP_MIN_MAP_ENTRIES_LIMIT 128 |
#define | TCP_FUNC_BEING_REMOVED 0x01 /* Can no longer be referenced */ |
#define | TCP_FUNC_OUTPUT_CANDROP 0x02 /* tfb_tcp_output may ask tcp_drop */ |
#define | TF_ACKNOW 0x00000001 /* ack peer immediately */ |
#define | TF_DELACK 0x00000002 /* ack, but try to delay it */ |
#define | TF_NODELAY 0x00000004 /* don't delay packets to coalesce */ |
#define | TF_NOOPT 0x00000008 /* don't use tcp options */ |
#define | TF_SENTFIN 0x00000010 /* have sent FIN */ |
#define | TF_REQ_SCALE 0x00000020 /* have/will request window scaling */ |
#define | TF_RCVD_SCALE 0x00000040 /* other side has requested scaling */ |
#define | TF_REQ_TSTMP 0x00000080 /* have/will request timestamps */ |
#define | TF_RCVD_TSTMP 0x00000100 /* a timestamp was received in SYN */ |
#define | TF_SACK_PERMIT 0x00000200 /* other side said I could SACK */ |
#define | TF_NEEDSYN 0x00000400 /* send SYN (implicit state) */ |
#define | TF_NEEDFIN 0x00000800 /* send FIN (implicit state) */ |
#define | TF_NOPUSH 0x00001000 /* don't push */ |
#define | TF_PREVVALID |
#define | TF_WAKESOR 0x00004000 /* wake up receive socket */ |
#define | TF_GPUTINPROG 0x00008000 /* Goodput measurement in progress */ |
#define | TF_MORETOCOME 0x00010000 /* More data to be appended to sock */ |
#define | TF_LQ_OVERFLOW 0x00020000 /* listen queue overflow */ |
#define | TF_LASTIDLE 0x00040000 /* connection was previously idle */ |
#define | TF_RXWIN0SENT 0x00080000 /* sent a receiver win 0 in response */ |
#define | TF_FASTRECOVERY 0x00100000 /* in NewReno Fast Recovery */ |
#define | TF_WASFRECOVERY 0x00200000 /* was in NewReno Fast Recovery */ |
#define | TF_SIGNATURE 0x00400000 /* require MD5 digests (RFC2385) */ |
#define | TF_FORCEDATA 0x00800000 /* force out a byte */ |
#define | TF_TSO 0x01000000 /* TSO enabled on this connection */ |
#define | TF_TOE 0x02000000 /* this connection is offloaded */ |
#define | TF_UNUSED0 0x04000000 /* unused */ |
#define | TF_UNUSED1 0x08000000 /* unused */ |
#define | TF_LRD 0x10000000 /* Lost Retransmission Detection */ |
#define | TF_CONGRECOVERY 0x20000000 /* congestion recovery mode */ |
#define | TF_WASCRECOVERY 0x40000000 /* was in congestion recovery */ |
#define | TF_FASTOPEN 0x80000000 /* TCP Fast Open indication */ |
#define | IN_FASTRECOVERY(t_flags) (t_flags & TF_FASTRECOVERY) |
#define | ENTER_FASTRECOVERY(t_flags) t_flags |= TF_FASTRECOVERY |
#define | EXIT_FASTRECOVERY(t_flags) t_flags &= ~TF_FASTRECOVERY |
#define | IN_CONGRECOVERY(t_flags) (t_flags & TF_CONGRECOVERY) |
#define | ENTER_CONGRECOVERY(t_flags) t_flags |= TF_CONGRECOVERY |
#define | EXIT_CONGRECOVERY(t_flags) t_flags &= ~TF_CONGRECOVERY |
#define | IN_RECOVERY(t_flags) (t_flags & (TF_CONGRECOVERY | TF_FASTRECOVERY)) |
#define | ENTER_RECOVERY(t_flags) t_flags |= (TF_CONGRECOVERY | TF_FASTRECOVERY) |
#define | EXIT_RECOVERY(t_flags) t_flags &= ~(TF_CONGRECOVERY | TF_FASTRECOVERY) |
#define | IS_FASTOPEN(t_flags) (false) |
#define | BYTES_THIS_ACK(tp, th) (th->th_ack - tp->snd_una) |
#define | TCPOOB_HAVEDATA 0x01 |
#define | TCPOOB_HADDATA 0x02 |
#define | TF2_PLPMTU_BLACKHOLE 0x00000001 /* Possible PLPMTUD Black Hole. */ |
#define | TF2_PLPMTU_PMTUD 0x00000002 /* Allowed to attempt PLPMTUD. */ |
#define | TF2_PLPMTU_MAXSEGSNT 0x00000004 /* Last seg sent was full seg. */ |
#define | TF2_LOG_AUTO 0x00000008 /* Session is auto-logging. */ |
#define | TF2_DROP_AF_DATA 0x00000010 /* Drop after all data ack'd */ |
#define | TF2_ECN_PERMIT 0x00000020 /* connection ECN-ready */ |
#define | TF2_ECN_SND_CWR 0x00000040 /* ECN CWR in queue */ |
#define | TF2_ECN_SND_ECE 0x00000080 /* ECN ECE in queue */ |
#define | TF2_ACE_PERMIT 0x00000100 /* Accurate ECN mode */ |
#define | TF2_FBYTES_COMPLETE 0x00000400 /* We have first bytes in and out */ |
#define | TOF_MSS 0x0001 /* maximum segment size */ |
#define | TOF_SCALE 0x0002 /* window scaling */ |
#define | TOF_SACKPERM 0x0004 /* SACK permitted */ |
#define | TOF_TS 0x0010 /* timestamp */ |
#define | TOF_SIGNATURE 0x0040 /* TCP-MD5 signature option (RFC2385) */ |
#define | TOF_SACK 0x0080 /* Peer sent SACK option */ |
#define | TOF_FASTOPEN 0x0100 /* TCP Fast Open (TFO) cookie */ |
#define | TOF_MAXOPT 0x0200 |
#define | TO_SYN 0x01 /* parse SYN-only options */ |
#define | intotcpcb(ip) ((struct tcpcb *)(ip)->inp_ppcb) |
#define | intotw(ip) ((struct tcptw *)(ip)->inp_ppcb) |
#define | sototcpcb(so) (intotcpcb(sotoinpcb(so))) |
#define | TCP_RTT_SCALE 32 /* multiplier for srtt; 3 bits frac. */ |
#define | TCP_RTT_SHIFT 5 /* shift for srtt; 3 bits frac. */ |
#define | TCP_RTTVAR_SCALE 16 /* multiplier for rttvar; 2 bits */ |
#define | TCP_RTTVAR_SHIFT 4 /* shift for rttvar; 2 bits */ |
#define | TCP_DELTA_SHIFT 2 /* see tcp_input.c */ |
#define | TCP_REXMTVAL(tp) |
#define | tcps_rcvmemdrop tcps_rcvreassfull /* compat */ |
#define | TI_UNLOCKED 1 |
#define | TI_RLOCKED 2 |
#define | TCPSTAT_ADD(name, val) VNET_PCPUSTAT_ADD(struct tcpstat, tcpstat, name, (val)) |
#define | TCPSTAT_INC(name) TCPSTAT_ADD(name, 1) |
#define | KMOD_TCPSTAT_ADD(name, val) kmod_tcpstat_add(offsetof(struct tcpstat, name) / sizeof(uint64_t), val) |
#define | KMOD_TCPSTAT_INC(name) KMOD_TCPSTAT_ADD(name, 1) |
#define | V_tcps_states VNET(tcps_states) |
#define | TCPSTATES_INC(state) counter_u64_add(V_tcps_states[state], 1) |
#define | TCPSTATES_DEC(state) counter_u64_add(V_tcps_states[state], -1) |
#define | HHOOK_TCP_EST_IN 0 |
#define | HHOOK_TCP_EST_OUT 1 |
#define | HHOOK_TCP_LAST HHOOK_TCP_EST_OUT |
#define | TCPCTL_DO_RFC1323 1 /* use RFC-1323 extensions */ |
#define | TCPCTL_MSSDFLT 3 /* MSS default */ |
#define | TCPCTL_STATS 4 /* statistics */ |
#define | TCPCTL_RTTDFLT 5 /* default RTT estimate */ |
#define | TCPCTL_KEEPIDLE 6 /* keepalive idle timer */ |
#define | TCPCTL_KEEPINTVL 7 /* interval to send keepalives */ |
#define | TCPCTL_SENDSPACE 8 /* send buffer space */ |
#define | TCPCTL_RECVSPACE 9 /* receive buffer space */ |
#define | TCPCTL_KEEPINIT 10 /* timeout for establishing syn */ |
#define | TCPCTL_PCBLIST 11 /* list of all outstanding PCBs */ |
#define | TCPCTL_DELACKTIME 12 /* time before sending delayed ACK */ |
#define | TCPCTL_V6MSSDFLT 13 /* MSS default for IPv6 */ |
#define | TCPCTL_SACK 14 /* Selective Acknowledgement,rfc 2018 */ |
#define | TCPCTL_DROP 15 /* drop tcp connection */ |
#define | TCPCTL_STATES 16 /* connection counts by TCP state */ |
#define | V_tcp_log_in_vain VNET(tcp_log_in_vain) |
#define | V_tcp_do_lrd VNET(tcp_do_lrd) |
#define | V_tcp_do_prr VNET(tcp_do_prr) |
#define | V_tcp_do_prr_conservative VNET(tcp_do_prr_conservative) |
#define | V_tcp_do_newcwv VNET(tcp_do_newcwv) |
#define | V_drop_synfin VNET(drop_synfin) |
#define | V_path_mtu_discovery VNET(path_mtu_discovery) |
#define | V_tcbinfo VNET(tcbinfo) |
#define | V_tcp_abc_l_var VNET(tcp_abc_l_var) |
#define | V_tcp_autorcvbuf_max VNET(tcp_autorcvbuf_max) |
#define | V_tcp_autosndbuf_inc VNET(tcp_autosndbuf_inc) |
#define | V_tcp_autosndbuf_max VNET(tcp_autosndbuf_max) |
#define | V_tcp_delack_enabled VNET(tcp_delack_enabled) |
#define | V_tcp_do_autorcvbuf VNET(tcp_do_autorcvbuf) |
#define | V_tcp_do_autosndbuf VNET(tcp_do_autosndbuf) |
#define | V_tcp_do_ecn VNET(tcp_do_ecn) |
#define | V_tcp_do_rfc1323 VNET(tcp_do_rfc1323) |
#define | V_tcp_tolerate_missing_ts VNET(tcp_tolerate_missing_ts) |
#define | V_tcp_ts_offset_per_conn VNET(tcp_ts_offset_per_conn) |
#define | V_tcp_do_rfc3042 VNET(tcp_do_rfc3042) |
#define | V_tcp_do_rfc3390 VNET(tcp_do_rfc3390) |
#define | V_tcp_do_rfc3465 VNET(tcp_do_rfc3465) |
#define | V_tcp_do_newsack VNET(tcp_do_newsack) |
#define | V_tcp_do_sack VNET(tcp_do_sack) |
#define | V_tcp_do_tso VNET(tcp_do_tso) |
#define | V_tcp_ecn_maxretries VNET(tcp_ecn_maxretries) |
#define | V_tcp_initcwnd_segments VNET(tcp_initcwnd_segments) |
#define | V_tcp_insecure_rst VNET(tcp_insecure_rst) |
#define | V_tcp_insecure_syn VNET(tcp_insecure_syn) |
#define | V_tcp_map_entries_limit VNET(tcp_map_entries_limit) |
#define | V_tcp_map_split_limit VNET(tcp_map_split_limit) |
#define | V_tcp_minmss VNET(tcp_minmss) |
#define | V_tcp_mssdflt VNET(tcp_mssdflt) |
#define | V_tcp_recvspace VNET(tcp_recvspace) |
#define | V_tcp_sack_globalholes VNET(tcp_sack_globalholes) |
#define | V_tcp_sack_globalmaxholes VNET(tcp_sack_globalmaxholes) |
#define | V_tcp_sack_maxholes VNET(tcp_sack_maxholes) |
#define | V_tcp_sc_rst_sock_fail VNET(tcp_sc_rst_sock_fail) |
#define | V_tcp_sendspace VNET(tcp_sendspace) |
#define | V_tcp_udp_tunneling_overhead VNET(tcp_udp_tunneling_overhead) |
#define | V_tcp_udp_tunneling_port VNET(tcp_udp_tunneling_port) |
Functions | |
TAILQ_HEAD (tsegqe_head, tseg_qent) | |
STAILQ_HEAD (tcp_log_stailq, tcp_log_mem) | |
TAILQ_HEAD (tcp_funchead, tcp_function) | |
struct tcpcb * | tcp_drop (struct tcpcb *, int) |
VNET_PCPUSTAT_DECLARE (struct tcpstat, tcpstat) | |
void | kmod_tcpstat_add (int statnum, int val) |
VNET_DECLARE (counter_u64_t, tcps_states[TCP_NSTATES]) | |
VNET_DECLARE (int, tcp_log_in_vain) | |
VNET_DECLARE (int, drop_synfin) | |
VNET_DECLARE (int, path_mtu_discovery) | |
VNET_DECLARE (int, tcp_abc_l_var) | |
VNET_DECLARE (int, tcp_autorcvbuf_max) | |
VNET_DECLARE (int, tcp_autosndbuf_inc) | |
VNET_DECLARE (int, tcp_autosndbuf_max) | |
VNET_DECLARE (int, tcp_delack_enabled) | |
VNET_DECLARE (int, tcp_do_autorcvbuf) | |
VNET_DECLARE (int, tcp_do_autosndbuf) | |
VNET_DECLARE (int, tcp_do_ecn) | |
VNET_DECLARE (int, tcp_do_lrd) | |
VNET_DECLARE (int, tcp_do_prr) | |
VNET_DECLARE (int, tcp_do_prr_conservative) | |
VNET_DECLARE (int, tcp_do_newcwv) | |
VNET_DECLARE (int, tcp_do_rfc1323) | |
VNET_DECLARE (int, tcp_tolerate_missing_ts) | |
VNET_DECLARE (int, tcp_do_rfc3042) | |
VNET_DECLARE (int, tcp_do_rfc3390) | |
VNET_DECLARE (int, tcp_do_rfc3465) | |
VNET_DECLARE (int, tcp_do_newsack) | |
VNET_DECLARE (int, tcp_do_sack) | |
VNET_DECLARE (int, tcp_do_tso) | |
VNET_DECLARE (int, tcp_ecn_maxretries) | |
VNET_DECLARE (int, tcp_initcwnd_segments) | |
VNET_DECLARE (int, tcp_insecure_rst) | |
VNET_DECLARE (int, tcp_insecure_syn) | |
VNET_DECLARE (uint32_t, tcp_map_entries_limit) | |
VNET_DECLARE (uint32_t, tcp_map_split_limit) | |
VNET_DECLARE (int, tcp_minmss) | |
VNET_DECLARE (int, tcp_mssdflt) | |
VNET_DECLARE (int, tcp_recvspace) | |
VNET_DECLARE (int, tcp_sack_globalholes) | |
VNET_DECLARE (int, tcp_sack_globalmaxholes) | |
VNET_DECLARE (int, tcp_sack_maxholes) | |
VNET_DECLARE (int, tcp_sc_rst_sock_fail) | |
VNET_DECLARE (int, tcp_sendspace) | |
VNET_DECLARE (int, tcp_udp_tunneling_overhead) | |
VNET_DECLARE (int, tcp_udp_tunneling_port) | |
VNET_DECLARE (struct inpcbinfo, tcbinfo) | |
int | tcp_addoptions (struct tcpopt *, u_char *) |
struct tcpcb * | tcp_close (struct tcpcb *) |
void | tcp_discardcb (struct tcpcb *) |
bool | tcp_freecb (struct tcpcb *) |
void | tcp_twstart (struct tcpcb *) |
void | tcp_twclose (struct tcptw *, int) |
void | tcp_ctlinput (int, struct sockaddr *, void *) |
int | tcp_ctloutput (struct socket *, struct sockopt *) |
void | tcp_ctlinput_viaudp (int, struct sockaddr *, void *, void *) |
void | tcp_drain (void) |
void | tcp_fini (void *) |
char * | tcp_log_addrs (struct in_conninfo *, struct tcphdr *, void *, const void *) |
char * | tcp_log_vain (struct in_conninfo *, struct tcphdr *, void *, const void *) |
int | tcp_reass (struct tcpcb *, struct tcphdr *, tcp_seq *, int *, struct mbuf *) |
void | tcp_reass_global_init (void) |
void | tcp_reass_flush (struct tcpcb *) |
void | tcp_dooptions (struct tcpopt *, u_char *, int, int) |
void | tcp_dropwithreset (struct mbuf *, struct tcphdr *, struct tcpcb *, int, int) |
void | tcp_pulloutofband (struct socket *, struct tcphdr *, struct mbuf *, int) |
void | tcp_xmit_timer (struct tcpcb *, int) |
void | tcp_newreno_partial_ack (struct tcpcb *, struct tcphdr *) |
void | cc_ack_received (struct tcpcb *tp, struct tcphdr *th, uint16_t nsegs, uint16_t type) |
void | cc_conn_init (struct tcpcb *tp) |
void | cc_post_recovery (struct tcpcb *tp, struct tcphdr *th) |
void | cc_ecnpkt_handler (struct tcpcb *tp, struct tcphdr *th, uint8_t iptos) |
void | cc_ecnpkt_handler_flags (struct tcpcb *tp, uint16_t flags, uint8_t iptos) |
void | cc_cong_signal (struct tcpcb *tp, struct tcphdr *th, uint32_t type) |
int | tcp_input (struct mbuf **, int *, int) |
int | tcp_autorcvbuf (struct mbuf *, struct tcphdr *, struct socket *, struct tcpcb *, int) |
int | tcp_input_with_port (struct mbuf **, int *, int, uint16_t) |
void | tcp_handle_wakeup (struct tcpcb *, struct socket *) |
void | tcp_do_segment (struct mbuf *, struct tcphdr *, struct socket *, struct tcpcb *, int, int, uint8_t) |
int | register_tcp_functions (struct tcp_function_block *blk, int wait) |
int | register_tcp_functions_as_names (struct tcp_function_block *blk, int wait, const char *names[], int *num_names) |
int | register_tcp_functions_as_name (struct tcp_function_block *blk, const char *name, int wait) |
int | deregister_tcp_functions (struct tcp_function_block *blk, bool quiesce, bool force) |
struct tcp_function_block * | find_and_ref_tcp_functions (struct tcp_function_set *fs) |
int | find_tcp_function_alias (struct tcp_function_block *blk, struct tcp_function_set *fs) |
void | tcp_switch_back_to_default (struct tcpcb *tp) |
struct tcp_function_block * | find_and_ref_tcp_fb (struct tcp_function_block *fs) |
int | tcp_default_ctloutput (struct inpcb *inp, struct sockopt *sopt) |
int | tcp_ctloutput_set (struct inpcb *inp, struct sockopt *sopt) |
uint32_t | tcp_maxmtu (struct in_conninfo *, struct tcp_ifcap *) |
uint32_t | tcp_maxmtu6 (struct in_conninfo *, struct tcp_ifcap *) |
void | tcp6_use_min_mtu (struct tcpcb *) |
u_int | tcp_maxseg (const struct tcpcb *) |
u_int | tcp_fixed_maxseg (const struct tcpcb *) |
void | tcp_mss_update (struct tcpcb *, int, int, struct hc_metrics_lite *, struct tcp_ifcap *) |
void | tcp_mss (struct tcpcb *, int) |
int | tcp_mssopt (struct in_conninfo *) |
struct inpcb * | tcp_drop_syn_sent (struct inpcb *, int) |
struct tcpcb * | tcp_newtcpcb (struct inpcb *) |
int | tcp_default_output (struct tcpcb *) |
void | tcp_state_change (struct tcpcb *, int) |
void | tcp_respond (struct tcpcb *, void *, struct tcphdr *, struct mbuf *, tcp_seq, tcp_seq, int) |
void | tcp_tw_init (void) |
void | tcp_tw_zone_change (void) |
int | tcp_twcheck (struct inpcb *, struct tcpopt *, struct tcphdr *, struct mbuf *, int) |
void | tcp_setpersist (struct tcpcb *) |
void | tcp_slowtimo (void) |
void | tcp_record_dsack (struct tcpcb *tp, tcp_seq start, tcp_seq end, int tlp) |
struct tcptemp * | tcpip_maketemplate (struct inpcb *) |
void | tcpip_fillheaders (struct inpcb *, uint16_t, void *, void *) |
void | tcp_timer_activate (struct tcpcb *, uint32_t, u_int) |
int | tcp_timer_suspend (struct tcpcb *, uint32_t) |
void | tcp_timers_unsuspend (struct tcpcb *, uint32_t) |
int | tcp_timer_active (struct tcpcb *, uint32_t) |
void | tcp_timer_stop (struct tcpcb *, uint32_t) |
void | tcp_trace (short, short, struct tcpcb *, void *, struct tcphdr *, int) |
int | inp_to_cpuid (struct inpcb *inp) |
void | tcp_hc_init (void) |
void | tcp_hc_get (struct in_conninfo *, struct hc_metrics_lite *) |
uint32_t | tcp_hc_getmtu (struct in_conninfo *) |
void | tcp_hc_updatemtu (struct in_conninfo *, uint32_t) |
void | tcp_hc_update (struct in_conninfo *, struct hc_metrics_lite *) |
uint32_t | tcp_new_ts_offset (struct in_conninfo *) |
tcp_seq | tcp_new_isn (struct in_conninfo *) |
int | tcp_sack_doack (struct tcpcb *, struct tcpopt *, tcp_seq) |
int | tcp_dsack_block_exists (struct tcpcb *) |
void | tcp_update_dsack_list (struct tcpcb *, tcp_seq, tcp_seq) |
void | tcp_update_sack_list (struct tcpcb *tp, tcp_seq rcv_laststart, tcp_seq rcv_lastend) |
void | tcp_clean_dsack_blocks (struct tcpcb *tp) |
void | tcp_clean_sackreport (struct tcpcb *tp) |
void | tcp_sack_adjust (struct tcpcb *tp) |
struct sackhole * | tcp_sack_output (struct tcpcb *tp, int *sack_bytes_rexmt) |
void | tcp_do_prr_ack (struct tcpcb *, struct tcphdr *, struct tcpopt *) |
void | tcp_lost_retransmission (struct tcpcb *, struct tcphdr *) |
void | tcp_sack_partialack (struct tcpcb *, struct tcphdr *) |
void | tcp_free_sackholes (struct tcpcb *tp) |
void | tcp_sack_lost_retransmission (struct tcpcb *, struct tcphdr *) |
int | tcp_newreno (struct tcpcb *, struct tcphdr *) |
int | tcp_compute_pipe (struct tcpcb *) |
uint32_t | tcp_compute_initwnd (uint32_t) |
void | tcp_sndbuf_autoscale (struct tcpcb *, struct socket *, uint32_t) |
int | tcp_stats_sample_rollthedice (struct tcpcb *tp, void *seed_bytes, size_t seed_len) |
int | tcp_can_enable_pacing (void) |
void | tcp_decrement_paced_conn (void) |
struct mbuf * | tcp_m_copym (struct mbuf *m, int32_t off0, int32_t *plen, int32_t seglimit, int32_t segsize, struct sockbuf *sb, bool hw_tls) |
int | tcp_stats_init (void) |
void | tcp_log_end_status (struct tcpcb *tp, uint8_t status) |
static void | tcp_fields_to_host (struct tcphdr *th) |
static void | tcp_fields_to_net (struct tcphdr *th) |
static uint16_t | tcp_get_flags (const struct tcphdr *th) |
static void | tcp_set_flags (struct tcphdr *th, uint16_t flags) |
static void | tcp_account_for_send (struct tcpcb *tp, uint32_t len, uint8_t is_rxt, uint8_t is_tlp, int hw_tls) |
Variables | |
counter_u64_t | tcp_inp_lro_direct_queue |
counter_u64_t | tcp_inp_lro_wokeup_queue |
counter_u64_t | tcp_inp_lro_compressed |
counter_u64_t | tcp_inp_lro_locks_taken |
counter_u64_t | tcp_extra_mbuf |
counter_u64_t | tcp_would_have_but |
counter_u64_t | tcp_comp_total |
counter_u64_t | tcp_uncomp_total |
counter_u64_t | tcp_bad_csums |
uint32_t | tcp_ack_war_time_window |
uint32_t | tcp_ack_war_cnt |
struct pr_usrreqs | tcp_usrreqs |
#define BYTES_THIS_ACK | ( | tp, | |
th | |||
) | (th->th_ack - tp->snd_una) |
#define ENTER_CONGRECOVERY | ( | t_flags | ) | t_flags |= TF_CONGRECOVERY |
#define ENTER_FASTRECOVERY | ( | t_flags | ) | t_flags |= TF_FASTRECOVERY |
#define ENTER_RECOVERY | ( | t_flags | ) | t_flags |= (TF_CONGRECOVERY | TF_FASTRECOVERY) |
#define EXIT_CONGRECOVERY | ( | t_flags | ) | t_flags &= ~TF_CONGRECOVERY |
#define EXIT_FASTRECOVERY | ( | t_flags | ) | t_flags &= ~TF_FASTRECOVERY |
#define EXIT_RECOVERY | ( | t_flags | ) | t_flags &= ~(TF_CONGRECOVERY | TF_FASTRECOVERY) |
#define HHOOK_TCP_LAST HHOOK_TCP_EST_OUT |
#define IN_CONGRECOVERY | ( | t_flags | ) | (t_flags & TF_CONGRECOVERY) |
#define IN_FASTRECOVERY | ( | t_flags | ) | (t_flags & TF_FASTRECOVERY) |
#define IN_RECOVERY | ( | t_flags | ) | (t_flags & (TF_CONGRECOVERY | TF_FASTRECOVERY)) |
#define KMOD_TCPSTAT_ADD | ( | name, | |
val | |||
) | kmod_tcpstat_add(offsetof(struct tcpstat, name) / sizeof(uint64_t), val) |
#define KMOD_TCPSTAT_INC | ( | name | ) | KMOD_TCPSTAT_ADD(name, 1) |
#define TCP_EI_BITS_2MS_TIMER 0x400 /* 2 MSL timer expired */ |
#define TCP_EI_BITS_RST_IN_FR 0x200 /* a front state reset */ |
#define TCP_END_BYTE_INFO 8 /* Bytes that makeup the "end information array" */ |
#define TCP_FUNC_BEING_REMOVED 0x01 /* Can no longer be referenced */ |
#define TCP_FUNC_OUTPUT_CANDROP 0x02 /* tfb_tcp_output may ask tcp_drop */ |
#define TCP_REXMTVAL | ( | tp | ) |
#define TCP_RTT_SCALE 32 /* multiplier for srtt; 3 bits frac. */ |
#define TCP_RTT_SHIFT 5 /* shift for srtt; 3 bits frac. */ |
#define TCP_RTTVAR_SCALE 16 /* multiplier for rttvar; 2 bits */ |
#define TCP_TUNNELING_OVERHEAD_DEFAULT TCP_TUNNELING_OVERHEAD_MIN |
#define TCPCTL_DELACKTIME 12 /* time before sending delayed ACK */ |
#define TCPCTL_KEEPINIT 10 /* timeout for establishing syn */ |
#define TCPCTL_KEEPINTVL 7 /* interval to send keepalives */ |
#define TCPCTL_PCBLIST 11 /* list of all outstanding PCBs */ |
#define TCPCTL_SACK 14 /* Selective Acknowledgement,rfc 2018 */ |
#define TCPSTAT_INC | ( | name | ) | TCPSTAT_ADD(name, 1) |
#define TCPSTATES_DEC | ( | state | ) | counter_u64_add(V_tcps_states[state], -1) |
#define TCPSTATES_INC | ( | state | ) | counter_u64_add(V_tcps_states[state], 1) |
#define TF2_DROP_AF_DATA 0x00000010 /* Drop after all data ack'd */ |
#define TF2_ECN_PERMIT 0x00000020 /* connection ECN-ready */ |
#define TF2_FBYTES_COMPLETE 0x00000400 /* We have first bytes in and out */ |
#define TF2_LOG_AUTO 0x00000008 /* Session is auto-logging. */ |
#define TF2_PLPMTU_BLACKHOLE 0x00000001 /* Possible PLPMTUD Black Hole. */ |
#define TF2_PLPMTU_MAXSEGSNT 0x00000004 /* Last seg sent was full seg. */ |
#define TF2_PLPMTU_PMTUD 0x00000002 /* Allowed to attempt PLPMTUD. */ |
#define TF_CONGRECOVERY 0x20000000 /* congestion recovery mode */ |
#define TF_DELACK 0x00000002 /* ack, but try to delay it */ |
#define TF_FASTOPEN 0x80000000 /* TCP Fast Open indication */ |
#define TF_FASTRECOVERY 0x00100000 /* in NewReno Fast Recovery */ |
#define TF_GPUTINPROG 0x00008000 /* Goodput measurement in progress */ |
#define TF_LASTIDLE 0x00040000 /* connection was previously idle */ |
#define TF_LQ_OVERFLOW 0x00020000 /* listen queue overflow */ |
#define TF_LRD 0x10000000 /* Lost Retransmission Detection */ |
#define TF_MORETOCOME 0x00010000 /* More data to be appended to sock */ |
#define TF_NEEDFIN 0x00000800 /* send FIN (implicit state) */ |
#define TF_NEEDSYN 0x00000400 /* send SYN (implicit state) */ |
#define TF_NODELAY 0x00000004 /* don't delay packets to coalesce */ |
#define TF_PREVVALID |
#define TF_RCVD_SCALE 0x00000040 /* other side has requested scaling */ |
#define TF_RCVD_TSTMP 0x00000100 /* a timestamp was received in SYN */ |
#define TF_REQ_SCALE 0x00000020 /* have/will request window scaling */ |
#define TF_REQ_TSTMP 0x00000080 /* have/will request timestamps */ |
#define TF_RXWIN0SENT 0x00080000 /* sent a receiver win 0 in response */ |
#define TF_SACK_PERMIT 0x00000200 /* other side said I could SACK */ |
#define TF_SIGNATURE 0x00400000 /* require MD5 digests (RFC2385) */ |
#define TF_TOE 0x02000000 /* this connection is offloaded */ |
#define TF_TSO 0x01000000 /* TSO enabled on this connection */ |
#define TF_WAKESOR 0x00004000 /* wake up receive socket */ |
#define TF_WASCRECOVERY 0x40000000 /* was in congestion recovery */ |
#define TF_WASFRECOVERY 0x00200000 /* was in NewReno Fast Recovery */ |
#define TOF_SIGNATURE 0x0040 /* TCP-MD5 signature option (RFC2385) */ |
#define V_tcp_do_prr_conservative VNET(tcp_do_prr_conservative) |
#define V_tcp_initcwnd_segments VNET(tcp_initcwnd_segments) |
#define V_tcp_map_entries_limit VNET(tcp_map_entries_limit) |
#define V_tcp_sack_globalholes VNET(tcp_sack_globalholes) |
#define V_tcp_sack_globalmaxholes VNET(tcp_sack_globalmaxholes) |
#define V_tcp_sc_rst_sock_fail VNET(tcp_sc_rst_sock_fail) |
#define V_tcp_tolerate_missing_ts VNET(tcp_tolerate_missing_ts) |
#define V_tcp_ts_offset_per_conn VNET(tcp_ts_offset_per_conn) |
#define V_tcp_udp_tunneling_overhead VNET(tcp_udp_tunneling_overhead) |
#define V_tcp_udp_tunneling_port VNET(tcp_udp_tunneling_port) |
Definition at line 297 of file tcp_input.c.
References cc_var::bytes_this_ack, BYTES_THIS_ACK, CC_ACK, CC_ALGO, CCF_ABC_SENTAWND, CCF_CWND_LIMITED, tcpcb::ccv, cc_var::curack, cc_var::flags, tcpcb::gput_ack, tcpcb::gput_seq, tcpcb::gput_ts, IN_RECOVERY, INP_WLOCK_ASSERT, cc_var::nsegs, SEQ_GEQ, tcpcb::snd_cwnd, tcpcb::snd_ssthresh, tcpcb::snd_wnd, tcpcb::t_bytes_acked, tcpcb::t_flags, tcpcb::t_inpcb, tcpcb::t_stats, tcpcb::t_stats_gput_prev, tcp_compute_pipe(), tcp_maxseg(), tcp_ts_getticks(), TF_GPUTINPROG, tcp_hhook_data::th, tcp_hhook_data::tp, V_tcp_do_newcwv, VOI_TCP_ACKLEN, VOI_TCP_CALCFRWINDIFF, VOI_TCP_GPUT, VOI_TCP_GPUT_ND, and VOI_TCP_LCWIN.
Referenced by tcp_do_segment().
Definition at line 424 of file tcp_input.c.
References CC_ALGO, CC_ECN, CC_NDUPACK, CC_RTO, CC_RTO_ERR, tcpcb::ccv, cc_var::curack, ENTER_CONGRECOVERY, ENTER_FASTRECOVERY, EXIT_CONGRECOVERY, EXIT_RECOVERY, IN_CONGRECOVERY, IN_FASTRECOVERY, INP_WLOCK_ASSERT, SEQ_GEQ, tcpcb::snd_cwnd, tcpcb::snd_cwnd_prev, tcpcb::snd_max, tcpcb::snd_nxt, tcpcb::snd_recover, tcpcb::snd_recover_prev, tcpcb::snd_ssthresh, tcpcb::snd_ssthresh_prev, tcpcb::t_badrxtwin, tcpcb::t_bytes_acked, tcpcb::t_dupacks, tcpcb::t_flags, tcpcb::t_flags2, tcpcb::t_inpcb, tcpcb::t_stats, TCPSTAT_INC, TF2_ECN_PERMIT, TF2_ECN_SND_CWR, TF_WASCRECOVERY, TF_WASFRECOVERY, and VOI_TCP_CSIG.
Referenced by tcp_do_segment(), tcp_sack_lost_retransmission(), and tcp_timer_rexmt().
void cc_conn_init | ( | struct tcpcb * | tp | ) |
Definition at line 368 of file tcp_input.c.
References CC_ALGO, tcpcb::ccv, inpcb::inp_inc, INP_WLOCK_ASSERT, hc_metrics_lite::rmx_rtt, hc_metrics_lite::rmx_rttvar, hc_metrics_lite::rmx_ssthresh, tcpcb::snd_cwnd, tcpcb::snd_ssthresh, tcpcb::t_inpcb, tcpcb::t_rttbest, tcpcb::t_rttmin, tcpcb::t_rttvar, tcpcb::t_rxtcur, tcpcb::t_srtt, tcp_compute_initwnd(), tcp_hc_get(), tcp_maxseg(), TCP_RTT_SCALE, TCP_RTTVAR_SCALE, TCPSTAT_INC, TCPT_RANGESET, and TCPTV_REXMTMAX.
Referenced by bbr_do_syn_recv(), bbr_do_syn_sent(), rack_cc_conn_init(), and tcp_do_segment().
Definition at line 550 of file tcp_input.c.
References cc_ecnpkt_handler_flags(), and tcp_get_flags().
Definition at line 517 of file tcp_input.c.
References CC_ALGO, CCF_ACKNOW, CCF_IPHDR_CE, CCF_TCPHDR_CWR, tcpcb::ccv, cc_var::flags, INP_WLOCK_ASSERT, IPTOS_ECN_CE, IPTOS_ECN_ECT0, IPTOS_ECN_ECT1, IPTOS_ECN_MASK, IPTOS_ECN_NOTECT, tcpcb::t_flags, tcpcb::t_inpcb, tcp_delacktime, tcp_timer_activate(), TF_ACKNOW, and TT_DELACK.
Referenced by cc_ecnpkt_handler(), and tcp_ecn_input_segment().
|
inline |
Definition at line 485 of file tcp_input.c.
References CC_ALGO, tcpcb::ccv, cc_var::curack, sackhint::delivered_data, INP_WLOCK_ASSERT, sackhint::prr_out, tcpcb::sackhint, tcpcb::t_bytes_acked, and tcpcb::t_inpcb.
Referenced by tcp_do_segment().
int deregister_tcp_functions | ( | struct tcp_function_block * | blk, |
bool | quiesce, | ||
bool | force | ||
) |
Definition at line 1338 of file tcp_subr.c.
References find_tcp_fb_locked(), INP_ALL_ITERATOR, inpcb::inp_flags, inp_next(), INP_TIMEWAIT, INPLOOKUP_WLOCKPCB, intotcpcb, tcpcb::t_fb, t_functions, tcp_def_funcblk, tcp_fb_cnt, TCP_FUNC_BEING_REMOVED, tcp_func_set_ptr, tcp_function_lock, tcp_switch_back_to_default(), tcp_function::tf_fb, tcp_function_block::tfb_flags, tcp_function_block::tfb_refcnt, and V_tcbinfo.
Referenced by tcp_addbbr(), and tcp_addrack().
struct tcp_function_block * find_and_ref_tcp_fb | ( | struct tcp_function_block * | fs | ) |
Definition at line 467 of file tcp_subr.c.
References find_tcp_fb_locked(), tcp_function_lock, and tcp_function_block::tfb_refcnt.
Referenced by syncache_socket(), and tcp_switch_back_to_default().
struct tcp_function_block * find_and_ref_tcp_functions | ( | struct tcp_function_set * | fs | ) |
Definition at line 454 of file tcp_subr.c.
References find_tcp_functions_locked(), tcp_function_lock, and tcp_function_block::tfb_refcnt.
Referenced by tcp_ctloutput_set().
int find_tcp_function_alias | ( | struct tcp_function_block * | blk, |
struct tcp_function_set * | fs | ||
) |
Definition at line 481 of file tcp_subr.c.
References tcp_function_set::function_set_name, t_functions, tcp_function_lock, TCP_FUNCTION_NAME_LEN_MAX, tcp_function::tf_fb, tcp_function::tf_name, and tcp_function_block::tfb_tcp_block_name.
Referenced by tcp_ctloutput_get().
|
inline |
Definition at line 209 of file tcp_timer.c.
References inpcb::inp_flowid, inpcb::inp_flowtype, and per_cpu_timers.
Referenced by tcp_timer_activate().
void kmod_tcpstat_add | ( | int | statnum, |
int | val | ||
) |
Definition at line 267 of file tcp_input.c.
int register_tcp_functions | ( | struct tcp_function_block * | blk, |
int | wait | ||
) |
Definition at line 1314 of file tcp_subr.c.
References register_tcp_functions_as_name().
Referenced by tcp_init().
int register_tcp_functions_as_name | ( | struct tcp_function_block * | blk, |
const char * | name, | ||
int | wait | ||
) |
Definition at line 1292 of file tcp_subr.c.
References register_tcp_functions_as_names(), and tcp_function_block::tfb_tcp_block_name.
Referenced by register_tcp_functions().
int register_tcp_functions_as_names | ( | struct tcp_function_block * | blk, |
int | wait, | ||
const char * | names[], | ||
int * | num_names | ||
) |
Definition at line 1189 of file tcp_subr.c.
References find_tcp_functions_locked(), tcp_function_set::function_set_name, next_tcp_stack_id, t_functions, tcp_fb_cnt, TCP_FUNC_BEING_REMOVED, tcp_function_lock, TCP_FUNCTION_NAME_LEN_MAX, tcp_function::tf_fb, tcp_function::tf_name, tcp_function_block::tfb_flags, tcp_function_block::tfb_id, tcp_function_block::tfb_refcnt, tcp_function_block::tfb_tcp_block_name, tcp_function_block::tfb_tcp_ctloutput, tcp_function_block::tfb_tcp_do_segment, tcp_function_block::tfb_tcp_output, tcp_function_block::tfb_tcp_timer_activate, tcp_function_block::tfb_tcp_timer_active, tcp_function_block::tfb_tcp_timer_stop, and tcp_function_block::tfb_tcp_timer_stop_all.
Referenced by register_tcp_functions_as_name(), tcp_addbbr(), and tcp_addrack().
STAILQ_HEAD | ( | tcp_log_stailq | , |
tcp_log_mem | |||
) |
TAILQ_HEAD | ( | tcp_funchead | , |
tcp_function | |||
) |
TAILQ_HEAD | ( | tsegqe_head | , |
tseg_qent | |||
) |
void tcp6_use_min_mtu | ( | struct tcpcb * | ) |
Referenced by rack_set_sockopt(), and tcp_default_ctloutput().
|
inlinestatic |
Definition at line 1278 of file tcp_var.h.
Referenced by bbr_output_wtime(), rack_fast_output(), rack_fast_rsm_output(), rack_output(), and tcp_default_output().
int tcp_addoptions | ( | struct tcpopt * | to, |
u_char * | optp | ||
) |
Definition at line 1790 of file tcp_output.c.
References sackblk::end, sackblk::start, TCPSTAT_INC, tcpopt::to_flags, tcpopt::to_mss, tcpopt::to_nsacks, tcpopt::to_sacks, tcpopt::to_signature, tcpopt::to_tfo_cookie, tcpopt::to_tfo_len, tcpopt::to_tsecr, tcpopt::to_tsval, tcpopt::to_wscale, TOF_FASTOPEN, TOF_MAXOPT, TOF_MSS, TOF_SACK, TOF_SACKPERM, TOF_SCALE, TOF_SIGNATURE, and TOF_TS.
Referenced by bbr_output_wtime(), rack_fast_output(), rack_fast_rsm_output(), rack_output(), syncache_respond(), tcp_default_output(), tcp_respond(), and tcp_twrespond().
int tcp_autorcvbuf | ( | struct mbuf * | m, |
struct tcphdr * | th, | ||
struct socket * | so, | ||
struct tcpcb * | tp, | ||
int | tlen | ||
) |
Definition at line 1465 of file tcp_input.c.
References tcpcb::rfbuf_cnt, tcpcb::rfbuf_ts, tcpcb::t_srtt, TCP_PROBE6, TCP_RTT_SHIFT, tcp_ts_getticks(), TCP_TS_TO_TICKS, V_tcp_autorcvbuf_max, and V_tcp_do_autorcvbuf.
Referenced by bbr_do_fastnewdata(), rack_do_fastnewdata(), and tcp_do_segment().
int tcp_can_enable_pacing | ( | void | ) |
Definition at line 4110 of file tcp_subr.c.
References number_of_tcp_connections_pacing, shadow_num_connections, and tcp_pacing_limit.
Referenced by rack_init(), rack_process_option(), and rack_set_profile().
void tcp_clean_dsack_blocks | ( | struct tcpcb * | tp | ) |
Definition at line 409 of file tcp_sack.c.
References sackblk::end, INP_WLOCK_ASSERT, tcpcb::rcv_numsacks, tcpcb::rcv_nxt, tcpcb::sackblks, SEQ_GEQ, SEQ_LEQ, sackblk::start, and tcpcb::t_inpcb.
Referenced by bbr_output_wtime(), rack_output(), and tcp_default_output().
void tcp_clean_sackreport | ( | struct tcpcb * | tp | ) |
Definition at line 451 of file tcp_sack.c.
References sackblk::end, INP_WLOCK_ASSERT, tcpcb::rcv_numsacks, tcpcb::sackblks, sackblk::start, and tcpcb::t_inpcb.
Referenced by bbr_do_fastnewdata(), rack_do_fastnewdata(), tcp_do_segment(), and tcp_drain().
Definition at line 2471 of file tcp_subr.c.
References in_pcbdrop(), inpcb::inp_flags, inpcb::inp_socket, INP_SOCKREF, INP_WLOCK_ASSERT, INP_WUNLOCK, tcpcb::t_inpcb, tcpcb::t_state, tcpcb::t_tfo_pending, tcp_fastopen_decrement_counter(), tcp_hpts_remove(), tcp_offload_listen_stop(), tcp_state_change(), TCPS_CLOSED, TCPS_LISTEN, and TCPSTAT_INC.
Referenced by __ctf_process_rst(), bbr_check_data_after_close(), bbr_do_lastack(), bbr_process_ack(), rack_check_data_after_close(), rack_do_compressed_ack_processing(), rack_do_lastack(), rack_process_ack(), tcp_disconnect(), tcp_do_segment(), tcp_drop(), tcp_timer_2msl(), and tcp_usrclosed().
Definition at line 4049 of file tcp_input.c.
References V_tcp_do_rfc3390, and V_tcp_initcwnd_segments.
Referenced by cc_conn_init(), newreno_cc_after_idle(), rack_get_bw(), and rc_init_window().
int tcp_compute_pipe | ( | struct tcpcb * | tp | ) |
Definition at line 4041 of file tcp_input.c.
References sackhint::sack_bytes_rexmit, sackhint::sacked_bytes, tcpcb::sackhint, tcpcb::snd_max, and tcpcb::snd_una.
Referenced by cc_ack_received(), cubic_post_recovery(), htcp_post_recovery(), newreno_cc_post_recovery(), tcp_do_prr_ack(), and tcp_do_segment().
void tcp_ctlinput | ( | int | , |
struct sockaddr * | , | ||
void * | |||
) |
void tcp_ctlinput_viaudp | ( | int | , |
struct sockaddr * | , | ||
void * | , | ||
void * | |||
) |
int tcp_ctloutput | ( | struct socket * | so, |
struct sockopt * | sopt | ||
) |
Definition at line 1944 of file tcp_usrreq.c.
References INP_DROPPED, inpcb::inp_flags, INP_TIMEWAIT, INP_WLOCK, INP_WUNLOCK, sotoinpcb, tcp_ctloutput_get(), and tcp_ctloutput_set().
int tcp_ctloutput_set | ( | struct inpcb * | inp, |
struct sockopt * | sopt | ||
) |
Definition at line 1717 of file tcp_usrreq.c.
References find_and_ref_tcp_functions(), INP_DROPPED, inpcb::inp_flags, inpcb::inp_ip_tos, INP_IPV6PROTO, inpcb::inp_socket, INP_TIMEWAIT, inpcb::inp_vflag, INP_WLOCK, INP_WLOCK_ASSERT, INP_WUNLOCK, intotcpcb, ip_ctloutput(), IPPROTO_IP, IPPROTO_TCP, tcpcb::t_fb, tcpcb::t_flags, tcpcb::t_inpcb, tcpcb::t_state, TCP_FUNC_BEING_REMOVED, tcp_hpts_remove(), tcp_offload_ctloutput(), TCPS_CLOSED, TF_TOE, tcp_function_block::tfb_flags, tcp_function_block::tfb_refcnt, tcp_function_block::tfb_tcp_ctloutput, tcp_function_block::tfb_tcp_fb_fini, tcp_function_block::tfb_tcp_fb_init, and tcp_function_block::tfb_tcp_handoff_ok.
Referenced by tcp_ctloutput(), and tcp_sysctl_setsockopt().
void tcp_decrement_paced_conn | ( | void | ) |
Definition at line 4126 of file tcp_subr.c.
References number_of_tcp_connections_pacing, shadow_num_connections, tcp_pacing_limit, and tcp_pacing_warning.
Referenced by rack_fini(), rack_process_option(), and rack_set_profile().
int tcp_default_ctloutput | ( | struct inpcb * | inp, |
struct sockopt * | sopt | ||
) |
Definition at line 2120 of file tcp_usrreq.c.
References CC_ALGO, CC_ALGOOPT_LIMIT, tcpcb::ccv, tcpcb::client, in_pcblbgroup_numa(), INP_DROPPED, inpcb::inp_flags, INP_IPV6PROTO, inpcb::inp_socket, INP_TIMEWAIT, inpcb::inp_vflag, INP_WLOCK_ASSERT, INP_WLOCK_RECHECK, INP_WLOCK_RECHECK_CLEANUP, INP_WUNLOCK, intotcpcb, IPPROTO_IP, tcpcb::t_flags, tcpcb::t_keepcnt, tcpcb::t_keepidle, tcpcb::t_keepinit, tcpcb::t_keepintvl, tcpcb::t_logstate, tcpcb::t_maxseg, tcpcb::t_port, tcpcb::t_state, tcpcb::t_stats, tcpcb::t_tfo_client_cookie_len, tcpcb::t_tfo_cookie, tcpcb::t_tfo_pending, tcp6_use_min_mtu(), tcp_fastopen_alloc_counter(), tcp_fill_info(), tcp_log_dump_tp_bucket_logbufs(), tcp_log_dump_tp_logbuf(), tcp_log_get_id(), tcp_log_getlogbuf(), TCP_LOG_REASON_LEN, tcp_log_set_id(), tcp_log_state_change(), TCP_NODELAY, tcp_offload_ctloutput(), tcp_pcap_get_sock_max(), tcp_pcap_set_sock_max(), tcp_set_cc_mod(), tcp_timer_activate(), TCP_TUNNELING_PORT_MAX, TCP_TUNNELING_PORT_MIN, TCPS_CLOSED, TCPS_CLOSING, TCPS_FIN_WAIT_2, TCPS_HAVEESTABLISHED, TCPS_LISTEN, TCPS_SYN_RECEIVED, TCPS_SYN_SENT, TF_FASTOPEN, TF_LRD, TF_NODELAY, TF_NOOPT, TF_NOPUSH, TF_TOE, TP_KEEPCNT, TP_KEEPIDLE, TP_KEEPINIT, TP_KEEPINTVL, TP_MAXIDLE, TT_2MSL, TT_KEEP, V_tcp_fastopen_client_enable, V_tcp_fastopen_server_enable, V_tcp_minmss, and V_tcp_udp_tunneling_port.
Referenced by bbr_get_sockopt(), bbr_set_sockopt(), rack_get_sockopt(), and rack_set_sockopt().
int tcp_default_output | ( | struct tcpcb * | tp | ) |
Definition at line 199 of file tcp_output.c.
References cc_after_idle(), tcpcb::client, sackhole::end, ERRNO_UNK, tcpcb::gput_ack, tcpcb::gput_seq, tcpcb::gput_ts, ipovly::ih_len, inpcb::in6p_outputopts, IN_FASTRECOVERY, in_pseudo(), IN_RECOVERY, inpcb::inp_inc, INP_IPV6, INP_IPV6PROTO, inpcb::inp_options, inpcb::inp_route, inpcb::inp_route6, inpcb::inp_socket, inpcb::inp_vflag, INP_WLOCK_ASSERT, IP_DF, ip::ip_dst, ip::ip_len, IP_MAXPACKET, ip::ip_off, ip_output(), IP_ROUTETOIF, ip::ip_tos, ip::ip_ttl, ip::ip_v, IPPROTO_TCP, IPPROTO_UDP, IPTOS_ECN_MASK, IPVERSION, IS_FASTOPEN, tcpcb::iss, tcpcb::last_ack_sent, tcpcb::max_sndwnd, sackhint::prr_out, tcpcb::rcv_adv, tcpcb::rcv_numsacks, tcpcb::rcv_nxt, tcpcb::rcv_scale, tcpcb::request_r_scale, tcpcb::rfbuf_ts, sackhole::rxmit, in_addr::s_addr, sackhint::sack_bytes_rexmit, tcpcb::sackblks, tcpcb::sackhint, SEQ_GEQ, SEQ_GT, SEQ_LT, tcpcb::server, tcpcb::snd_cwnd, tcpcb::snd_max, tcpcb::snd_nxt, tcpcb::snd_recover, tcpcb::snd_una, tcpcb::snd_up, tcpcb::snd_wnd, tcpcb::t_badrxtwin, tcpcb::t_flags, tcpcb::t_flags2, tcpcb::t_inpcb, tcpcb::t_maxseg, tcpcb::t_port, tcpcb::t_rcvtime, tcpcb::t_rtseq, tcpcb::t_rtttime, tcpcb::t_rxtcur, tcpcb::t_rxtshift, tcpcb::t_sndrexmitpack, tcpcb::t_sndtime, tcpcb::t_sndzerowin, tcpcb::t_softerror, tcpcb::t_state, tcpcb::t_stats, tcpcb::t_tfo_client_cookie_len, tcpcb::t_tfo_cookie, tcpcb::t_tsomax, tcpcb::t_tsomaxsegcount, tcpcb::t_tsomaxsegsize, TA_OUTPUT, tcp_account_for_send(), tcp_addoptions(), tcp_clean_dsack_blocks(), tcp_ecn_output_established(), tcp_ecn_output_syn_sent(), TCP_FASTOPEN_COOKIE_LEN, TCP_LOG_EVENT, TCP_LOG_OUT, tcp_m_copym(), tcp_maxseg(), tcp_mss_update(), tcp_mssopt(), tcp_offload_output(), tcp_pcap_add(), TCP_PROBE3, TCP_PROBE5, tcp_sack_adjust(), tcp_sack_output(), tcp_set_flags(), tcp_setpersist(), tcp_sndbuf_autoscale(), tcp_timer_activate(), tcp_timer_active(), tcp_trace(), tcp_ts_getticks(), TCP_XMIT_TIMER_ASSERT, tcpip_fillheaders(), TCPS_HAVEESTABLISHED, TCPS_HAVERCVDFIN, TCPS_HAVERCVDSYN, TCPS_SYN_RECEIVED, TCPS_SYN_SENT, TCPSTAT_ADD, TCPSTAT_INC, TF2_ECN_PERMIT, TF2_ECN_SND_ECE, TF2_PLPMTU_MAXSEGSNT, TF2_PLPMTU_PMTUD, TF_ACKNOW, TF_DELACK, TF_FORCEDATA, TF_GPUTINPROG, TF_LASTIDLE, TF_LRD, TF_MORETOCOME, TF_NEEDFIN, TF_NEEDSYN, TF_NODELAY, TF_NOOPT, TF_NOPUSH, TF_RCVD_TSTMP, TF_REQ_SCALE, TF_REQ_TSTMP, TF_RXWIN0SENT, TF_SACK_PERMIT, TF_SENTFIN, TF_SIGNATURE, TF_TOE, TF_TSO, tcpopt::to_flags, tcpopt::to_mss, tcpopt::to_nsacks, tcpopt::to_sacks, tcpopt::to_signature, tcpopt::to_tfo_cookie, tcpopt::to_tfo_len, tcpopt::to_tsecr, tcpopt::to_tsval, tcpopt::to_wscale, TOF_FASTOPEN, TOF_MSS, TOF_SACK, TOF_SACKPERM, TOF_SCALE, TOF_SIGNATURE, TOF_TS, tcpcb::ts_offset, tcpcb::ts_recent, TT_DELACK, TT_PERSIST, TT_REXMT, UDPSTAT_INC, udphdr::uh_dport, udphdr::uh_sport, udphdr::uh_sum, udphdr::uh_ulen, V_path_mtu_discovery, V_tcp_do_ecn, V_tcp_do_tso, V_tcp_minmss, V_tcp_udp_tunneling_overhead, V_tcp_udp_tunneling_port, VOI_TCP_RETXPB, and VOI_TCP_TXPB.
void tcp_discardcb | ( | struct tcpcb * | tp | ) |
Definition at line 2304 of file tcp_subr.c.
References CC_ALGO, CC_DATA, cc_detach(), tcpcb::ccv, inpcb::inp_ppcb, INP_WLOCK_ASSERT, tcpcb::osd, tcpcb::t_fb, tcpcb::t_flags, tcpcb::t_inpcb, tcpcb::t_stats, tcpcb::t_timers, tcp_free_sackholes(), tcp_freecb(), tcp_offload_detach(), tcp_pcap_drain(), tcp_reass_flush(), tcp_timer_stop(), TF_TOE, tcp_function_block::tfb_tcp_timer_stop_all, TT_2MSL, TT_DELACK, tcp_timer::tt_draincnt, TT_KEEP, TT_PERSIST, and TT_REXMT.
Referenced by tcp_twstart(), and tcp_usr_detach().
Definition at line 3930 of file tcp_input.c.
References sackhint::delivered_data, IN_CONGRECOVERY, IN_FASTRECOVERY, INP_WLOCK_ASSERT, sackhint::prr_delivered, sackhint::prr_out, sackhint::recover_fs, sackhint::sack_bytes_rexmit, tcpcb::sackhint, tcpcb::snd_cwnd, tcpcb::snd_fack, tcpcb::snd_max, tcpcb::snd_nxt, tcpcb::snd_recover, tcpcb::snd_ssthresh, tcpcb::snd_una, tcpcb::t_dupacks, tcpcb::t_flags, tcpcb::t_inpcb, tcp_compute_pipe(), tcp_maxseg(), tcprexmtthresh, TF_SACK_PERMIT, tcpopt::to_flags, TOF_SACK, V_tcp_do_newsack, and V_tcp_do_prr_conservative.
Referenced by tcp_do_segment().
void tcp_do_segment | ( | struct mbuf * | m, |
struct tcphdr * | th, | ||
struct socket * | so, | ||
struct tcpcb * | tp, | ||
int | drop_hdrlen, | ||
int | tlen, | ||
uint8_t | iptos | ||
) |
Definition at line 1518 of file tcp_input.c.
References BANDLIM_RST_OPENPORT, BANDLIM_UNLIMITED, BYTES_THIS_ACK, CC_ACK, cc_ack_received(), cc_cong_signal(), cc_conn_init(), CC_DUPACK, CC_ECN, CC_NDUPACK, cc_post_recovery(), CC_RTO_ERR, DELAY_ACK, sackhint::delivered_data, sackblk::end, EXIT_RECOVERY, IN_CONGRECOVERY, IN_FASTRECOVERY, IN_RECOVERY, inpcb::inp_inc, INP_IPV6, inpcb::inp_socket, inpcb::inp_vflag, INP_WLOCK_ASSERT, INP_WUNLOCK, IP6_HDR_LEN, tcpcb::irs, IS_FASTOPEN, tcpcb::iss, tcpcb::last_ack_sent, sackhint::last_sack_ack, tcpcb::max_sndwnd, sackhint::prr_delivered, tcpcb::rcv_adv, tcpcb::rcv_numsacks, tcpcb::rcv_nxt, tcpcb::rcv_scale, tcpcb::rcv_up, tcpcb::rcv_wnd, sackhint::recover_fs, tcpcb::request_r_scale, sackhint::sack_bytes_rexmit, tcpcb::sackblks, sackhint::sacked_bytes, tcpcb::sackhint, SEGQ_EMPTY, SEQ_GEQ, SEQ_GT, SEQ_LEQ, SEQ_LT, tcpcb::snd_cwnd, tcpcb::snd_fack, tcpcb::snd_limited, tcpcb::snd_max, tcpcb::snd_nxt, tcpcb::snd_recover, tcpcb::snd_scale, tcpcb::snd_ssthresh, tcpcb::snd_una, tcpcb::snd_wl1, tcpcb::snd_wl2, tcpcb::snd_wnd, sackblk::start, tcpcb::t_badrxtwin, tcpcb::t_dupacks, tcpcb::t_fbyte_in, tcpcb::t_fbyte_out, tcpcb::t_flags, tcpcb::t_flags2, tcpcb::t_inpcb, tcpcb::t_oobflags, tcpcb::t_rcvtime, tcpcb::t_rtseq, tcpcb::t_rttlow, tcpcb::t_rtttime, tcpcb::t_rxtcur, tcpcb::t_rxtshift, tcpcb::t_starttime, tcpcb::t_state, tcpcb::t_stats, tcpcb::t_tfo_pending, TA_DROP, TA_INPUT, tcp_autorcvbuf(), tcp_clean_sackreport(), tcp_close(), tcp_compute_pipe(), tcp_delacktime, tcp_do_prr_ack(), tcp_dooptions(), tcp_drop(), tcp_dropwithreset(), tcp_ecn_input_parallel_syn(), tcp_ecn_input_segment(), tcp_ecn_input_syn_sent(), tcp_fast_finwait2_recycle, tcp_fastopen_decrement_counter(), tcp_fastopen_disable_path(), tcp_fastopen_update_cache(), tcp_finwait2_timeout, tcp_get_flags(), tcp_handle_wakeup(), tcp_log_addrs(), TCP_LOG_EVENT, TCP_LOG_IN, tcp_maxseg(), tcp_mss(), tcp_newreno_partial_ack(), TCP_PAWS_IDLE, tcp_pcap_add(), TCP_PROBE3, TCP_PROBE5, tcp_pulloutofband(), tcp_rcvseqinit, tcp_reass(), tcp_respond(), tcp_sack_doack(), tcp_sack_lost_retransmission(), tcp_sack_partialack(), tcp_state_change(), tcp_timer_activate(), tcp_timer_active(), tcp_trace(), tcp_ts_getticks(), TCP_TS_TO_TICKS, tcp_twstart(), tcp_update_dsack_list(), tcp_update_sack_list(), tcp_xmit_timer(), TCPOOB_HADDATA, TCPOOB_HAVEDATA, tcprexmtthresh, TCPS_CLOSE_WAIT, TCPS_CLOSING, TCPS_ESTABLISHED, TCPS_FIN_WAIT_1, TCPS_FIN_WAIT_2, TCPS_HAVEESTABLISHED, TCPS_HAVERCVDFIN, TCPS_LAST_ACK, TCPS_LISTEN, TCPS_SYN_RECEIVED, TCPS_SYN_SENT, TCPS_TIME_WAIT, TCPSTAT_ADD, TCPSTAT_INC, TF2_FBYTES_COMPLETE, TF_ACKNOW, TF_DELACK, TF_LRD, TF_NEEDFIN, TF_NEEDSYN, TF_NOOPT, TF_PREVVALID, TF_RCVD_SCALE, TF_RCVD_TSTMP, TF_REQ_SCALE, TF_REQ_TSTMP, TF_SACK_PERMIT, TF_SENTFIN, TF_SIGNATURE, TF_WAKESOR, tcpopt::to_flags, tcpopt::to_mss, TO_SYN, tcpopt::to_tfo_cookie, tcpopt::to_tfo_len, tcpopt::to_tsecr, tcpopt::to_tsval, tcpopt::to_wscale, TOF_FASTOPEN, TOF_MSS, TOF_SACK, TOF_SACKPERM, TOF_SCALE, TOF_SIGNATURE, TOF_TS, TP_KEEPIDLE, TP_MAXIDLE, tcpcb::ts_offset, tcpcb::ts_recent, tcpcb::ts_recent_age, TSTMP_GEQ, TSTMP_GT, TSTMP_LT, TT_2MSL, TT_DELACK, TT_KEEP, TT_PERSIST, TT_REXMT, V_drop_synfin, V_tcp_do_newsack, V_tcp_do_prr, V_tcp_do_rfc3042, V_tcp_insecure_rst, V_tcp_insecure_syn, V_tcp_tolerate_missing_ts, and VOI_TCP_FRWIN.
void tcp_dooptions | ( | struct tcpopt * | to, |
u_char * | cp, | ||
int | cnt, | ||
int | flags | ||
) |
Definition at line 3422 of file tcp_input.c.
References TCPSTAT_INC, tcpopt::to_flags, tcpopt::to_mss, tcpopt::to_nsacks, tcpopt::to_sacks, tcpopt::to_signature, TO_SYN, tcpopt::to_tfo_cookie, tcpopt::to_tfo_len, tcpopt::to_tsecr, tcpopt::to_tsval, tcpopt::to_wscale, TOF_FASTOPEN, TOF_MSS, TOF_SACK, TOF_SACKPERM, TOF_SCALE, TOF_SIGNATURE, TOF_TS, V_tcp_do_sack, V_tcp_fastopen_client_enable, and V_tcp_fastopen_server_enable.
Referenced by bbr_do_segment_nounlock(), rack_do_segment_nounlock(), tcp_do_segment(), and tcp_input_with_port().
void tcp_drain | ( | void | ) |
Definition at line 2515 of file tcp_subr.c.
References do_tcpdrain, INP_ALL_ITERATOR, inpcb::inp_flags, inp_next(), INP_TIMEWAIT, INPLOOKUP_WLOCKPCB, intotcpcb, tcp_clean_sackreport(), tcp_log_drain(), tcp_pcap_aggressive_free, tcp_pcap_drain(), tcp_reass_flush(), and V_tcbinfo.
Definition at line 2283 of file tcp_subr.c.
References inpcb::inp_socket, INP_WLOCK_ASSERT, tcpcb::t_inpcb, tcpcb::t_softerror, tcpcb::t_state, tcp_close(), tcp_state_change(), TCPS_CLOSED, TCPS_HAVERCVDSYN, and TCPSTAT_INC.
Referenced by bbr_do_syn_sent(), ctf_challenge_ack(), ctf_do_dropwithreset_conn(), rack_do_compressed_ack_processing(), rack_do_syn_sent(), sysctl_drop(), tcp_disconnect(), tcp_do_segment(), tcp_drop_syn_sent(), tcp_notify(), tcp_timer_keep(), tcp_timer_persist(), tcp_timer_rexmt(), tcp_usr_abort(), and toe_connect_failed().
Definition at line 3336 of file tcp_subr.c.
References INP_DROPPED, inpcb::inp_flags, INP_TIMEWAIT, INP_WLOCK_ASSERT, intotcpcb, IS_FASTOPEN, tcpcb::t_flags, tcpcb::t_state, tcp_drop(), tcp_fastopen_disable_path(), and TCPS_SYN_SENT.
void tcp_dropwithreset | ( | struct mbuf * | m, |
struct tcphdr * | th, | ||
struct tcpcb * | tp, | ||
int | tlen, | ||
int | rstreason | ||
) |
Definition at line 3357 of file tcp_input.c.
References badport_bandlim(), in_broadcast(), INADDR_BROADCAST, INP_LOCK_ASSERT, ip6_hdr::ip6_dst, ip6_hdr::ip6_src, ip::ip_dst, ip_v, in_addr::s_addr, tcpcb::t_inpcb, tcp_get_flags(), and tcp_respond().
Referenced by ctf_do_dropwithreset(), ctf_do_dropwithreset_conn(), tcp_do_segment(), and tcp_input_with_port().
int tcp_dsack_block_exists | ( | struct tcpcb * | tp | ) |
Definition at line 161 of file tcp_sack.c.
References sackblk::end, tcpcb::rcv_numsacks, tcpcb::rcv_nxt, tcpcb::sackblks, and SEQ_LEQ.
Referenced by rack_output().
|
inlinestatic |
Definition at line 1245 of file tcp_var.h.
Referenced by ctf_process_inbound_raw(), and tcp_input_with_port().
|
inlinestatic |
Definition at line 1255 of file tcp_var.h.
Referenced by tcp_log_event_().
void tcp_fini | ( | void * | xtp | ) |
Definition at line 1626 of file tcp_subr.c.
Referenced by tcp_init().
u_int tcp_fixed_maxseg | ( | const struct tcpcb * | tp | ) |
Definition at line 3587 of file tcp_subr.c.
References PAD, tcpcb::t_flags, tcpcb::t_maxseg, tcpcb::t_state, TCPS_HAVEESTABLISHED, TF_NOOPT, TF_RCVD_TSTMP, TF_REQ_SCALE, TF_REQ_TSTMP, TF_SACK_PERMIT, and TF_SIGNATURE.
Referenced by ctf_fixed_maxseg(), newreno_cc_cong_signal(), and newreno_cong_signal().
void tcp_free_sackholes | ( | struct tcpcb * | tp | ) |
Definition at line 830 of file tcp_sack.c.
References INP_WLOCK_ASSERT, sackhint::nexthole, sackhint::sack_bytes_rexmit, tcpcb::sackhint, tcpcb::snd_numholes, tcpcb::t_inpcb, and tcp_sackhole_remove().
Referenced by tcp_discardcb(), tcp_mtudisc(), tcp_timer_2msl(), and tcp_timer_rexmt().
bool tcp_freecb | ( | struct tcpcb * | tp | ) |
Definition at line 2379 of file tcp_subr.c.
References INP_IPV6, inpcb::inp_socket, inpcb::inp_vflag, INP_WLOCK_ASSERT, tcpcb::snd_ssthresh, tcpcb::t_fb, tcpcb::t_inpcb, tcpcb::t_maxseg, tcpcb::t_rttupdated, tcpcb::t_state, tcpcb::t_timers, tcp_hc_update(), tcp_log_tcpcbfini(), TCPSTATES_DEC, tcp_function_block::tfb_tcp_fb_fini, and tcp_timer::tt_draincnt.
Referenced by tcp_discardcb(), and tcp_timer_discard().
|
inlinestatic |
Definition at line 1265 of file tcp_var.h.
Referenced by bbr_do_segment_nounlock(), bbr_log_ack(), bbr_process_data(), cc_ecnpkt_handler(), rack_do_segment_nounlock(), rack_log_ack(), rack_process_data(), syncache_add(), syncache_chkrst(), syncache_expand(), tcp_do_segment(), tcp_dropwithreset(), tcp_input_with_port(), tcp_log_addr(), tcp_lro_condense(), tcp_lro_rx_common(), tcp_reass(), tcp_reass_append(), tcp_respond(), tcp_set_entry_to_mbuf(), tcp_trace(), and tcp_twcheck().
void tcp_handle_wakeup | ( | struct tcpcb * | tp, |
struct socket * | so | ||
) |
Definition at line 1496 of file tcp_input.c.
References INP_LOCK_ASSERT, tcpcb::t_flags, tcpcb::t_inpcb, and TF_WAKESOR.
Referenced by tcp_do_segment().
void tcp_hc_get | ( | struct in_conninfo * | inc, |
struct hc_metrics_lite * | hc_metrics_lite | ||
) |
Definition at line 377 of file tcp_hostcache.c.
References hc_metrics_lite::rmx_cwnd, hc_metrics_lite::rmx_mtu, hc_metrics_lite::rmx_recvpipe, hc_metrics_lite::rmx_rtt, hc_metrics_lite::rmx_rttvar, hc_metrics_lite::rmx_sendpipe, hc_metrics_lite::rmx_ssthresh, tcp_hc_lookup(), V_tcp_hostcache, and V_tcp_use_hostcache.
Referenced by cc_conn_init(), and tcp_mss_update().
uint32_t tcp_hc_getmtu | ( | struct in_conninfo * | inc | ) |
Definition at line 416 of file tcp_hostcache.c.
References tcp_hc_lookup(), V_tcp_hostcache, and V_tcp_use_hostcache.
Referenced by sctp_hc_get_mtu(), and tcp_mssopt().
void tcp_hc_init | ( | void | ) |
Definition at line 227 of file tcp_hostcache.c.
References tcp_hc_purge(), TCP_HOSTCACHE_BUCKETLIMIT, TCP_HOSTCACHE_EXPIRE, TCP_HOSTCACHE_HASHSIZE, TCP_HOSTCACHE_PRUNE, V_tcp_hc_callout, and V_tcp_hostcache.
Referenced by tcp_vnet_init().
void tcp_hc_update | ( | struct in_conninfo * | inc, |
struct hc_metrics_lite * | hcml | ||
) |
Definition at line 452 of file tcp_hostcache.c.
References HOSTCACHE_HASH, in_conninfo::inc_flags, INC_ISIPV6, hc_metrics_lite::rmx_cwnd, hc_metrics_lite::rmx_mtu, hc_metrics_lite::rmx_recvpipe, hc_metrics_lite::rmx_rtt, hc_metrics_lite::rmx_rttvar, hc_metrics_lite::rmx_sendpipe, hc_metrics_lite::rmx_ssthresh, tcp_hc_cmp(), TCPSTAT_INC, THC_LOCK, THC_UNLOCK, V_tcp_hostcache, and V_tcp_use_hostcache.
Referenced by tcp_freecb(), and tcp_hc_updatemtu().
void tcp_hc_updatemtu | ( | struct in_conninfo * | inc, |
uint32_t | mtu | ||
) |
Definition at line 440 of file tcp_hostcache.c.
References hc_metrics_lite::rmx_mtu, and tcp_hc_update().
Referenced by sctp_hc_set_mtu().
int tcp_input | ( | struct mbuf ** | mp, |
int * | offp, | ||
int | proto | ||
) |
Definition at line 1490 of file tcp_input.c.
References tcp_input_with_port().
int tcp_input_with_port | ( | struct mbuf ** | mp, |
int * | offp, | ||
int | proto, | ||
uint16_t | port | ||
) |
Definition at line 608 of file tcp_input.c.
References BANDLIM_RST_CLOSEDPORT, BANDLIM_RST_OPENPORT, BANDLIM_UNLIMITED, ipovly::ih_len, ipovly::ih_x1, in_broadcast(), in_localip(), in_pcblookup(), in_pcblookup_mbuf(), in_pseudo(), INADDR_BROADCAST, in_conninfo::inc_fibnum, in_conninfo::inc_flags, INC_IPV6MINMTU, INC_ISIPV6, INP_DROPPED, inpcb::inp_flags, inpcb::inp_flowid, inpcb::inp_flowtype, inpcb::inp_inc, inpcb::inp_ip_minttl, INP_LOCK_ASSERT, INP_RLOCK_ASSERT, inpcb::inp_socket, INP_TIMEWAIT, INP_TRY_UPGRADE, INP_UNLOCK, INP_WLOCK_ASSERT, INPLOOKUP_RLOCKPCB, INPLOOKUP_WILDCARD, INPLOOKUP_WLOCKPCB, intotcpcb, ip6_hdr::ip6_dst, IP6_HDR_LEN, ip6_hdr::ip6_src, ip::ip_dst, ip::ip_hl, ip::ip_len, ip_stripoptions(), ip::ip_tos, ip::ip_ttl, ip::ip_v, IPPROTO_TCP, IPV6_TRAFFIC_CLASS, IPVERSION, in_addr::s_addr, sockaddr_in::sin_addr, sockaddr_in::sin_port, sotoinpcb, syncache_add(), syncache_badack(), syncache_chkrst(), syncache_expand(), tcpcb::t_fb, tcpcb::t_flags, tcpcb::t_port, tcpcb::t_state, TA_INPUT, tcp_dooptions(), tcp_dropwithreset(), tcp_fields_to_host(), tcp_get_flags(), tcp_log_addrs(), tcp_log_vain(), tcp_offload_input(), TCP_PROBE3, TCP_PROBE5, tcp_trace(), tcp_twcheck(), TCPS_CLOSED, TCPS_LISTEN, TCPS_SYN_RECEIVED, TCPSTAT_INC, TF_SIGNATURE, TF_TOE, tcp_function_block::tfb_tcp_do_segment, tcpopt::to_flags, tcpopt::to_signature, TO_SYN, TOF_SIGNATURE, V_blackhole, V_blackhole_local, V_drop_synfin, V_tcbinfo, V_tcp_log_in_vain, and V_tcp_sc_rst_sock_fail.
Referenced by tcp_input(), and tcp_recv_udp_tunneled_packet().
char * tcp_log_addrs | ( | struct in_conninfo * | inc, |
struct tcphdr * | th, | ||
void * | ip4hdr, | ||
const void * | ip6hdr | ||
) |
Definition at line 3901 of file tcp_subr.c.
References tcp_log_addr(), and tcp_log_debug.
Referenced by syncache_add(), syncache_chkrst(), syncache_expand(), syncache_pause(), syncache_socket(), syncache_timer(), tcp_do_segment(), tcp_input_with_port(), and tcp_reass().
Definition at line 4081 of file tcp_subr.c.
References tcpcb::t_end_info_bytes, tcpcb::t_end_info_status, TCP_EI_EMPTY_SLOT, TCP_EI_STATUS_MAX_VALUE, and TCP_END_BYTE_INFO.
Referenced by __ctf_process_rst(), bbr_check_data_after_close(), bbr_do_segment_nounlock(), bbr_do_syn_recv(), bbr_do_syn_sent(), bbr_output_wtime(), bbr_process_ack(), bbr_timeout_keepalive(), bbr_timeout_persist(), bbr_timeout_rxt(), ctf_progress_timeout_check(), rack_check_data_after_close(), rack_do_compressed_ack_processing(), rack_do_segment_nounlock(), rack_do_syn_recv(), rack_do_syn_sent(), rack_output(), rack_process_ack(), rack_timeout_keepalive(), rack_timeout_persist(), and rack_timeout_rxt().
char * tcp_log_vain | ( | struct in_conninfo * | inc, |
struct tcphdr * | th, | ||
void * | ip4hdr, | ||
const void * | ip6hdr | ||
) |
Definition at line 3889 of file tcp_subr.c.
References tcp_log_addr(), and V_tcp_log_in_vain.
Referenced by tcp_input_with_port().
void tcp_lost_retransmission | ( | struct tcpcb * | , |
struct tcphdr * | |||
) |
struct mbuf * tcp_m_copym | ( | struct mbuf * | m, |
int32_t | off0, | ||
int32_t * | plen, | ||
int32_t | seglimit, | ||
int32_t | segsize, | ||
struct sockbuf * | sb, | ||
bool | hw_tls | ||
) |
Definition at line 1954 of file tcp_output.c.
Referenced by bbr_output_wtime(), rack_output(), and tcp_default_output().
uint32_t tcp_maxmtu | ( | struct in_conninfo * | , |
struct tcp_ifcap * | |||
) |
uint32_t tcp_maxmtu6 | ( | struct in_conninfo * | , |
struct tcp_ifcap * | |||
) |
u_int tcp_maxseg | ( | const struct tcpcb * | tp | ) |
Definition at line 3538 of file tcp_subr.c.
References tcpcb::rcv_numsacks, tcpcb::t_flags, tcpcb::t_maxseg, tcpcb::t_state, TCPS_HAVEESTABLISHED, TF_NOOPT, TF_RCVD_TSTMP, TF_REQ_SCALE, TF_REQ_TSTMP, TF_SACK_PERMIT, and TF_SIGNATURE.
Referenced by cc_ack_received(), cc_conn_init(), cubic_cong_signal(), dctcp_cong_signal(), htcp_cong_signal(), newreno_cc_after_idle(), rack_get_bw(), rc_init_window(), tcp_default_output(), tcp_do_prr_ack(), tcp_do_segment(), tcp_newreno_partial_ack(), tcp_sack_lost_retransmission(), and tcp_sack_partialack().
void tcp_mss | ( | struct tcpcb * | tp, |
int | offer | ||
) |
Definition at line 3814 of file tcp_input.c.
References tcp_ifcap::ifcap, inpcb::inp_socket, hc_metrics_lite::rmx_recvpipe, hc_metrics_lite::rmx_sendpipe, tcpcb::t_flags, tcpcb::t_inpcb, tcpcb::t_maxseg, tcpcb::t_tsomax, tcpcb::t_tsomaxsegcount, tcpcb::t_tsomaxsegsize, tcp_mss_update(), TF_TSO, tcp_ifcap::tsomax, tcp_ifcap::tsomaxsegcount, tcp_ifcap::tsomaxsegsize, V_tcp_recvspace, and V_tcp_sendspace.
Referenced by bbr_do_segment_nounlock(), rack_do_segment_nounlock(), syncache_socket(), tcp_do_segment(), tcp_fastopen_connect(), and tcp_usr_send().
void tcp_mss_update | ( | struct tcpcb * | tp, |
int | offer, | ||
int | mtuoffer, | ||
struct hc_metrics_lite * | metricptr, | ||
struct tcp_ifcap * | cap | ||
) |
Definition at line 3665 of file tcp_input.c.
References in_localaddr(), inpcb::inp_inc, INP_IPV6, inpcb::inp_vflag, INP_WLOCK_ASSERT, hc_metrics_lite::rmx_mtu, tcpcb::t_inpcb, tcpcb::t_maxseg, tcp_hc_get(), tcp_maxmtu(), tcp_maxmtu6(), V_path_mtu_discovery, V_tcp_minmss, V_tcp_mssdflt, and V_tcp_udp_tunneling_overhead.
Referenced by bbr_output_wtime(), rack_output(), tcp_default_output(), tcp_mss(), and tcp_mtudisc().
int tcp_mssopt | ( | struct in_conninfo * | inc | ) |
Definition at line 3891 of file tcp_input.c.
References in_conninfo::inc_flags, INC_ISIPV6, tcp_hc_getmtu(), tcp_maxmtu(), tcp_maxmtu6(), and V_tcp_mssdflt.
Referenced by bbr_output_wtime(), rack_output(), syncache_respond(), and tcp_default_output().
tcp_seq tcp_new_isn | ( | struct in_conninfo * | inc | ) |
Definition at line 3298 of file tcp_subr.c.
References ISN_BYTES_PER_SECOND, ISN_LOCK, ISN_RANDOM_INCREMENT, ISN_STATIC_INCREMENT, ISN_UNLOCK, SEQ_GT, tcp_keyed_hash(), V_isn_last, V_isn_last_reseed, V_isn_offset, V_isn_offset_old, V_isn_secret, and V_tcp_isn_reseed_interval.
uint32_t tcp_new_ts_offset | ( | struct in_conninfo * | inc | ) |
Definition at line 3220 of file tcp_subr.c.
References tcp_keyed_hash(), V_tcp_ts_offset_per_conn, and V_ts_offset_secret.
Referenced by syncache_add(), and syncookie_lookup().
int tcp_newreno | ( | struct tcpcb * | , |
struct tcphdr * | |||
) |
void tcp_newreno_partial_ack | ( | struct tcpcb * | tp, |
struct tcphdr * | th | ||
) |
Definition at line 4008 of file tcp_input.c.
References BYTES_THIS_ACK, INP_WLOCK_ASSERT, SEQ_GT, tcpcb::snd_cwnd, tcpcb::snd_nxt, tcpcb::t_flags, tcpcb::t_inpcb, tcpcb::t_rtttime, tcp_maxseg(), tcp_timer_activate(), TF_ACKNOW, and TT_REXMT.
Referenced by tcp_do_segment().
Definition at line 2150 of file tcp_subr.c.
References CC_ALGO, cc_attach(), CC_DEFAULT_ALGO, cc_detach(), tcpcb_mem::ccv, tcpcb::ccv, cc_var::ccvc, in_pcbref(), in_pcbrele_wlocked(), inpcb::inp_ip_ttl, INP_IPV6, inpcb::inp_ppcb, inpcb::inp_vflag, IPPROTO_TCP, tcpcb::osd, tcpcb::snd_cwnd, tcpcb::snd_ssthresh, tcpcb::t_fb, tcpcb::t_flags, tcpcb::t_inpcb, tcpcb::t_maxseg, tcpcb::t_pacing_rate, tcpcb::t_rcvtime, tcpcb::t_rttmin, tcpcb::t_rttvar, tcpcb::t_rxtcur, tcpcb::t_segq, tcpcb::t_srtt, tcpcb::t_stats, tcpcb::t_timers, tcpcb::t_vnet, tcpcb_mem::tcb, cc_var::ccv_container::tcp, tcp_func_set_ptr, tcp_function_lock, tcp_log_tcpcbinit(), tcp_pcap_tcpcb_init(), tcp_rexmit_initial, tcp_rexmit_min, TCP_RTTVAR_SHIFT, TCPTV_SRTTBASE, TF_LRD, TF_REQ_SCALE, TF_REQ_TSTMP, TF_SACK_PERMIT, tcp_function_block::tfb_refcnt, tcp_function_block::tfb_tcp_fb_fini, tcp_function_block::tfb_tcp_fb_init, tcpcb_mem::tt, tcp_timer::tt_2msl, tcp_timer::tt_delack, tcp_timer::tt_keep, tcp_timer::tt_persist, tcp_timer::tt_rexmt, cc_var::type, V_ip_defttl, V_tcp_do_lrd, V_tcp_do_rfc1323, V_tcp_do_sack, V_tcp_mssdflt, and V_tcpcb_zone.
Referenced by tcp_usr_attach().
void tcp_pulloutofband | ( | struct socket * | so, |
struct tcphdr * | th, | ||
struct mbuf * | m, | ||
int | off | ||
) |
Definition at line 3530 of file tcp_input.c.
References INP_WLOCK_ASSERT, sototcpcb, tcpcb::t_inpcb, tcpcb::t_iobc, tcpcb::t_oobflags, and TCPOOB_HAVEDATA.
Referenced by tcp_do_segment().
int tcp_reass | ( | struct tcpcb * | tp, |
struct tcphdr * | th, | ||
tcp_seq * | seq_start, | ||
int * | tlenp, | ||
struct mbuf * | m | ||
) |
+--last v
reassembly buffer |—| |—| |—| new segment |—|
+--last v
reassembly buffer |—| |—| |—| new segment |—|
first-------+ v
rea: |—| |—| |—| new: |—| Note the case we do not deal with here is: rea= |—| |—| |—| new= |-—| Due to the fact that it could be new |-----------------—| And we might need to merge forward.
first---->+ v
rea= |—| .... new" |—|
Now is this fit just in-between only? i.e.: p—+ +-—q v v res= |–| |–| |–| nee |-|
If we reach here we have some (possibly all) overlap such as: res= |–| |–| |–| new= |-—| or new= |--------------—| or new= |-----—| or new= |—| or new= |--------—|
prev seg---->+ v
reassembly buffer |—| new segment |-|
prev seg---->+ v
reassembly buffer |—| new segment |--—|
prev seg---->+ v
reassembly buffer |–| |—| new segment |–| (note: it was trimmed above if it overlapped)
next seg---->+ v
reassembly buffer |–| |—| new segment |-------—|
next seg---->+ v
reassembly buffer |–| |—| new segment |-------—|
Definition at line 526 of file tcp_reass.c.
References inpcb::inp_inc, inpcb::inp_socket, INP_WLOCK_ASSERT, tcpcb::rcv_nxt, SEQ_GEQ, SEQ_GT, SEQ_LEQ, SEQ_LT, tcpcb::t_flags, tcpcb::t_inpcb, tcpcb::t_maxseg, tcpcb::t_rcvoopack, tcpcb::t_segq, tcpcb::t_segqlen, tcpcb::t_segqmbuflen, tcpcb::t_state, tcp_get_flags(), tcp_log_addrs(), tcp_new_limits, TCP_R_LOG_ADD, TCP_R_LOG_LIMIT_REACHED, TCP_R_LOG_NEW_ENTRY, TCP_R_LOG_READ, TCP_R_LOG_TRIM, TCP_R_LOG_ZERO, tcp_reass_append(), tcp_reass_maxqueuelen, tcp_reass_merge_forward(), tcp_reass_overhead_of_chain(), tcp_reass_prepend(), tcp_reass_queue_guard, tcp_reass_replace(), tcp_reass_zone, TCPS_HAVEESTABLISHED, tcps_rcvmemdrop, TCPSTAT_ADD, TCPSTAT_INC, TF_WAKESOR, tseg_qent::tqe_flags, tseg_qent::tqe_last, tseg_qent::tqe_len, tseg_qent::tqe_m, tseg_qent::tqe_mbuf_cnt, and tseg_qent::tqe_start.
Referenced by bbr_do_syn_recv(), bbr_process_data(), rack_do_syn_recv(), rack_process_data(), and tcp_do_segment().
void tcp_reass_flush | ( | struct tcpcb * | tp | ) |
Definition at line 305 of file tcp_reass.c.
References INP_WLOCK_ASSERT, tcpcb::t_inpcb, tcpcb::t_segq, tcpcb::t_segqlen, tcpcb::t_segqmbuflen, tcp_reass_zone, and tseg_qent::tqe_m.
Referenced by tcp_discardcb(), and tcp_drain().
void tcp_reass_global_init | ( | void | ) |
Definition at line 273 of file tcp_reass.c.
References tcp_reass_maxseg, tcp_reass_zone, and tcp_reass_zone_change().
Referenced by tcp_init().
void tcp_record_dsack | ( | struct tcpcb * | tp, |
tcp_seq | start, | ||
tcp_seq | end, | ||
int | tlp | ||
) |
Definition at line 397 of file tcp_subr.c.
References SEQ_GT, tcpcb::t_dsack_bytes, tcpcb::t_dsack_pack, tcpcb::t_dsack_tlp_bytes, TCPSTAT_ADD, and TCPSTAT_INC.
Referenced by bbr_log_ack(), rack_log_ack(), and tcp_sack_doack().
void tcp_respond | ( | struct tcpcb * | tp, |
void * | ipgen, | ||
struct tcphdr * | th, | ||
struct mbuf * | m, | ||
tcp_seq | ack, | ||
tcp_seq | seq, | ||
int | flags | ||
) |
Definition at line 1728 of file tcp_subr.c.
References tcp_log_bbr::delivered, ERRNO_UNK, tcp_log_bbr::flex8, in_pseudo(), tcp_log_bbr::inhpts, inpcb::inp_in_hpts, INP_LOCK_ASSERT, inpcb::inp_socket, INP_WLOCKED, ip6_hdr::ip6_dst, ip6_hdr::ip6_src, IP_DF, ip::ip_dst, ip::ip_len, ip::ip_off, ip_output(), ip::ip_p, ip::ip_ttl, IPPROTO_TCP, IPPROTO_UDP, IPV6_VERSION, tcp_log_bbr::pkts_out, tcpcb::rcv_scale, in_addr::s_addr, tcpcb::t_flags, tcpcb::t_inpcb, tcpcb::t_logstate, tcpcb::t_maxseg, tcpcb::t_port, tcpcb::t_state, TA_OUTPUT, tcp_addoptions(), tcp_get_flags(), tcp_get_usecs(), tcp_log_event_(), TCP_LOG_OUT, TCP_LOG_STATE_OFF, TCP_PROBE3, TCP_PROBE5, tcp_set_flags(), tcp_trace(), tcp_ts_getticks(), TCPS_CLOSED, TCPS_LISTEN, TF_NOOPT, TF_RCVD_TSTMP, TF_SIGNATURE, tcp_log_bbr::timeStamp, tcp_log_buffer::tlb_errno, tcpopt::to_flags, tcpopt::to_signature, tcpopt::to_tsecr, tcpopt::to_tsval, TOF_SIGNATURE, TOF_TS, tcpcb::ts_offset, tcpcb::ts_recent, tcp_log_stackspecific::u_bbr, udphdr::uh_dport, udphdr::uh_sport, udphdr::uh_sum, udphdr::uh_ulen, V_ip_defttl, V_path_mtu_discovery, V_tcp_udp_tunneling_port, and xchg.
Referenced by __ctf_process_rst(), bbr_timeout_keepalive(), bbr_timeout_persist(), ctf_challenge_ack(), rack_timeout_keepalive(), rack_timeout_persist(), tcp_do_segment(), tcp_dropwithreset(), tcp_timer_keep(), and tcp_twcheck().
void tcp_sack_adjust | ( | struct tcpcb * | tp | ) |
Definition at line 977 of file tcp_sack.c.
References sackhole::end, INP_WLOCK_ASSERT, SEQ_GEQ, SEQ_LT, tcpcb::snd_fack, tcpcb::snd_nxt, sackhole::start, and tcpcb::t_inpcb.
Referenced by tcp_default_output().
Definition at line 558 of file tcp_sack.c.
References sackhint::delivered_data, sackblk::end, sackhole::end, INP_WLOCK_ASSERT, sackhint::last_sack_ack, sackhole::rxmit, sackhint::sack_bytes_rexmit, sackhint::sacked_bytes, tcpcb::sackhint, SEQ_GEQ, SEQ_GT, SEQ_LEQ, SEQ_LT, SEQ_MAX, SEQ_MIN, tcpcb::snd_fack, tcpcb::snd_max, tcpcb::snd_recover, tcpcb::snd_una, sackblk::start, sackhole::start, tcpcb::t_flags, tcpcb::t_inpcb, tcp_record_dsack(), tcp_sackhole_insert(), tcp_sackhole_remove(), TF_LRD, tcpopt::to_flags, tcpopt::to_nsacks, tcpopt::to_sacks, and TOF_SACK.
Referenced by tcp_do_segment().
void tcp_sack_lost_retransmission | ( | struct tcpcb * | tp, |
struct tcphdr * | th | ||
) |
Definition at line 1013 of file tcp_sack.c.
References cc_cong_signal(), CC_NDUPACK, sackhole::end, EXIT_RECOVERY, IN_RECOVERY, sackhint::nexthole, sackhint::recover_fs, sackhole::rxmit, tcpcb::sackhint, SEQ_GEQ, SEQ_GT, tcpcb::snd_cwnd, tcpcb::snd_fack, tcpcb::snd_max, tcpcb::snd_recover, tcpcb::snd_ssthresh, tcpcb::snd_una, sackhole::start, tcpcb::t_flags, tcp_maxseg(), and TCPSTAT_INC.
Referenced by tcp_do_segment().
Definition at line 952 of file tcp_sack.c.
References sackhole::end, INP_WLOCK_ASSERT, sackhint::nexthole, sackhole::rxmit, sackhint::sack_bytes_rexmit, tcpcb::sackhint, SEQ_LT, and tcpcb::t_inpcb.
Referenced by tcp_default_output().
void tcp_sack_partialack | ( | struct tcpcb * | tp, |
struct tcphdr * | th | ||
) |
Definition at line 853 of file tcp_sack.c.
References BYTES_THIS_ACK, sackhint::delivered_data, INP_WLOCK_ASSERT, sackhint::sack_bytes_rexmit, tcpcb::sackhint, SEQ_LT, SEQ_MAX, tcpcb::snd_cwnd, tcpcb::snd_fack, tcpcb::snd_max, tcpcb::snd_nxt, tcpcb::snd_recover, tcpcb::snd_ssthresh, tcpcb::t_flags, tcpcb::t_inpcb, tcpcb::t_rtttime, tcp_maxseg(), tcp_sackhole_insert(), tcp_timer_activate(), TF_ACKNOW, TF_SENTFIN, TT_REXMT, and V_tcp_do_newsack.
Referenced by tcp_do_segment().
|
inlinestatic |
Definition at line 1271 of file tcp_var.h.
Referenced by bbr_output_wtime(), rack_fast_output(), rack_fast_rsm_output(), rack_log_input_packet(), rack_output(), syncache_respond(), tcp_default_output(), tcp_respond(), tcp_twrespond(), and tcpip_fillheaders().
void tcp_setpersist | ( | struct tcpcb * | tp | ) |
Definition at line 1754 of file tcp_output.c.
References tcpcb::t_flags, tcpcb::t_rttvar, tcpcb::t_rxtshift, tcpcb::t_srtt, tcp_backoff, TCP_MAXRXTSHIFT, tcp_persmax, tcp_persmin, tcp_timer_activate(), tcp_timer_active(), TCPT_RANGESET, TT_PERSIST, and TT_REXMT.
Referenced by tcp_default_fb_init(), tcp_default_output(), tcp_timer_persist(), and tcp_timers_unsuspend().
void tcp_slowtimo | ( | void | ) |
Definition at line 241 of file tcp_timer.c.
References tcp_tw_2msl_scan().
Definition at line 2119 of file tcp_output.c.
References tcpcb::snd_nxt, tcpcb::snd_una, tcpcb::snd_wnd, V_tcp_autosndbuf_inc, V_tcp_autosndbuf_max, V_tcp_do_autosndbuf, and V_tcp_sendbuf_auto_lowat.
Referenced by bbr_output_wtime(), and tcp_default_output().
void tcp_state_change | ( | struct tcpcb * | tp, |
int | newstate | ||
) |
Definition at line 3999 of file tcp_subr.c.
References tcpcb::t_state, TCP_PROBE6, TCPSTATES_DEC, and TCPSTATES_INC.
Referenced by __ctf_process_rst(), bbr_do_fin_wait_1(), bbr_do_syn_recv(), bbr_do_syn_sent(), bbr_process_data(), rack_do_compressed_ack_processing(), rack_do_fin_wait_1(), rack_do_syn_recv(), rack_do_syn_sent(), rack_process_data(), syncache_socket(), tcp_close(), tcp_do_segment(), tcp_drop(), tcp_twstart(), and tcp_usrclosed().
int tcp_stats_init | ( | void | ) |
Definition at line 95 of file tcp_stats.c.
References CC_ECN, CC_NDUPACK, CC_RTO, CC_RTO_ERR, VOI_TCP_ACKLEN, VOI_TCP_CALCFRWINDIFF, VOI_TCP_CSIG, VOI_TCP_FRWIN, VOI_TCP_GPUT, VOI_TCP_GPUT_ND, VOI_TCP_LCWIN, VOI_TCP_RETXPB, VOI_TCP_RTT, and VOI_TCP_TXPB.
Referenced by tcp_vnet_init().
int tcp_stats_sample_rollthedice | ( | struct tcpcb * | tp, |
void * | seed_bytes, | ||
size_t | seed_len | ||
) |
Definition at line 187 of file tcp_stats.c.
References INP_WLOCK_ASSERT, tcpcb::t_inpcb, tcpcb::t_stats, tcp_stats_tpl_sampling_lock, V_tcp_perconn_stats_sample_rates, and V_tcp_stats_nrates.
Referenced by tcp_log_grow_tlb().
void tcp_switch_back_to_default | ( | struct tcpcb * | tp | ) |
Definition at line 523 of file tcp_subr.c.
References find_and_ref_tcp_default_fb(), find_and_ref_tcp_fb(), tcpcb::t_fb, tcp_def_funcblk, tcp_function_block::tfb_refcnt, tcp_function_block::tfb_tcp_fb_fini, tcp_function_block::tfb_tcp_fb_init, and tcp_function_block::tfb_tcp_handoff_ok.
Referenced by bbr_do_segment_nounlock(), deregister_tcp_functions(), and rack_do_segment_nounlock().
Definition at line 854 of file tcp_timer.c.
References inp_to_cpuid(), tcpcb::t_fb, tcpcb::t_flags, tcpcb::t_inpcb, tcpcb::t_timers, tcp_timer_2msl(), tcp_timer_delack(), tcp_timer_keep(), tcp_timer_persist(), tcp_timer_rexmt(), TF_TOE, tcp_function_block::tfb_tcp_timer_activate, tcp_timer::tt_2msl, TT_2MSL, tcp_timer::tt_delack, TT_DELACK, tcp_timer::tt_flags, tcp_timer::tt_keep, TT_KEEP, tcp_timer::tt_persist, TT_PERSIST, tcp_timer::tt_rexmt, TT_REXMT, and TT_STOPPED.
Referenced by bbr_do_fin_wait_1(), bbr_do_syn_recv(), bbr_do_syn_sent(), cc_ecnpkt_handler_flags(), rack_do_compressed_ack_processing(), rack_do_fin_wait_1(), rack_do_syn_recv(), rack_do_syn_sent(), syncache_socket(), tcp_default_ctloutput(), tcp_default_fb_init(), tcp_default_output(), tcp_do_segment(), tcp_newreno_partial_ack(), tcp_sack_partialack(), tcp_setpersist(), tcp_timers_unsuspend(), tcp_usrclosed(), and toe_connect_failed().
Definition at line 905 of file tcp_timer.c.
References tcpcb::t_fb, tcpcb::t_timers, tcp_function_block::tfb_tcp_timer_active, tcp_timer::tt_2msl, TT_2MSL, tcp_timer::tt_delack, TT_DELACK, tcp_timer::tt_keep, TT_KEEP, tcp_timer::tt_persist, TT_PERSIST, tcp_timer::tt_rexmt, and TT_REXMT.
Referenced by bbr_stop_all_timers(), rack_stop_all_timers(), tcp_default_fb_init(), tcp_default_output(), tcp_do_segment(), tcp_setpersist(), and tcp_timers_unsuspend().
Definition at line 1063 of file tcp_timer.c.
References tcpcb::t_fb, tcpcb::t_timers, tcp_timer_discard(), tcp_function_block::tfb_tcp_timer_stop, tcp_timer::tt_2msl, TT_2MSL, tcp_timer::tt_delack, TT_DELACK, tcp_timer::tt_draincnt, tcp_timer::tt_flags, tcp_timer::tt_keep, TT_KEEP, tcp_timer::tt_persist, TT_PERSIST, tcp_timer::tt_rexmt, TT_REXMT, and TT_STOPPED.
Referenced by tcp_discardcb().
Definition at line 943 of file tcp_timer.c.
References tcpcb::t_timers, tcp_timer::tt_2msl, TT_2MSL, TT_2MSL_SUS, tcp_timer::tt_delack, TT_DELACK, TT_DELACK_SUS, tcp_timer::tt_flags, tcp_timer::tt_keep, TT_KEEP, TT_KEEP_SUS, tcp_timer::tt_persist, TT_PERSIST, TT_PERSIST_SUS, tcp_timer::tt_rexmt, TT_REXMT, and TT_REXMT_SUS.
Referenced by bbr_stop_all_timers(), and rack_stop_all_timers().
Definition at line 977 of file tcp_timer.c.
References inpcb::inp_socket, SEQ_GT, tcpcb::snd_max, tcpcb::snd_una, tcpcb::snd_wnd, tcpcb::t_flags, tcpcb::t_inpcb, tcpcb::t_rxtcur, tcpcb::t_rxtshift, tcpcb::t_state, tcpcb::t_timers, tcp_delacktime, tcp_fast_finwait2_recycle, tcp_finwait2_timeout, tcp_setpersist(), tcp_timer_activate(), tcp_timer_active(), TCPS_FIN_WAIT_2, TCPS_HAVEESTABLISHED, TF_DELACK, TP_KEEPIDLE, TP_KEEPINIT, TP_MAXIDLE, TT_2MSL, TT_2MSL_SUS, TT_DELACK, TT_DELACK_SUS, tcp_timer::tt_flags, TT_KEEP, TT_KEEP_SUS, TT_PERSIST, TT_PERSIST_SUS, TT_REXMT, and TT_REXMT_SUS.
void tcp_trace | ( | short | act, |
short | ostate, | ||
struct tcpcb * | tp, | ||
void * | ipgen, | ||
struct tcphdr * | th, | ||
int | req | ||
) |
Definition at line 99 of file tcp_debug.c.
References ip6_plen, ip_len, iptime(), tcpcb::rcv_nxt, tcpcb::rcv_up, tcpcb::rcv_wnd, tcpcb::snd_max, tcpcb::snd_nxt, tcpcb::snd_una, tcpcb::snd_wl1, tcpcb::snd_wl2, tcpcb::snd_wnd, tcpcb::t_state, TA_DROP, TA_INPUT, TA_OUTPUT, TA_USER, tcp_debug_mtx, tcp_debx, tcp_get_flags(), TCP_NDEBUG, tcp_debug::td_act, tcp_debug::td_cb, tcp_debug::td_family, tcp_debug::td_ostate, tcp_debug::td_req, tcp_debug::td_tcb, tcp_debug::td_ti, tcp_debug::td_ti6, tcp_debug::td_time, tcp_debug::th, tcpiphdr::ti_i, and tcpiphdr::ti_t.
Referenced by bbr_do_fastnewdata(), bbr_fastack(), bbr_output_wtime(), rack_do_fastnewdata(), rack_fastack(), tcp_default_output(), tcp_do_segment(), tcp_input_with_port(), tcp_respond(), tcp_timer_2msl(), tcp_timer_keep(), tcp_timer_persist(), and tcp_timer_rexmt().
void tcp_tw_init | ( | void | ) |
Definition at line 199 of file tcp_timewait.c.
References maxtcptw, tcptw_auto_size(), TW_LOCK_INIT, V_tcptw_zone, V_tw_lock, and V_twq_2msl.
Referenced by tcp_vnet_init().
void tcp_tw_zone_change | ( | void | ) |
Definition at line 191 of file tcp_timewait.c.
References maxtcptw, tcptw_auto_size(), and V_tcptw_zone.
int tcp_twcheck | ( | struct inpcb * | inp, |
struct tcpopt * | to, | ||
struct tcphdr * | th, | ||
struct mbuf * | m, | ||
int | tlen | ||
) |
Definition at line 392 of file tcp_timewait.c.
References INP_LOCK_ASSERT, INP_RLOCK_ASSERT, INP_TRY_UPGRADE, INP_UNLOCK, INP_WLOCK_ASSERT, intotw, tcptw::rcv_nxt, SEQ_GT, tcptw::snd_nxt, tcptw::t_port, tcptw::t_recent, tcp_get_flags(), TCP_PROBE5, tcp_respond(), tcp_tw_2msl_reset(), tcp_twclose(), tcp_twrespond(), TCPSTAT_INC, tcpopt::to_flags, tcpopt::to_tsval, TOF_TS, TSTMP_LT, and V_tcp_tolerate_missing_ts.
Referenced by tcp_input_with_port(), and toe_4tuple_check().
void tcp_twclose | ( | struct tcptw * | tw, |
int | reuse | ||
) |
Definition at line 541 of file tcp_timewait.c.
References in_pcbdrop(), in_pcbfree(), inpcb::inp_flags, inpcb::inp_ppcb, inpcb::inp_socket, INP_SOCKREF, INP_TIMEWAIT, INP_WLOCK_ASSERT, INP_WUNLOCK, intotw, tcp_tw_2msl_stop(), TCPSTAT_INC, and tcptw::tw_inpcb.
Referenced by sysctl_drop(), tcp_tw_2msl_scan(), and tcp_twcheck().
void tcp_twstart | ( | struct tcpcb * | tp | ) |
Definition at line 236 of file tcp_timewait.c.
References in_localip(), in_pcbdrop(), in_pcbref(), in_conninfo::inc_flags, INC_ISIPV6, INP_DROPPED, inpcb::inp_flags, inpcb::inp_inc, inpcb::inp_ppcb, inpcb::inp_socket, INP_SOCKREF, INP_TIMEWAIT, INP_WLOCK_ASSERT, INP_WUNLOCK, tcptw::last_win, tcpcb::rcv_adv, tcpcb::rcv_nxt, tcptw::rcv_nxt, tcpcb::rcv_scale, SEQ_GT, tcpcb::snd_nxt, tcptw::snd_nxt, tcpcb::t_flags, tcpcb::t_inpcb, tcpcb::t_port, tcptw::t_port, tcptw::t_recent, tcp_discardcb(), tcp_hpts_remove(), tcp_state_change(), tcp_tw_2msl_reset(), tcp_tw_2msl_scan(), tcp_twrespond(), TCPS_TIME_WAIT, TCPSTATES_INC, TF_ACKNOW, TF_NOOPT, TF_RCVD_TSTMP, TF_REQ_TSTMP, tcpcb::ts_offset, tcptw::ts_offset, tcpcb::ts_recent, tcptw::tw_cred, tcptw::tw_flags, tcptw::tw_inpcb, tcptw::tw_so_options, tcptw::tw_time, V_nolocaltimewait, and V_tcptw_zone.
Referenced by bbr_do_closing(), bbr_process_data(), rack_do_closing(), rack_do_compressed_ack_processing(), rack_process_data(), and tcp_do_segment().
void tcp_update_dsack_list | ( | struct tcpcb * | tp, |
tcp_seq | rcv_start, | ||
tcp_seq | rcv_end | ||
) |
Definition at line 176 of file tcp_sack.c.
References sackblk::end, INP_WLOCK_ASSERT, tcpcb::rcv_numsacks, tcpcb::rcv_nxt, tcpcb::sackblks, SEQ_GT, SEQ_LEQ, SEQ_LT, SEQ_MAX, SEQ_MIN, sackblk::start, and tcpcb::t_inpcb.
Referenced by bbr_process_data(), rack_process_data(), and tcp_do_segment().
void tcp_update_sack_list | ( | struct tcpcb * | tp, |
tcp_seq | rcv_laststart, | ||
tcp_seq | rcv_lastend | ||
) |
Definition at line 272 of file tcp_sack.c.
References sackblk::end, INP_WLOCK_ASSERT, tcpcb::rcv_numsacks, tcpcb::rcv_nxt, tcpcb::sackblks, SEQ_GEQ, SEQ_GT, SEQ_LEQ, SEQ_LT, sackblk::start, and tcpcb::t_inpcb.
Referenced by _ctf_drop_checks(), bbr_process_data(), rack_process_data(), and tcp_do_segment().
void tcp_xmit_timer | ( | struct tcpcb * | tp, |
int | rtt | ||
) |
Definition at line 3563 of file tcp_input.c.
References INP_WLOCK_ASSERT, tcpcb::t_inpcb, tcpcb::t_rttbest, tcpcb::t_rttmin, tcpcb::t_rtttime, tcpcb::t_rttupdated, tcpcb::t_rttvar, tcpcb::t_rxtcur, tcpcb::t_rxtshift, tcpcb::t_softerror, tcpcb::t_srtt, tcpcb::t_stats, TCP_DELTA_SHIFT, TCP_REXMTVAL, TCP_RTT_INVALIDATE, TCP_RTT_SHIFT, TCP_RTTVAR_SHIFT, TCPSTAT_INC, TCPT_RANGESET, TCPTV_REXMTMAX, and VOI_TCP_RTT.
Referenced by tcp_do_segment().
Definition at line 1637 of file tcp_subr.c.
References inpcb::inp_flow, inpcb::inp_ip_tos, inpcb::inp_ip_ttl, INP_IPV6, inpcb::inp_vflag, INP_WLOCK_ASSERT, ip6_hdr::ip6_dst, ip6_hdr::ip6_src, ip::ip_dst, ip::ip_hl, ip::ip_id, ip::ip_len, ip::ip_off, ip::ip_p, ip::ip_sum, ip::ip_tos, ip::ip_ttl, ip::ip_v, IPPROTO_TCP, IPPROTO_UDP, IPV6_FLOWINFO_MASK, IPV6_VERSION, IPV6_VERSION_MASK, IPVERSION, and tcp_set_flags().
Referenced by bbr_output_wtime(), rack_init_fsb_block(), rack_output(), tcp_default_output(), tcp_twrespond(), and tcpip_maketemplate().
Definition at line 1702 of file tcp_subr.c.
References tcpip_fillheaders(), tcptemp::tt_ipgen, and tcptemp::tt_t.
Referenced by bbr_timeout_keepalive(), bbr_timeout_persist(), rack_timeout_keepalive(), rack_timeout_persist(), and tcp_timer_keep().
VNET_DECLARE | ( | counter_u64_t | , |
tcps_states | [TCP_NSTATES] | ||
) |
VNET_DECLARE | ( | int | , |
drop_synfin | |||
) |
VNET_DECLARE | ( | int | , |
path_mtu_discovery | |||
) |
VNET_DECLARE | ( | int | , |
tcp_abc_l_var | |||
) |
VNET_DECLARE | ( | int | , |
tcp_autorcvbuf_max | |||
) |
VNET_DECLARE | ( | int | , |
tcp_autosndbuf_inc | |||
) |
VNET_DECLARE | ( | int | , |
tcp_autosndbuf_max | |||
) |
VNET_DECLARE | ( | int | , |
tcp_delack_enabled | |||
) |
VNET_DECLARE | ( | int | , |
tcp_do_autorcvbuf | |||
) |
VNET_DECLARE | ( | int | , |
tcp_do_autosndbuf | |||
) |
VNET_DECLARE | ( | int | , |
tcp_do_ecn | |||
) |
VNET_DECLARE | ( | int | , |
tcp_do_lrd | |||
) |
VNET_DECLARE | ( | int | , |
tcp_do_newcwv | |||
) |
VNET_DECLARE | ( | int | , |
tcp_do_newsack | |||
) |
VNET_DECLARE | ( | int | , |
tcp_do_prr | |||
) |
VNET_DECLARE | ( | int | , |
tcp_do_prr_conservative | |||
) |
VNET_DECLARE | ( | int | , |
tcp_do_rfc1323 | |||
) |
VNET_DECLARE | ( | int | , |
tcp_do_rfc3042 | |||
) |
VNET_DECLARE | ( | int | , |
tcp_do_rfc3390 | |||
) |
VNET_DECLARE | ( | int | , |
tcp_do_rfc3465 | |||
) |
VNET_DECLARE | ( | int | , |
tcp_do_sack | |||
) |
VNET_DECLARE | ( | int | , |
tcp_do_tso | |||
) |
VNET_DECLARE | ( | int | , |
tcp_ecn_maxretries | |||
) |
VNET_DECLARE | ( | int | , |
tcp_initcwnd_segments | |||
) |
VNET_DECLARE | ( | int | , |
tcp_insecure_rst | |||
) |
VNET_DECLARE | ( | int | , |
tcp_insecure_syn | |||
) |
VNET_DECLARE | ( | int | , |
tcp_log_in_vain | |||
) |
VNET_DECLARE | ( | int | , |
tcp_minmss | |||
) |
VNET_DECLARE | ( | int | , |
tcp_mssdflt | |||
) |
VNET_DECLARE | ( | int | , |
tcp_recvspace | |||
) |
VNET_DECLARE | ( | int | , |
tcp_sack_globalholes | |||
) |
VNET_DECLARE | ( | int | , |
tcp_sack_globalmaxholes | |||
) |
VNET_DECLARE | ( | int | , |
tcp_sack_maxholes | |||
) |
VNET_DECLARE | ( | int | , |
tcp_sc_rst_sock_fail | |||
) |
VNET_DECLARE | ( | int | , |
tcp_sendspace | |||
) |
VNET_DECLARE | ( | int | , |
tcp_tolerate_missing_ts | |||
) |
VNET_DECLARE | ( | int | , |
tcp_udp_tunneling_overhead | |||
) |
VNET_DECLARE | ( | int | , |
tcp_udp_tunneling_port | |||
) |
VNET_DECLARE | ( | struct inpcbinfo | , |
tcbinfo | |||
) |
VNET_DECLARE | ( | uint32_t | , |
tcp_map_entries_limit | |||
) |
VNET_DECLARE | ( | uint32_t | , |
tcp_map_split_limit | |||
) |
|
extern |
Definition at line 204 of file tcp_subr.c.
Referenced by __ctf_process_rst(), and ctf_ack_war_checks().
|
extern |
Definition at line 199 of file tcp_subr.c.
Referenced by __ctf_process_rst(), and ctf_ack_war_checks().
|
extern |
Definition at line 104 of file tcp_lro.c.
Referenced by tcp_init(), tcp_lro_rx(), and tcp_lro_rx_common().
|
extern |
Definition at line 102 of file tcp_lro.c.
Referenced by tcp_init().
|
extern |
Definition at line 100 of file tcp_lro.c.
Referenced by tcp_init().
|
extern |
Definition at line 98 of file tcp_lro.c.
Referenced by tcp_init().
|
extern |
Definition at line 96 of file tcp_lro.c.
Referenced by tcp_init().
|
extern |
Definition at line 99 of file tcp_lro.c.
Referenced by tcp_init().
|
extern |
Definition at line 97 of file tcp_lro.c.
Referenced by tcp_init().
|
extern |
Definition at line 103 of file tcp_lro.c.
Referenced by tcp_init().
|
extern |
Referenced by tcp_init().
|
extern |
Definition at line 101 of file tcp_lro.c.
Referenced by tcp_init().