FreeBSD kernel IPv4 code
tcp_var.h File Reference
#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>
Include dependency graph for tcp_var.h:
This graph shows which files directly or indirectly include this file:

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 tcpcbtcp_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 tcpcbtcp_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_blockfind_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_blockfind_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 inpcbtcp_drop_syn_sent (struct inpcb *, int)
 
struct tcpcbtcp_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 tcptemptcpip_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 sackholetcp_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
 

Macro Definition Documentation

◆ BYTES_THIS_ACK

#define BYTES_THIS_ACK (   tp,
  th 
)    (th->th_ack - tp->snd_una)

Definition at line 548 of file tcp_var.h.

◆ ENTER_CONGRECOVERY

#define ENTER_CONGRECOVERY (   t_flags)    t_flags |= TF_CONGRECOVERY

Definition at line 535 of file tcp_var.h.

◆ ENTER_FASTRECOVERY

#define ENTER_FASTRECOVERY (   t_flags)    t_flags |= TF_FASTRECOVERY

Definition at line 531 of file tcp_var.h.

◆ ENTER_RECOVERY

#define ENTER_RECOVERY (   t_flags)    t_flags |= (TF_CONGRECOVERY | TF_FASTRECOVERY)

Definition at line 539 of file tcp_var.h.

◆ EXIT_CONGRECOVERY

#define EXIT_CONGRECOVERY (   t_flags)    t_flags &= ~TF_CONGRECOVERY

Definition at line 536 of file tcp_var.h.

◆ EXIT_FASTRECOVERY

#define EXIT_FASTRECOVERY (   t_flags)    t_flags &= ~TF_FASTRECOVERY

Definition at line 532 of file tcp_var.h.

◆ EXIT_RECOVERY

#define EXIT_RECOVERY (   t_flags)    t_flags &= ~(TF_CONGRECOVERY | TF_FASTRECOVERY)

Definition at line 540 of file tcp_var.h.

◆ HHOOK_TCP_EST_IN

#define HHOOK_TCP_EST_IN   0

Definition at line 863 of file tcp_var.h.

◆ HHOOK_TCP_EST_OUT

#define HHOOK_TCP_EST_OUT   1

Definition at line 864 of file tcp_var.h.

◆ HHOOK_TCP_LAST

#define HHOOK_TCP_LAST   HHOOK_TCP_EST_OUT

Definition at line 865 of file tcp_var.h.

◆ IN_CONGRECOVERY

#define IN_CONGRECOVERY (   t_flags)    (t_flags & TF_CONGRECOVERY)

Definition at line 534 of file tcp_var.h.

◆ IN_FASTRECOVERY

#define IN_FASTRECOVERY (   t_flags)    (t_flags & TF_FASTRECOVERY)

Definition at line 530 of file tcp_var.h.

◆ IN_RECOVERY

#define IN_RECOVERY (   t_flags)    (t_flags & (TF_CONGRECOVERY | TF_FASTRECOVERY))

Definition at line 538 of file tcp_var.h.

◆ intotcpcb

#define intotcpcb (   ip)    ((struct tcpcb *)(ip)->inp_ppcb)

Definition at line 645 of file tcp_var.h.

◆ intotw

#define intotw (   ip)    ((struct tcptw *)(ip)->inp_ppcb)

Definition at line 646 of file tcp_var.h.

◆ IS_FASTOPEN

#define IS_FASTOPEN (   t_flags)    (false)

Definition at line 543 of file tcp_var.h.

◆ KMOD_TCPSTAT_ADD

#define KMOD_TCPSTAT_ADD (   name,
  val 
)     kmod_tcpstat_add(offsetof(struct tcpstat, name) / sizeof(uint64_t), val)

Definition at line 848 of file tcp_var.h.

◆ KMOD_TCPSTAT_INC

#define KMOD_TCPSTAT_INC (   name)    KMOD_TCPSTAT_ADD(name, 1)

Definition at line 850 of file tcp_var.h.

◆ SEGQ_EMPTY

#define SEGQ_EMPTY (   tp)    TAILQ_EMPTY(&(tp)->t_segq)

Definition at line 123 of file tcp_var.h.

◆ sototcpcb

#define sototcpcb (   so)    (intotcpcb(sotoinpcb(so)))

Definition at line 647 of file tcp_var.h.

◆ TCP_DELTA_SHIFT

#define TCP_DELTA_SHIFT   2 /* see tcp_input.c */

Definition at line 662 of file tcp_var.h.

◆ TCP_EI_BITS_2MS_TIMER

#define TCP_EI_BITS_2MS_TIMER   0x400 /* 2 MSL timer expired */

Definition at line 81 of file tcp_var.h.

◆ TCP_EI_BITS_CLIENT_FIN

#define TCP_EI_BITS_CLIENT_FIN   0x001

Definition at line 71 of file tcp_var.h.

◆ TCP_EI_BITS_CLIENT_RST

#define TCP_EI_BITS_CLIENT_RST   0x002

Definition at line 72 of file tcp_var.h.

◆ TCP_EI_BITS_DATA_A_CLO

#define TCP_EI_BITS_DATA_A_CLO   0x100

Definition at line 79 of file tcp_var.h.

◆ TCP_EI_BITS_KEEP_MAX

#define TCP_EI_BITS_KEEP_MAX   0x080

Definition at line 78 of file tcp_var.h.

◆ TCP_EI_BITS_PRESIST_MAX

#define TCP_EI_BITS_PRESIST_MAX   0x040

Definition at line 77 of file tcp_var.h.

◆ TCP_EI_BITS_PROGRESS

#define TCP_EI_BITS_PROGRESS   0x020

Definition at line 76 of file tcp_var.h.

◆ TCP_EI_BITS_RETRAN

#define TCP_EI_BITS_RETRAN   0x010

Definition at line 75 of file tcp_var.h.

◆ TCP_EI_BITS_RST_IN_FR

#define TCP_EI_BITS_RST_IN_FR   0x200 /* a front state reset */

Definition at line 80 of file tcp_var.h.

◆ TCP_EI_BITS_SERVER_FIN

#define TCP_EI_BITS_SERVER_FIN   0x004

Definition at line 73 of file tcp_var.h.

