Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/tcp_input.c
Show First 20 Lines • Show All 366 Lines • ▼ Show 20 Lines | |||||
#ifdef STATS | #ifdef STATS | ||||
stats_voi_update_abs_ulong(tp->t_stats, VOI_TCP_LCWIN, tp->snd_cwnd); | stats_voi_update_abs_ulong(tp->t_stats, VOI_TCP_LCWIN, tp->snd_cwnd); | ||||
#endif | #endif | ||||
} | } | ||||
void | void | ||||
cc_conn_init(struct tcpcb *tp) | cc_conn_init(struct tcpcb *tp) | ||||
{ | { | ||||
struct hc_metrics_lite metrics; | struct hc_metrics_lite metrics = { 0 }; | ||||
struct inpcb *inp = tp->t_inpcb; | struct inpcb *inp = tp->t_inpcb; | ||||
u_int maxseg; | u_int maxseg; | ||||
int rtt; | int rtt; | ||||
INP_WLOCK_ASSERT(tp->t_inpcb); | INP_WLOCK_ASSERT(tp->t_inpcb); | ||||
tcp_hc_get(&inp->inp_inc, &metrics); | tcp_hc_get(&inp->inp_inc, &metrics); | ||||
maxseg = tcp_maxseg(tp); | maxseg = tcp_maxseg(tp); | ||||
▲ Show 20 Lines • Show All 3,118 Lines • ▼ Show 20 Lines | |||||
*/ | */ | ||||
void | void | ||||
tcp_mss_update(struct tcpcb *tp, int offer, int mtuoffer, | tcp_mss_update(struct tcpcb *tp, int offer, int mtuoffer, | ||||
struct hc_metrics_lite *metricptr, struct tcp_ifcap *cap) | struct hc_metrics_lite *metricptr, struct tcp_ifcap *cap) | ||||
{ | { | ||||
int mss = 0; | int mss = 0; | ||||
uint32_t maxmtu = 0; | uint32_t maxmtu = 0; | ||||
struct inpcb *inp = tp->t_inpcb; | struct inpcb *inp = tp->t_inpcb; | ||||
struct hc_metrics_lite metrics; | struct hc_metrics_lite metrics = { 0 }; | ||||
#ifdef INET6 | #ifdef INET6 | ||||
int isipv6 = ((inp->inp_vflag & INP_IPV6) != 0) ? 1 : 0; | int isipv6 = ((inp->inp_vflag & INP_IPV6) != 0) ? 1 : 0; | ||||
size_t min_protoh = isipv6 ? | size_t min_protoh = isipv6 ? | ||||
sizeof (struct ip6_hdr) + sizeof (struct tcphdr) : | sizeof (struct ip6_hdr) + sizeof (struct tcphdr) : | ||||
sizeof (struct tcpiphdr); | sizeof (struct tcpiphdr); | ||||
#else | #else | ||||
const size_t min_protoh = sizeof(struct tcpiphdr); | const size_t min_protoh = sizeof(struct tcpiphdr); | ||||
#endif | #endif | ||||
▲ Show 20 Lines • Show All 321 Lines • Show Last 20 Lines |