Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/tcp_input.c
Show First 20 Lines • Show All 198 Lines • ▼ Show 20 Lines | SYSCTL_INT(_net_inet_tcp, OID_AUTO, rfc3465, CTLFLAG_VNET | CTLFLAG_RW, | ||||
&VNET_NAME(tcp_do_rfc3465), 0, | &VNET_NAME(tcp_do_rfc3465), 0, | ||||
"Enable RFC 3465 (Appropriate Byte Counting)"); | "Enable RFC 3465 (Appropriate Byte Counting)"); | ||||
VNET_DEFINE(int, tcp_abc_l_var) = 2; | VNET_DEFINE(int, tcp_abc_l_var) = 2; | ||||
SYSCTL_INT(_net_inet_tcp, OID_AUTO, abc_l_var, CTLFLAG_VNET | CTLFLAG_RW, | SYSCTL_INT(_net_inet_tcp, OID_AUTO, abc_l_var, CTLFLAG_VNET | CTLFLAG_RW, | ||||
&VNET_NAME(tcp_abc_l_var), 2, | &VNET_NAME(tcp_abc_l_var), 2, | ||||
"Cap the max cwnd increment during slow-start to this number of segments"); | "Cap the max cwnd increment during slow-start to this number of segments"); | ||||
static SYSCTL_NODE(_net_inet_tcp, OID_AUTO, ecn, | |||||
CTLFLAG_RW | CTLFLAG_MPSAFE, 0, | |||||
"TCP ECN"); | |||||
VNET_DEFINE(int, tcp_do_ecn) = 2; | |||||
SYSCTL_INT(_net_inet_tcp_ecn, OID_AUTO, enable, CTLFLAG_VNET | CTLFLAG_RW, | |||||
&VNET_NAME(tcp_do_ecn), 0, | |||||
"TCP ECN support"); | |||||
VNET_DEFINE(int, tcp_ecn_maxretries) = 1; | |||||
SYSCTL_INT(_net_inet_tcp_ecn, OID_AUTO, maxretries, CTLFLAG_VNET | CTLFLAG_RW, | |||||
&VNET_NAME(tcp_ecn_maxretries), 0, | |||||
"Max retries before giving up on ECN"); | |||||
VNET_DEFINE(int, tcp_insecure_syn) = 0; | VNET_DEFINE(int, tcp_insecure_syn) = 0; | ||||
SYSCTL_INT(_net_inet_tcp, OID_AUTO, insecure_syn, CTLFLAG_VNET | CTLFLAG_RW, | SYSCTL_INT(_net_inet_tcp, OID_AUTO, insecure_syn, CTLFLAG_VNET | CTLFLAG_RW, | ||||
&VNET_NAME(tcp_insecure_syn), 0, | &VNET_NAME(tcp_insecure_syn), 0, | ||||
"Follow RFC793 instead of RFC5961 criteria for accepting SYN packets"); | "Follow RFC793 instead of RFC5961 criteria for accepting SYN packets"); | ||||
VNET_DEFINE(int, tcp_insecure_rst) = 0; | VNET_DEFINE(int, tcp_insecure_rst) = 0; | ||||
SYSCTL_INT(_net_inet_tcp, OID_AUTO, insecure_rst, CTLFLAG_VNET | CTLFLAG_RW, | SYSCTL_INT(_net_inet_tcp, OID_AUTO, insecure_rst, CTLFLAG_VNET | CTLFLAG_RW, | ||||
&VNET_NAME(tcp_insecure_rst), 0, | &VNET_NAME(tcp_insecure_rst), 0, | ||||
▲ Show 20 Lines • Show All 1,396 Lines • ▼ Show 20 Lines | #endif | ||||
tiwin = th->th_win << tp->snd_scale; | tiwin = th->th_win << tp->snd_scale; | ||||
#ifdef STATS | #ifdef STATS | ||||
stats_voi_update_abs_ulong(tp->t_stats, VOI_TCP_FRWIN, tiwin); | stats_voi_update_abs_ulong(tp->t_stats, VOI_TCP_FRWIN, tiwin); | ||||
#endif | #endif | ||||
/* | /* | ||||
* TCP ECN processing. | * TCP ECN processing. | ||||
*/ | */ | ||||
if (tcp_ecn_input_segment(tp, thflags, iptos)) | if (tcp_ecn_input_segment(tp, thflags, tlen, iptos)) | ||||
cc_cong_signal(tp, th, CC_ECN); | cc_cong_signal(tp, th, CC_ECN); | ||||
/* | /* | ||||
* Parse options on any incoming segment. | * Parse options on any incoming segment. | ||||
*/ | */ | ||||
tcp_dooptions(&to, (u_char *)(th + 1), | tcp_dooptions(&to, (u_char *)(th + 1), | ||||
(th->th_off << 2) - sizeof(struct tcphdr), | (th->th_off << 2) - sizeof(struct tcphdr), | ||||
(thflags & TH_SYN) ? TO_SYN : 0); | (thflags & TH_SYN) ? TO_SYN : 0); | ||||
▲ Show 20 Lines • Show All 2,496 Lines • Show Last 20 Lines |