◆ TCP_EI_BITS_SERVER_RST

#define TCP_EI_BITS_SERVER_RST   0x008

Definition at line 74 of file tcp_var.h.

◆ TCP_EI_EMPTY_SLOT

#define TCP_EI_EMPTY_SLOT   0

Definition at line 50 of file tcp_var.h.

◆ TCP_EI_STATUS_2MSL

#define TCP_EI_STATUS_2MSL   0xb

Definition at line 61 of file tcp_var.h.

◆ TCP_EI_STATUS_CLIENT_FIN

#define TCP_EI_STATUS_CLIENT_FIN   0x1

Definition at line 51 of file tcp_var.h.

◆ TCP_EI_STATUS_CLIENT_RST

#define TCP_EI_STATUS_CLIENT_RST   0x2

Definition at line 52 of file tcp_var.h.

◆ TCP_EI_STATUS_DATA_A_CLOSE

#define TCP_EI_STATUS_DATA_A_CLOSE   0x9

Definition at line 59 of file tcp_var.h.

◆ TCP_EI_STATUS_KEEP_MAX

#define TCP_EI_STATUS_KEEP_MAX   0x8

Definition at line 58 of file tcp_var.h.

◆ TCP_EI_STATUS_MAX_VALUE

#define TCP_EI_STATUS_MAX_VALUE   0xb

Definition at line 62 of file tcp_var.h.

◆ TCP_EI_STATUS_PERSIST_MAX

#define TCP_EI_STATUS_PERSIST_MAX   0x7

Definition at line 57 of file tcp_var.h.

◆ TCP_EI_STATUS_PROGRESS

#define TCP_EI_STATUS_PROGRESS   0x6

Definition at line 56 of file tcp_var.h.

◆ TCP_EI_STATUS_RETRAN

#define TCP_EI_STATUS_RETRAN   0x5

Definition at line 55 of file tcp_var.h.

◆ TCP_EI_STATUS_RST_IN_FRONT

#define TCP_EI_STATUS_RST_IN_FRONT   0xa

Definition at line 60 of file tcp_var.h.

◆ TCP_EI_STATUS_SERVER_FIN

#define TCP_EI_STATUS_SERVER_FIN   0x3

Definition at line 53 of file tcp_var.h.

◆ TCP_EI_STATUS_SERVER_RST

#define TCP_EI_STATUS_SERVER_RST   0x4

Definition at line 54 of file tcp_var.h.

◆ TCP_END_BYTE_INFO

#define TCP_END_BYTE_INFO   8 /* Bytes that makeup the "end information array" */

Definition at line 48 of file tcp_var.h.

◆ TCP_FUNC_BEING_REMOVED

#define TCP_FUNC_BEING_REMOVED   0x01 /* Can no longer be referenced */

Definition at line 321 of file tcp_var.h.

◆ TCP_FUNC_OUTPUT_CANDROP

#define TCP_FUNC_OUTPUT_CANDROP   0x02 /* tfb_tcp_output may ask tcp_drop */

Definition at line 322 of file tcp_var.h.

◆ TCP_MIN_MAP_ENTRIES_LIMIT

#define TCP_MIN_MAP_ENTRIES_LIMIT   128

Definition at line 309 of file tcp_var.h.

◆ TCP_REXMTVAL

#define TCP_REXMTVAL (   tp)
Value:
max((tp)->t_rttmin, (((tp)->t_srtt >> (TCP_RTT_SHIFT - TCP_DELTA_SHIFT)) \
+ (tp)->t_rttvar) >> TCP_DELTA_SHIFT)
#define TCP_DELTA_SHIFT
Definition: tcp_var.h:662
#define TCP_RTT_SHIFT
Definition: tcp_var.h:659

Definition at line 680 of file tcp_var.h.

◆ TCP_RTT_SCALE

#define TCP_RTT_SCALE   32 /* multiplier for srtt; 3 bits frac. */

Definition at line 658 of file tcp_var.h.

◆ TCP_RTT_SHIFT

#define TCP_RTT_SHIFT   5 /* shift for srtt; 3 bits frac. */

Definition at line 659 of file tcp_var.h.

◆ TCP_RTTVAR_SCALE

#define TCP_RTTVAR_SCALE   16 /* multiplier for rttvar; 2 bits */

Definition at line 660 of file tcp_var.h.

◆ TCP_RTTVAR_SHIFT

#define TCP_RTTVAR_SHIFT   4 /* shift for rttvar; 2 bits */

Definition at line 661 of file tcp_var.h.

◆ TCP_TUNNELING_OVERHEAD_DEFAULT

#define TCP_TUNNELING_OVERHEAD_DEFAULT   TCP_TUNNELING_OVERHEAD_MIN

Definition at line 306 of file tcp_var.h.

◆ TCP_TUNNELING_OVERHEAD_MAX

#define TCP_TUNNELING_OVERHEAD_MAX   1024

Definition at line 305 of file tcp_var.h.

◆ TCP_TUNNELING_OVERHEAD_MIN

#define TCP_TUNNELING_OVERHEAD_MIN   sizeof(struct udphdr)

Definition at line 304 of file tcp_var.h.

◆ TCP_TUNNELING_PORT_DEFAULT

#define TCP_TUNNELING_PORT_DEFAULT   0

Definition at line 301 of file tcp_var.h.

◆ TCP_TUNNELING_PORT_MAX

#define TCP_TUNNELING_PORT_MAX   65535

Definition at line 300 of file tcp_var.h.

◆ TCP_TUNNELING_PORT_MIN

#define TCP_TUNNELING_PORT_MIN   0

Definition at line 299 of file tcp_var.h.

◆ TCPCTL_DELACKTIME

#define TCPCTL_DELACKTIME   12 /* time before sending delayed ACK */

Definition at line 960 of file tcp_var.h.

◆ TCPCTL_DO_RFC1323

#define TCPCTL_DO_RFC1323   1 /* use RFC-1323 extensions */

Definition at line 950 of file tcp_var.h.

◆ TCPCTL_DROP

#define TCPCTL_DROP   15 /* drop tcp connection */

Definition at line 963 of file tcp_var.h.

◆ TCPCTL_KEEPIDLE

