Changeset View
Changeset View
Standalone View
Standalone View
head/sys/netinet/tcp_var.h
Show First 20 Lines • Show All 204 Lines • ▼ Show 20 Lines | struct tcpcb { | ||||
u_int t_keepintvl; /* interval between keepalives */ | u_int t_keepintvl; /* interval between keepalives */ | ||||
u_int t_keepcnt; /* number of keepalives before close */ | u_int t_keepcnt; /* number of keepalives before close */ | ||||
int t_dupacks; /* consecutive dup acks recd */ | int t_dupacks; /* consecutive dup acks recd */ | ||||
int t_lognum; /* Number of log entries */ | int t_lognum; /* Number of log entries */ | ||||
struct tcp_log_stailq t_logs; /* Log buffer */ | struct tcp_log_stailq t_logs; /* Log buffer */ | ||||
struct tcp_log_id_node *t_lin; | struct tcp_log_id_node *t_lin; | ||||
struct tcp_log_id_bucket *t_lib; | struct tcp_log_id_bucket *t_lib; | ||||
const char *t_output_caller; /* Function that called tcp_output */ | const char *t_output_caller; /* Function that called tcp_output */ | ||||
struct statsblob *t_stats; /* Per-connection stats */ | |||||
uint32_t t_logsn; /* Log "serial number" */ | uint32_t t_logsn; /* Log "serial number" */ | ||||
uint32_t gput_ts; /* Time goodput measurement started */ | |||||
tcp_seq gput_seq; /* Outbound measurement seq */ | |||||
tcp_seq gput_ack; /* Inbound measurement ack */ | |||||
int32_t t_stats_gput_prev; /* XXXLAS: Prev gput measurement */ | |||||
uint8_t t_tfo_client_cookie_len; /* TCP Fast Open client cookie length */ | uint8_t t_tfo_client_cookie_len; /* TCP Fast Open client cookie length */ | ||||
unsigned int *t_tfo_pending; /* TCP Fast Open server pending counter */ | unsigned int *t_tfo_pending; /* TCP Fast Open server pending counter */ | ||||
union { | union { | ||||
uint8_t client[TCP_FASTOPEN_MAX_COOKIE_LEN]; | uint8_t client[TCP_FASTOPEN_MAX_COOKIE_LEN]; | ||||
uint64_t server; | uint64_t server; | ||||
} t_tfo_cookie; /* TCP Fast Open cookie to send */ | } t_tfo_cookie; /* TCP Fast Open cookie to send */ | ||||
#ifdef TCPPCAP | #ifdef TCPPCAP | ||||
struct mbufq t_inpkts; /* List of saved input packets. */ | struct mbufq t_inpkts; /* List of saved input packets. */ | ||||
▲ Show 20 Lines • Show All 100 Lines • ▼ Show 20 Lines | |||||
#define TF_REQ_TSTMP 0x00000080 /* have/will request timestamps */ | #define TF_REQ_TSTMP 0x00000080 /* have/will request timestamps */ | ||||
#define TF_RCVD_TSTMP 0x00000100 /* a timestamp was received in SYN */ | #define TF_RCVD_TSTMP 0x00000100 /* a timestamp was received in SYN */ | ||||
#define TF_SACK_PERMIT 0x00000200 /* other side said I could SACK */ | #define TF_SACK_PERMIT 0x00000200 /* other side said I could SACK */ | ||||
#define TF_NEEDSYN 0x00000400 /* send SYN (implicit state) */ | #define TF_NEEDSYN 0x00000400 /* send SYN (implicit state) */ | ||||
#define TF_NEEDFIN 0x00000800 /* send FIN (implicit state) */ | #define TF_NEEDFIN 0x00000800 /* send FIN (implicit state) */ | ||||
#define TF_NOPUSH 0x00001000 /* don't push */ | #define TF_NOPUSH 0x00001000 /* don't push */ | ||||
#define TF_PREVVALID 0x00002000 /* saved values for bad rxmit valid */ | #define TF_PREVVALID 0x00002000 /* saved values for bad rxmit valid */ | ||||
#define TF_UNUSED1 0x00004000 /* unused */ | #define TF_UNUSED1 0x00004000 /* unused */ | ||||
#define TF_UNUSED2 0x00008000 /* unused */ | #define TF_GPUTINPROG 0x00008000 /* Goodput measurement in progress */ | ||||
#define TF_MORETOCOME 0x00010000 /* More data to be appended to sock */ | #define TF_MORETOCOME 0x00010000 /* More data to be appended to sock */ | ||||
#define TF_LQ_OVERFLOW 0x00020000 /* listen queue overflow */ | #define TF_LQ_OVERFLOW 0x00020000 /* listen queue overflow */ | ||||
#define TF_LASTIDLE 0x00040000 /* connection was previously idle */ | #define TF_LASTIDLE 0x00040000 /* connection was previously idle */ | ||||
#define TF_RXWIN0SENT 0x00080000 /* sent a receiver win 0 in response */ | #define TF_RXWIN0SENT 0x00080000 /* sent a receiver win 0 in response */ | ||||
#define TF_FASTRECOVERY 0x00100000 /* in NewReno Fast Recovery */ | #define TF_FASTRECOVERY 0x00100000 /* in NewReno Fast Recovery */ | ||||
#define TF_WASFRECOVERY 0x00200000 /* was in NewReno Fast Recovery */ | #define TF_WASFRECOVERY 0x00200000 /* was in NewReno Fast Recovery */ | ||||
#define TF_SIGNATURE 0x00400000 /* require MD5 digests (RFC2385) */ | #define TF_SIGNATURE 0x00400000 /* require MD5 digests (RFC2385) */ | ||||
#define TF_FORCEDATA 0x00800000 /* force out a byte */ | #define TF_FORCEDATA 0x00800000 /* force out a byte */ | ||||
▲ Show 20 Lines • Show All 443 Lines • ▼ Show 20 Lines | |||||
VNET_DECLARE(int, tcp_do_sack); | VNET_DECLARE(int, tcp_do_sack); | ||||
VNET_DECLARE(int, tcp_do_tso); | VNET_DECLARE(int, tcp_do_tso); | ||||
VNET_DECLARE(int, tcp_ecn_maxretries); | VNET_DECLARE(int, tcp_ecn_maxretries); | ||||
VNET_DECLARE(int, tcp_initcwnd_segments); | VNET_DECLARE(int, tcp_initcwnd_segments); | ||||
VNET_DECLARE(int, tcp_insecure_rst); | VNET_DECLARE(int, tcp_insecure_rst); | ||||
VNET_DECLARE(int, tcp_insecure_syn); | VNET_DECLARE(int, tcp_insecure_syn); | ||||
VNET_DECLARE(int, tcp_minmss); | VNET_DECLARE(int, tcp_minmss); | ||||
VNET_DECLARE(int, tcp_mssdflt); | VNET_DECLARE(int, tcp_mssdflt); | ||||
#ifdef STATS | |||||
VNET_DECLARE(int, tcp_perconn_stats_dflt_tpl); | |||||
VNET_DECLARE(int, tcp_perconn_stats_enable); | |||||
#endif /* STATS */ | |||||
VNET_DECLARE(int, tcp_recvspace); | VNET_DECLARE(int, tcp_recvspace); | ||||
VNET_DECLARE(int, tcp_sack_globalholes); | VNET_DECLARE(int, tcp_sack_globalholes); | ||||
VNET_DECLARE(int, tcp_sack_globalmaxholes); | VNET_DECLARE(int, tcp_sack_globalmaxholes); | ||||
VNET_DECLARE(int, tcp_sack_maxholes); | VNET_DECLARE(int, tcp_sack_maxholes); | ||||
VNET_DECLARE(int, tcp_sc_rst_sock_fail); | VNET_DECLARE(int, tcp_sc_rst_sock_fail); | ||||
VNET_DECLARE(int, tcp_sendspace); | VNET_DECLARE(int, tcp_sendspace); | ||||
VNET_DECLARE(struct inpcbhead, tcb); | VNET_DECLARE(struct inpcbhead, tcb); | ||||
VNET_DECLARE(struct inpcbinfo, tcbinfo); | VNET_DECLARE(struct inpcbinfo, tcbinfo); | ||||
Show All 20 Lines | |||||
#define V_tcp_do_sack VNET(tcp_do_sack) | #define V_tcp_do_sack VNET(tcp_do_sack) | ||||
#define V_tcp_do_tso VNET(tcp_do_tso) | #define V_tcp_do_tso VNET(tcp_do_tso) | ||||
#define V_tcp_ecn_maxretries VNET(tcp_ecn_maxretries) | #define V_tcp_ecn_maxretries VNET(tcp_ecn_maxretries) | ||||
#define V_tcp_initcwnd_segments VNET(tcp_initcwnd_segments) | #define V_tcp_initcwnd_segments VNET(tcp_initcwnd_segments) | ||||
#define V_tcp_insecure_rst VNET(tcp_insecure_rst) | #define V_tcp_insecure_rst VNET(tcp_insecure_rst) | ||||
#define V_tcp_insecure_syn VNET(tcp_insecure_syn) | #define V_tcp_insecure_syn VNET(tcp_insecure_syn) | ||||
#define V_tcp_minmss VNET(tcp_minmss) | #define V_tcp_minmss VNET(tcp_minmss) | ||||
#define V_tcp_mssdflt VNET(tcp_mssdflt) | #define V_tcp_mssdflt VNET(tcp_mssdflt) | ||||
#ifdef STATS | |||||
#define V_tcp_perconn_stats_dflt_tpl VNET(tcp_perconn_stats_dflt_tpl) | |||||
#define V_tcp_perconn_stats_enable VNET(tcp_perconn_stats_enable) | |||||
#endif /* STATS */ | |||||
#define V_tcp_recvspace VNET(tcp_recvspace) | #define V_tcp_recvspace VNET(tcp_recvspace) | ||||
#define V_tcp_sack_globalholes VNET(tcp_sack_globalholes) | #define V_tcp_sack_globalholes VNET(tcp_sack_globalholes) | ||||
#define V_tcp_sack_globalmaxholes VNET(tcp_sack_globalmaxholes) | #define V_tcp_sack_globalmaxholes VNET(tcp_sack_globalmaxholes) | ||||
#define V_tcp_sack_maxholes VNET(tcp_sack_maxholes) | #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_sc_rst_sock_fail VNET(tcp_sc_rst_sock_fail) | ||||
#define V_tcp_sendspace VNET(tcp_sendspace) | #define V_tcp_sendspace VNET(tcp_sendspace) | ||||
#define V_tcp_udp_tunneling_overhead VNET(tcp_udp_tunneling_overhead) | #define V_tcp_udp_tunneling_overhead VNET(tcp_udp_tunneling_overhead) | ||||
#define V_tcp_udp_tunneling_port VNET(tcp_udp_tunneling_port) | #define V_tcp_udp_tunneling_port VNET(tcp_udp_tunneling_port) | ||||
▲ Show 20 Lines • Show All 127 Lines • ▼ Show 20 Lines | |||||
void tcp_sack_adjust(struct tcpcb *tp); | void tcp_sack_adjust(struct tcpcb *tp); | ||||
struct sackhole *tcp_sack_output(struct tcpcb *tp, int *sack_bytes_rexmt); | struct sackhole *tcp_sack_output(struct tcpcb *tp, int *sack_bytes_rexmt); | ||||
void tcp_sack_partialack(struct tcpcb *, struct tcphdr *); | void tcp_sack_partialack(struct tcpcb *, struct tcphdr *); | ||||
void tcp_free_sackholes(struct tcpcb *tp); | void tcp_free_sackholes(struct tcpcb *tp); | ||||
int tcp_newreno(struct tcpcb *, struct tcphdr *); | int tcp_newreno(struct tcpcb *, struct tcphdr *); | ||||
int tcp_compute_pipe(struct tcpcb *); | int tcp_compute_pipe(struct tcpcb *); | ||||
uint32_t tcp_compute_initwnd(uint32_t); | uint32_t tcp_compute_initwnd(uint32_t); | ||||
void tcp_sndbuf_autoscale(struct tcpcb *, struct socket *, 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); | |||||
struct mbuf * | struct mbuf * | ||||
tcp_m_copym(struct mbuf *m, int32_t off0, int32_t *plen, | tcp_m_copym(struct mbuf *m, int32_t off0, int32_t *plen, | ||||
int32_t seglimit, int32_t segsize, struct sockbuf *sb, bool hw_tls); | int32_t seglimit, int32_t segsize, struct sockbuf *sb, bool hw_tls); | ||||
int tcp_stats_init(void); | |||||
static inline void | static inline void | ||||
tcp_fields_to_host(struct tcphdr *th) | tcp_fields_to_host(struct tcphdr *th) | ||||
{ | { | ||||
th->th_seq = ntohl(th->th_seq); | th->th_seq = ntohl(th->th_seq); | ||||
th->th_ack = ntohl(th->th_ack); | th->th_ack = ntohl(th->th_ack); | ||||
th->th_win = ntohs(th->th_win); | th->th_win = ntohs(th->th_win); | ||||
Show All 15 Lines |