#define TCPCTL_KEEPIDLE   6 /* keepalive idle timer */

Definition at line 954 of file tcp_var.h.

◆ TCPCTL_KEEPINIT

#define TCPCTL_KEEPINIT   10 /* timeout for establishing syn */

Definition at line 958 of file tcp_var.h.

◆ TCPCTL_KEEPINTVL

#define TCPCTL_KEEPINTVL   7 /* interval to send keepalives */

Definition at line 955 of file tcp_var.h.

◆ TCPCTL_MSSDFLT

#define TCPCTL_MSSDFLT   3 /* MSS default */

Definition at line 951 of file tcp_var.h.

◆ TCPCTL_PCBLIST

#define TCPCTL_PCBLIST   11 /* list of all outstanding PCBs */

Definition at line 959 of file tcp_var.h.

◆ TCPCTL_RECVSPACE

#define TCPCTL_RECVSPACE   9 /* receive buffer space */

Definition at line 957 of file tcp_var.h.

◆ TCPCTL_RTTDFLT

#define TCPCTL_RTTDFLT   5 /* default RTT estimate */

Definition at line 953 of file tcp_var.h.

◆ TCPCTL_SACK

#define TCPCTL_SACK   14 /* Selective Acknowledgement,rfc 2018 */

Definition at line 962 of file tcp_var.h.

◆ TCPCTL_SENDSPACE

#define TCPCTL_SENDSPACE   8 /* send buffer space */

Definition at line 956 of file tcp_var.h.

◆ TCPCTL_STATES

#define TCPCTL_STATES   16 /* connection counts by TCP state */

Definition at line 964 of file tcp_var.h.

◆ TCPCTL_STATS

#define TCPCTL_STATS   4 /* statistics */

Definition at line 952 of file tcp_var.h.

◆ TCPCTL_V6MSSDFLT

#define TCPCTL_V6MSSDFLT   13 /* MSS default for IPv6 */

Definition at line 961 of file tcp_var.h.

◆ TCPOOB_HADDATA

#define TCPOOB_HADDATA   0x02

Definition at line 554 of file tcp_var.h.

◆ TCPOOB_HAVEDATA

#define TCPOOB_HAVEDATA   0x01

Definition at line 553 of file tcp_var.h.

◆ tcps_rcvmemdrop

#define tcps_rcvmemdrop   tcps_rcvreassfull /* compat */

Definition at line 828 of file tcp_var.h.

◆ TCPSTAT_ADD

#define TCPSTAT_ADD (   name,
  val 
)     VNET_PCPUSTAT_ADD(struct tcpstat, tcpstat, name, (val))

Definition at line 840 of file tcp_var.h.

◆ TCPSTAT_INC

#define TCPSTAT_INC (   name)    TCPSTAT_ADD(name, 1)

Definition at line 842 of file tcp_var.h.

◆ TCPSTATES_DEC

#define TCPSTATES_DEC (   state)    counter_u64_add(V_tcps_states[state], -1)

Definition at line 858 of file tcp_var.h.

◆ TCPSTATES_INC

#define TCPSTATES_INC (   state)    counter_u64_add(V_tcps_states[state], 1)

Definition at line 857 of file tcp_var.h.

◆ TF2_ACE_PERMIT

#define TF2_ACE_PERMIT   0x00000100 /* Accurate ECN mode */

Definition at line 567 of file tcp_var.h.

◆ TF2_DROP_AF_DATA

#define TF2_DROP_AF_DATA   0x00000010 /* Drop after all data ack'd */

Definition at line 563 of file tcp_var.h.

◆ TF2_ECN_PERMIT

#define TF2_ECN_PERMIT   0x00000020 /* connection ECN-ready */

Definition at line 564 of file tcp_var.h.

◆ TF2_ECN_SND_CWR

#define TF2_ECN_SND_CWR   0x00000040 /* ECN CWR in queue */

Definition at line 565 of file tcp_var.h.

◆ TF2_ECN_SND_ECE

#define TF2_ECN_SND_ECE   0x00000080 /* ECN ECE in queue */

Definition at line 566 of file tcp_var.h.

◆ TF2_FBYTES_COMPLETE

#define TF2_FBYTES_COMPLETE   0x00000400 /* We have first bytes in and out */

Definition at line 568 of file tcp_var.h.

◆ TF2_LOG_AUTO

#define TF2_LOG_AUTO   0x00000008 /* Session is auto-logging. */

Definition at line 562 of file tcp_var.h.

◆ TF2_PLPMTU_BLACKHOLE

#define TF2_PLPMTU_BLACKHOLE   0x00000001 /* Possible PLPMTUD Black Hole. */

Definition at line 559 of file tcp_var.h.

◆ TF2_PLPMTU_MAXSEGSNT

#define TF2_PLPMTU_MAXSEGSNT   0x00000004 /* Last seg sent was full seg. */

Definition at line 561 of file tcp_var.h.

◆ TF2_PLPMTU_PMTUD

#define TF2_PLPMTU_PMTUD   0x00000002 /* Allowed to attempt PLPMTUD. */

Definition at line 560 of file tcp_var.h.

◆ TF_ACKNOW

#define TF_ACKNOW   0x00000001 /* ack peer immediately */

Definition at line 497 of file tcp_var.h.

◆ TF_CONGRECOVERY

#define TF_CONGRECOVERY   0x20000000 /* congestion recovery mode */

Definition at line 526 of file tcp_var.h.

◆ TF_DELACK

#define TF_DELACK   0x00000002 /* ack, but try to delay it */

Definition at line 498 of file tcp_var.h.

◆ TF_FASTOPEN

#define TF_FASTOPEN   0x80000000 /* TCP Fast Open indication */

Definition at line 528 of file tcp_var.h.

◆ TF_FASTRECOVERY

#define TF_FASTRECOVERY   0x00100000 /* in NewReno Fast Recovery */

Definition at line 517 of file tcp_var.h.

◆ TF_FORCEDATA

#define TF_FORCEDATA   0x00800000 /* force out a byte */

Definition at line 520 of file tcp_var.h.

◆ TF_GPUTINPROG

#define TF_GPUTINPROG   0x00008000 /* Goodput measurement in progress */

Definition at line 512 of file tcp_var.h.

◆ TF_LASTIDLE

#define TF_LASTIDLE   0x00040000 /* connection was previously idle */

Definition at line 515 of file tcp_var.h.

◆ TF_LQ_OVERFLOW

#define TF_LQ_OVERFLOW   0x00020000 /* listen queue overflow */

Definition at line 514 of file tcp_var.h.

◆ TF_LRD

#define TF_LRD   0x10000000 /* Lost Retransmission Detection */

Definition at line 525 of file tcp_var.h.

◆ TF_MORETOCOME

#define TF_MORETOCOME   0x00010000 /* More data to be appended to sock */

Definition at line 513 of file tcp_var.h.

◆ TF_NEEDFIN

#define TF_NEEDFIN   0x00000800 /* send FIN (implicit state) */

Definition at line 508 of file tcp_var.h.

◆ TF_NEEDSYN

#define TF_NEEDSYN   0x00000400 /* send SYN (implicit state) */

Definition at line 507 of file tcp_var.h.

◆ TF_NODELAY

#define TF_NODELAY   0x00000004 /* don't delay packets to coalesce */

Definition at line 499 of file tcp_var.h.

◆ TF_NOOPT

#define TF_NOOPT   0x00000008 /* don't use tcp options */

Definition at line 500 of file tcp_var.h.

◆ TF_NOPUSH

#define TF_NOPUSH   0x00001000 /* don't push */

Definition at line 509 of file tcp_var.h.

◆ TF_PREVVALID

#define TF_PREVVALID
Value:
0x00002000 /* saved values for bad rxmit valid
* Note: accessing and restoring from
* these may only be done in the 1st
* RTO recovery round (t_rxtshift == 1)
*/

Definition at line 510 of file tcp_var.h.

◆ TF_RCVD_SCALE

#define TF_RCVD_SCALE   0x00000040 /* other side has requested scaling */

Definition at line 503 of file tcp_var.h.

◆ TF_RCVD_TSTMP

#define TF_RCVD_TSTMP   0x00000100 /* a timestamp was received in SYN */

Definition at line 505 of file tcp_var.h.

◆ TF_REQ_SCALE

#define TF_REQ_SCALE   0x00000020 /* have/will request window scaling */

Definition at line 502 of file tcp_var.h.

◆ TF_REQ_TSTMP

#define TF_REQ_TSTMP   0x00000080 /* have/will request timestamps */

Definition at line 504 of file tcp_var.h.

◆ TF_RXWIN0SENT

#define TF_RXWIN0SENT   0x00080000 /* sent a receiver win 0 in response */

Definition at line 516 of file tcp_var.h.

◆ TF_SACK_PERMIT

#define TF_SACK_PERMIT   0x00000200 /* other side said I could SACK */

Definition at line 506 of file tcp_var.h.

◆ TF_SENTFIN

#define TF_SENTFIN   0x00000010 /* have sent FIN */

Definition at line 501 of file tcp_var.h.

◆ TF_SIGNATURE

#define TF_SIGNATURE   0x00400000 /* require MD5 digests (RFC2385) */

Definition at line 519 of file tcp_var.h.

◆ TF_TOE

#define TF_TOE   0x02000000 /* this connection is offloaded */

Definition at line 522 of file tcp_var.h.

◆ TF_TSO

#define TF_TSO   0x01000000 /* TSO enabled on this connection */

Definition at line 521 of file tcp_var.h.

◆ TF_UNUSED0

#define TF_UNUSED0   0x04000000 /* unused */

Definition at line 523 of file tcp_var.h.

◆ TF_UNUSED1

#define TF_UNUSED1   0x08000000 /* unused */

Definition at line 524 of file tcp_var.h.

◆ TF_WAKESOR

#define TF_WAKESOR   0x00004000 /* wake up receive socket */

Definition at line 511 of file tcp_var.h.

◆ TF_WASCRECOVERY

#define TF_WASCRECOVERY   0x40000000 /* was in congestion recovery */

Definition at line 527 of file tcp_var.h.

◆ TF_WASFRECOVERY

#define TF_WASFRECOVERY   0x00200000 /* was in NewReno Fast Recovery */

Definition at line 518 of file tcp_var.h.

◆ TI_RLOCKED

#define TI_RLOCKED   2

Definition at line 832 of file tcp_var.h.

◆ TI_UNLOCKED

#define TI_UNLOCKED   1

Definition at line 831 of file tcp_var.h.

◆ TO_SYN

#define TO_SYN   0x01 /* parse SYN-only options */

Definition at line 602 of file tcp_var.h.

◆ TOF_FASTOPEN

#define TOF_FASTOPEN   0x0100 /* TCP Fast Open (TFO) cookie */

Definition at line 585 of file tcp_var.h.

◆ TOF_MAXOPT

#define TOF_MAXOPT   0x0200

Definition at line 586 of file tcp_var.h.

◆ TOF_MSS

#define TOF_MSS   0x0001 /* maximum segment size */

Definition at line 579 of file tcp_var.h.

◆ TOF_SACK

#define TOF_SACK   0x0080 /* Peer sent SACK option */

Definition at line 584 of file tcp_var.h.

◆ TOF_SACKPERM

#define TOF_SACKPERM   0x0004 /* SACK permitted */

Definition at line 581 of file tcp_var.h.

◆ TOF_SCALE

#define TOF_SCALE   0x0002 /* window scaling */

Definition at line 580 of file tcp_var.h.

◆ TOF_SIGNATURE

#define TOF_SIGNATURE   0x0040 /* TCP-MD5 signature option (RFC2385) */

Definition at line 583 of file tcp_var.h.

◆ TOF_TS

#define TOF_TS   0x0010 /* timestamp */

Definition at line 582 of file tcp_var.h.

◆ V_drop_synfin

#define V_drop_synfin   VNET(drop_synfin)

Definition at line 1028 of file tcp_var.h.

◆ V_path_mtu_discovery

#define V_path_mtu_discovery   VNET(path_mtu_discovery)

Definition at line 1029 of file tcp_var.h.

◆ V_tcbinfo

#define V_tcbinfo   VNET(tcbinfo)

Definition at line 1030 of file tcp_var.h.

◆ V_tcp_abc_l_var

#define V_tcp_abc_l_var   VNET(tcp_abc_l_var)

Definition at line 1031 of file tcp_var.h.

◆ V_tcp_autorcvbuf_max

#define V_tcp_autorcvbuf_max   VNET(tcp_autorcvbuf_max)

Definition at line 1032 of file tcp_var.h.

◆ V_tcp_autosndbuf_inc

#define V_tcp_autosndbuf_inc   VNET(tcp_autosndbuf_inc)

Definition at line 1033 of file tcp_var.h.

◆ V_tcp_autosndbuf_max

#define V_tcp_autosndbuf_max   VNET(tcp_autosndbuf_max)

Definition at line 1034 of file tcp_var.h.

◆ V_tcp_delack_enabled

#define V_tcp_delack_enabled   VNET(tcp_delack_enabled)

Definition at line 1035 of file tcp_var.h.

◆ V_tcp_do_autorcvbuf

#define V_tcp_do_autorcvbuf   VNET(tcp_do_autorcvbuf)

Definition at line 1036 of file tcp_var.h.

◆ V_tcp_do_autosndbuf

#define V_tcp_do_autosndbuf   VNET(tcp_do_autosndbuf)

Definition at line 1037 of file tcp_var.h.

◆ V_tcp_do_ecn

#define V_tcp_do_ecn   VNET(tcp_do_ecn)

Definition at line 1038 of file tcp_var.h.

◆ V_tcp_do_lrd

#define V_tcp_do_lrd   VNET(tcp_do_lrd)

Definition at line 1024 of file tcp_var.h.

◆ V_tcp_do_newcwv

#define V_tcp_do_newcwv   VNET(tcp_do_newcwv)

Definition at line 1027 of file tcp_var.h.

◆ V_tcp_do_newsack

#define V_tcp_do_newsack   VNET(tcp_do_newsack)

Definition at line 1045 of file tcp_var.h.

◆ V_tcp_do_prr

#define V_tcp_do_prr   VNET(tcp_do_prr)

Definition at line 1025 of file tcp_var.h.

◆ V_tcp_do_prr_conservative

#define V_tcp_do_prr_conservative   VNET(tcp_do_prr_conservative)

Definition at line 1026 of file tcp_var.h.

◆ V_tcp_do_rfc1323

#define V_tcp_do_rfc1323   VNET(tcp_do_rfc1323)

Definition at line 1039 of file tcp_var.h.

◆ V_tcp_do_rfc3042

#define V_tcp_do_rfc3042   VNET(tcp_do_rfc3042)

Definition at line 1042 of file tcp_var.h.

◆ V_tcp_do_rfc3390

#define V_tcp_do_rfc3390   VNET(tcp_do_rfc3390)

Definition at line 1043 of file tcp_var.h.

◆ V_tcp_do_rfc3465

#define V_tcp_do_rfc3465   VNET(tcp_do_rfc3465)

Definition at line 1044 of file tcp_var.h.

◆ V_tcp_do_sack

#define V_tcp_do_sack   VNET(tcp_do_sack)

Definition at line 1046 of file tcp_var.h.

◆ V_tcp_do_tso

#define V_tcp_do_tso   VNET(tcp_do_tso)

Definition at line 1047 of file tcp_var.h.

◆ V_tcp_ecn_maxretries

#define V_tcp_ecn_maxretries   VNET(tcp_ecn_maxretries)

Definition at line 1048 of file tcp_var.h.

◆ V_tcp_initcwnd_segments

#define V_tcp_initcwnd_segments   VNET(tcp_initcwnd_segments)

Definition at line 1049 of file tcp_var.h.

◆ V_tcp_insecure_rst

#define V_tcp_insecure_rst   VNET(tcp_insecure_rst)

Definition at line 1050 of file tcp_var.h.

◆ V_tcp_insecure_syn

#define V_tcp_insecure_syn   VNET(tcp_insecure_syn)

Definition at line 1051 of file tcp_var.h.

◆ V_tcp_log_in_vain

#define V_tcp_log_in_vain   VNET(tcp_log_in_vain)

Definition at line 974 of file tcp_var.h.

◆ V_tcp_map_entries_limit

#define V_tcp_map_entries_limit   VNET(tcp_map_entries_limit)

Definition at line 1052 of file tcp_var.h.

◆ V_tcp_map_split_limit

#define V_tcp_map_split_limit   VNET(tcp_map_split_limit)

Definition at line 1053 of file tcp_var.h.

◆ V_tcp_minmss

#define V_tcp_minmss   VNET(tcp_minmss)

Definition at line 1054 of file tcp_var.h.

◆ V_tcp_mssdflt

#define V_tcp_mssdflt   VNET(tcp_mssdflt)

Definition at line 1055 of file tcp_var.h.

◆ V_tcp_recvspace

#define V_tcp_recvspace   VNET(tcp_recvspace)

Definition at line 1060 of file tcp_var.h.

◆ V_tcp_sack_globalholes

#define V_tcp_sack_globalholes   VNET(tcp_sack_globalholes)

Definition at line 1061 of file tcp_var.h.

◆ V_tcp_sack_globalmaxholes

#define V_tcp_sack_globalmaxholes   VNET(tcp_sack_globalmaxholes)

Definition at line 1062 of file tcp_var.h.

◆ V_tcp_sack_maxholes

#define V_tcp_sack_maxholes   VNET(tcp_sack_maxholes)

Definition at line 1063 of file tcp_var.h.

◆ V_tcp_sc_rst_sock_fail

#define V_tcp_sc_rst_sock_fail   VNET(tcp_sc_rst_sock_fail)

Definition at line 1064 of file tcp_var.h.

◆ V_tcp_sendspace

#define V_tcp_sendspace   VNET(tcp_sendspace)

Definition at line 1065 of file tcp_var.h.

◆ V_tcp_tolerate_missing_ts

#define V_tcp_tolerate_missing_ts   VNET(tcp_tolerate_missing_ts)

Definition at line 1040 of file tcp_var.h.

◆ V_tcp_ts_offset_per_conn

#define V_tcp_ts_offset_per_conn   VNET(tcp_ts_offset_per_conn)

Definition at line 1041 of file tcp_var.h.

◆ V_tcp_udp_tunneling_overhead

#define V_tcp_udp_tunneling_overhead   VNET(tcp_udp_tunneling_overhead)

Definition at line 1066 of file tcp_var.h.

◆ V_tcp_udp_tunneling_port

#define V_tcp_udp_tunneling_port   VNET(tcp_udp_tunneling_port)

Definition at line 1067 of file tcp_var.h.

◆ V_tcps_states

#define V_tcps_states   VNET(tcps_states)

Definition at line 856 of file tcp_var.h.

Function Documentation

◆ cc_ack_received()

◆ cc_cong_signal()

◆ cc_conn_init()

◆ cc_ecnpkt_handler()

void cc_ecnpkt_handler ( struct tcpcb tp,
struct tcphdr *  th,
uint8_t  iptos 
)
inline

Definition at line 550 of file tcp_input.c.

References cc_ecnpkt_handler_flags(), and tcp_get_flags().

Here is the call graph for this function:

◆ cc_ecnpkt_handler_flags()

void cc_ecnpkt_handler_flags ( struct tcpcb tp,
uint16_t  flags,
uint8_t  iptos 
)
inline

◆ cc_post_recovery()

void cc_post_recovery ( struct tcpcb tp,
struct tcphdr *  th 
)
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().

Here is the caller graph for this function:

◆ deregister_tcp_functions()

int deregister_tcp_functions ( struct tcp_function_block blk,
bool  quiesce,
bool  force 
)

◆ find_and_ref_tcp_fb()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ find_and_ref_tcp_functions()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ find_tcp_function_alias()

int find_tcp_function_alias ( struct tcp_function_block blk,
struct tcp_function_set fs 
)

◆ inp_to_cpuid()

int inp_to_cpuid ( struct inpcb inp)
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().

Here is the caller graph for this function:

◆ kmod_tcpstat_add()

void kmod_tcpstat_add ( int  statnum,
int  val 
)

Definition at line 267 of file tcp_input.c.

◆ register_tcp_functions()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ register_tcp_functions_as_name()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ register_tcp_functions_as_names()

◆ STAILQ_HEAD()

STAILQ_HEAD ( tcp_log_stailq  ,
tcp_log_mem   
)

◆ TAILQ_HEAD() [1/2]

TAILQ_HEAD ( tcp_funchead  ,
tcp_function   
)

◆ TAILQ_HEAD() [2/2]

TAILQ_HEAD ( tsegqe_head  ,
tseg_qent   
)

◆ tcp6_use_min_mtu()

void tcp6_use_min_mtu ( struct tcpcb )

Referenced by rack_set_sockopt(), and tcp_default_ctloutput().

Here is the caller graph for this function:

◆ tcp_account_for_send()

static void tcp_account_for_send ( struct tcpcb tp,
uint32_t  len,
uint8_t  is_rxt,
uint8_t  is_tlp,
int  hw_tls 
)
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().

Here is the caller graph for this function:

◆ tcp_addoptions()

◆ tcp_autorcvbuf()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tcp_can_enable_pacing()

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().

Here is the caller graph for this function:

◆ tcp_clean_dsack_blocks()

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().

Here is the caller graph for this function:

◆ tcp_clean_sackreport()

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().

Here is the caller graph for this function:

◆ tcp_close()

◆ tcp_compute_initwnd()

uint32_t tcp_compute_initwnd ( uint32_t  maxseg)

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().

Here is the caller graph for this function:

◆ tcp_compute_pipe()

int tcp_compute_pipe ( struct tcpcb tp)

◆ tcp_ctlinput()

void tcp_ctlinput ( int  ,
struct sockaddr *  ,
void *   
)

◆ tcp_ctlinput_viaudp()

void tcp_ctlinput_viaudp ( int  ,
struct sockaddr *  ,
void *  ,
void *   
)

Referenced by tcp_over_udp_start().

Here is the caller graph for this function:

◆ tcp_ctloutput()

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().

Here is the call graph for this function:

◆ tcp_ctloutput_set()

◆ tcp_decrement_paced_conn()

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().

Here is the caller graph for this function:

◆ tcp_default_ctloutput()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tcp_default_output()

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.

Here is the call graph for this function:

◆ tcp_discardcb()

◆ tcp_do_prr_ack()

◆ 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.

Here is the call graph for this function:

◆ tcp_dooptions()

◆ tcp_drain()

void tcp_drain ( void  )

◆ tcp_drop()

◆ tcp_drop_syn_sent()

struct inpcb * tcp_drop_syn_sent ( struct inpcb inp,
int  errno 
)

◆ tcp_dropwithreset()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tcp_dsack_block_exists()

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().

Here is the caller graph for this function:

◆ tcp_fields_to_host()

static void tcp_fields_to_host ( struct tcphdr *  th)
inlinestatic

Definition at line 1245 of file tcp_var.h.

Referenced by ctf_process_inbound_raw(), and tcp_input_with_port().

Here is the caller graph for this function:

◆ tcp_fields_to_net()

static void tcp_fields_to_net ( struct tcphdr *  th)
inlinestatic

Definition at line 1255 of file tcp_var.h.

Referenced by tcp_log_event_().

Here is the caller graph for this function:

◆ tcp_fini()

void tcp_fini ( void *  xtp)

Definition at line 1626 of file tcp_subr.c.

Referenced by tcp_init().

Here is the caller graph for this function:

◆ tcp_fixed_maxseg()

u_int tcp_fixed_maxseg ( const struct tcpcb tp)

◆ tcp_free_sackholes()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tcp_freecb()

bool tcp_freecb ( struct tcpcb tp)

◆ tcp_get_flags()

◆ tcp_handle_wakeup()

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().

Here is the caller graph for this function:

◆ tcp_hc_get()

void tcp_hc_get ( struct in_conninfo inc,
struct hc_metrics_lite hc_metrics_lite 
)

◆ tcp_hc_getmtu()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tcp_hc_init()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tcp_hc_update()

◆ 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tcp_input()

int tcp_input ( struct mbuf **  mp,
int *  offp,
int  proto 
)

Definition at line 1490 of file tcp_input.c.

References tcp_input_with_port().

Here is the call graph for this function:

◆ 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tcp_log_addrs()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tcp_log_end_status()

◆ tcp_log_vain()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tcp_lost_retransmission()

void tcp_lost_retransmission ( struct tcpcb ,
struct tcphdr *   
)

◆ tcp_m_copym()

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().

Here is the caller graph for this function:

◆ tcp_maxmtu()

uint32_t tcp_maxmtu ( struct in_conninfo ,
struct tcp_ifcap  
)

Referenced by tcp_mss_update(), and tcp_mssopt().

Here is the caller graph for this function:

◆ tcp_maxmtu6()

uint32_t tcp_maxmtu6 ( struct in_conninfo ,
struct tcp_ifcap  
)

Referenced by tcp_mss_update(), and tcp_mssopt().

Here is the caller graph for this function:

◆ tcp_maxseg()

◆ tcp_mss()

◆ tcp_mss_update()

void tcp_mss_update ( struct tcpcb tp,
int  offer,
int  mtuoffer,
struct hc_metrics_lite metricptr,
struct tcp_ifcap cap 
)

◆ tcp_mssopt()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tcp_new_isn()

tcp_seq tcp_new_isn ( struct in_conninfo inc)

◆ tcp_new_ts_offset()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tcp_newreno()

int tcp_newreno ( struct tcpcb ,
struct tcphdr *   
)

◆ tcp_newreno_partial_ack()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tcp_newtcpcb()

◆ tcp_pulloutofband()

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().

Here is the caller graph for this function:

◆ tcp_reass()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tcp_reass_flush()

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().

Here is the caller graph for this function:

◆ tcp_reass_global_init()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tcp_record_dsack()

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().

Here is the caller graph for this function:

◆ tcp_respond()

void tcp_respond ( struct tcpcb tp,
void *  ipgen,
struct tcphdr *  th,
struct mbuf *  m,
tcp_seq  ack,
tcp_seq  seq,
int  flags 
)

◆ tcp_sack_adjust()

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().

Here is the caller graph for this function:

◆ tcp_sack_doack()

◆ tcp_sack_lost_retransmission()

void tcp_sack_lost_retransmission ( struct tcpcb tp,
struct tcphdr *  th 
)

◆ tcp_sack_output()

struct sackhole * tcp_sack_output ( struct tcpcb tp,
int *  sack_bytes_rexmt 
)

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().

Here is the caller graph for this function:

◆ tcp_sack_partialack()

void tcp_sack_partialack ( struct tcpcb tp,
struct tcphdr *  th 
)

◆ tcp_set_flags()

static void tcp_set_flags ( struct tcphdr *  th,
uint16_t  flags 
)
inlinestatic

◆ tcp_setpersist()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tcp_slowtimo()

void tcp_slowtimo ( void  )

Definition at line 241 of file tcp_timer.c.

References tcp_tw_2msl_scan().

Here is the call graph for this function:

◆ tcp_sndbuf_autoscale()

void tcp_sndbuf_autoscale ( struct tcpcb tp,
struct socket *  so,
uint32_t  sendwin 
)

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().

Here is the caller graph for this function:

◆ tcp_state_change()

◆ tcp_stats_init()

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().

Here is the caller graph for this function:

◆ tcp_stats_sample_rollthedice()

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().

Here is the caller graph for this function:

◆ tcp_switch_back_to_default()

void tcp_switch_back_to_default ( struct tcpcb tp)

◆ tcp_timer_activate()

◆ tcp_timer_active()

◆ tcp_timer_stop()

void tcp_timer_stop ( struct tcpcb tp,
uint32_t  timer_type 
)

◆ tcp_timer_suspend()

int tcp_timer_suspend ( struct tcpcb tp,
uint32_t  timer_type 
)

◆ tcp_timers_unsuspend()

◆ tcp_trace()

◆ tcp_tw_init()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tcp_tw_zone_change()

void tcp_tw_zone_change ( void  )

Definition at line 191 of file tcp_timewait.c.

References maxtcptw, tcptw_auto_size(), and V_tcptw_zone.

Here is the call graph for this function:

◆ tcp_twcheck()

int tcp_twcheck ( struct inpcb inp,
struct tcpopt to,
struct tcphdr *  th,
struct mbuf *  m,
int  tlen 
)

◆ tcp_twclose()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tcp_twstart()

◆ tcp_update_dsack_list()

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().

Here is the caller graph for this function:

◆ tcp_update_sack_list()

void tcp_update_sack_list ( struct tcpcb tp,
tcp_seq  rcv_laststart,
tcp_seq  rcv_lastend 
)

◆ tcp_xmit_timer()

◆ tcpip_fillheaders()

void tcpip_fillheaders ( struct inpcb inp,
uint16_t  port,
void *  ip_ptr,
void *  tcp_ptr 
)

◆ tcpip_maketemplate()

struct tcptemp * tcpip_maketemplate ( struct inpcb inp)

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ VNET_DECLARE() [1/41]

VNET_DECLARE ( counter_u64_t  ,
tcps_states  [TCP_NSTATES] 
)

◆ VNET_DECLARE() [2/41]

VNET_DECLARE ( int  ,
drop_synfin   
)

◆ VNET_DECLARE() [3/41]

VNET_DECLARE ( int  ,
path_mtu_discovery   
)

◆ VNET_DECLARE() [4/41]

VNET_DECLARE ( int  ,
tcp_abc_l_var   
)

◆ VNET_DECLARE() [5/41]

VNET_DECLARE ( int  ,
tcp_autorcvbuf_max   
)

◆ VNET_DECLARE() [6/41]

VNET_DECLARE ( int  ,
tcp_autosndbuf_inc   
)

◆ VNET_DECLARE() [7/41]

VNET_DECLARE ( int  ,
tcp_autosndbuf_max   
)

◆ VNET_DECLARE() [8/41]

VNET_DECLARE ( int  ,
tcp_delack_enabled   
)

◆ VNET_DECLARE() [9/41]

VNET_DECLARE ( int  ,
tcp_do_autorcvbuf   
)

◆ VNET_DECLARE() [10/41]

VNET_DECLARE ( int  ,
tcp_do_autosndbuf   
)

◆ VNET_DECLARE() [11/41]

VNET_DECLARE ( int  ,
tcp_do_ecn   
)

◆ VNET_DECLARE() [12/41]

VNET_DECLARE ( int  ,
tcp_do_lrd   
)

◆ VNET_DECLARE() [13/41]

VNET_DECLARE ( int  ,
tcp_do_newcwv   
)

◆ VNET_DECLARE() [14/41]

VNET_DECLARE ( int  ,
tcp_do_newsack   
)

◆ VNET_DECLARE() [15/41]

VNET_DECLARE ( int  ,
tcp_do_prr   
)

◆ VNET_DECLARE() [16/41]

VNET_DECLARE ( int  ,
tcp_do_prr_conservative   
)

◆ VNET_DECLARE() [17/41]

VNET_DECLARE ( int  ,
tcp_do_rfc1323   
)

◆ VNET_DECLARE() [18/41]

VNET_DECLARE ( int  ,
tcp_do_rfc3042   
)

◆ VNET_DECLARE() [19/41]

VNET_DECLARE ( int  ,
tcp_do_rfc3390   
)

◆ VNET_DECLARE() [20/41]

VNET_DECLARE ( int  ,
tcp_do_rfc3465   
)

◆ VNET_DECLARE() [21/41]

VNET_DECLARE ( int  ,
tcp_do_sack   
)

◆ VNET_DECLARE() [22/41]

VNET_DECLARE ( int  ,
tcp_do_tso   
)

◆ VNET_DECLARE() [23/41]

VNET_DECLARE ( int  ,
tcp_ecn_maxretries   
)

◆ VNET_DECLARE() [24/41]

VNET_DECLARE ( int  ,
tcp_initcwnd_segments   
)

◆ VNET_DECLARE() [25/41]

VNET_DECLARE ( int  ,
tcp_insecure_rst   
)

◆ VNET_DECLARE() [26/41]

VNET_DECLARE ( int  ,
tcp_insecure_syn   
)

◆ VNET_DECLARE() [27/41]

VNET_DECLARE ( int  ,
tcp_log_in_vain   
)

◆ VNET_DECLARE() [28/41]

VNET_DECLARE ( int  ,
tcp_minmss   
)

◆ VNET_DECLARE() [29/41]

VNET_DECLARE ( int  ,
tcp_mssdflt   
)

◆ VNET_DECLARE() [30/41]

VNET_DECLARE ( int  ,
tcp_recvspace   
)

◆ VNET_DECLARE() [31/41]

VNET_DECLARE ( int  ,
tcp_sack_globalholes   
)

◆ VNET_DECLARE() [32/41]

VNET_DECLARE ( int  ,
tcp_sack_globalmaxholes   
)

◆ VNET_DECLARE() [33/41]

VNET_DECLARE ( int  ,
tcp_sack_maxholes   
)

◆ VNET_DECLARE() [34/41]

VNET_DECLARE ( int  ,
tcp_sc_rst_sock_fail   
)

◆ VNET_DECLARE() [35/41]

VNET_DECLARE ( int  ,
tcp_sendspace   
)

◆ VNET_DECLARE() [36/41]

VNET_DECLARE ( int  ,
tcp_tolerate_missing_ts   
)

◆ VNET_DECLARE() [37/41]

VNET_DECLARE ( int  ,
tcp_udp_tunneling_overhead   
)

◆ VNET_DECLARE() [38/41]

VNET_DECLARE ( int  ,
tcp_udp_tunneling_port   
)

◆ VNET_DECLARE() [39/41]

VNET_DECLARE ( struct inpcbinfo  ,
tcbinfo   
)

◆ VNET_DECLARE() [40/41]

VNET_DECLARE ( uint32_t  ,
tcp_map_entries_limit   
)

◆ VNET_DECLARE() [41/41]

VNET_DECLARE ( uint32_t  ,
tcp_map_split_limit   
)

◆ VNET_PCPUSTAT_DECLARE()

VNET_PCPUSTAT_DECLARE ( struct tcpstat  ,
tcpstat   
)

Variable Documentation

◆ tcp_ack_war_cnt

uint32_t tcp_ack_war_cnt
extern

Definition at line 204 of file tcp_subr.c.

Referenced by __ctf_process_rst(), and ctf_ack_war_checks().

◆ tcp_ack_war_time_window

uint32_t tcp_ack_war_time_window
extern

Definition at line 199 of file tcp_subr.c.

Referenced by __ctf_process_rst(), and ctf_ack_war_checks().

◆ tcp_bad_csums

counter_u64_t tcp_bad_csums
extern

Definition at line 104 of file tcp_lro.c.

Referenced by tcp_init(), tcp_lro_rx(), and tcp_lro_rx_common().

◆ tcp_comp_total

counter_u64_t tcp_comp_total
extern

Definition at line 102 of file tcp_lro.c.

Referenced by tcp_init().

◆ tcp_extra_mbuf

counter_u64_t tcp_extra_mbuf
extern

Definition at line 100 of file tcp_lro.c.

Referenced by tcp_init().

◆ tcp_inp_lro_compressed

counter_u64_t tcp_inp_lro_compressed
extern

Definition at line 98 of file tcp_lro.c.

Referenced by tcp_init().

◆ tcp_inp_lro_direct_queue

counter_u64_t tcp_inp_lro_direct_queue
extern

Definition at line 96 of file tcp_lro.c.

Referenced by tcp_init().

◆ tcp_inp_lro_locks_taken

counter_u64_t tcp_inp_lro_locks_taken
extern

Definition at line 99 of file tcp_lro.c.

Referenced by tcp_init().

◆ tcp_inp_lro_wokeup_queue

counter_u64_t tcp_inp_lro_wokeup_queue
extern

Definition at line 97 of file tcp_lro.c.

Referenced by tcp_init().

◆ tcp_uncomp_total

counter_u64_t tcp_uncomp_total
extern

Definition at line 103 of file tcp_lro.c.

Referenced by tcp_init().

◆ tcp_usrreqs

struct pr_usrreqs tcp_usrreqs
extern

Referenced by tcp_init().

◆ tcp_would_have_but

counter_u64_t tcp_would_have_but
extern

Definition at line 101 of file tcp_lro.c.

Referenced by tcp_init().