Changeset View
Changeset View
Standalone View
Standalone View
head/sys/netinet/tcp_output.c
Show First 20 Lines • Show All 200 Lines • ▼ Show 20 Lines | #ifdef TCPDEBUG | ||||
struct ipovly *ipov = NULL; | struct ipovly *ipov = NULL; | ||||
#endif | #endif | ||||
struct tcphdr *th; | struct tcphdr *th; | ||||
u_char opt[TCP_MAXOLEN]; | u_char opt[TCP_MAXOLEN]; | ||||
unsigned ipoptlen, optlen, hdrlen; | unsigned ipoptlen, optlen, hdrlen; | ||||
#if defined(IPSEC) || defined(IPSEC_SUPPORT) | #if defined(IPSEC) || defined(IPSEC_SUPPORT) | ||||
unsigned ipsec_optlen = 0; | unsigned ipsec_optlen = 0; | ||||
#endif | #endif | ||||
int idle, sendalot; | int idle, sendalot, curticks; | ||||
int sack_rxmit, sack_bytes_rxmt; | int sack_rxmit, sack_bytes_rxmt; | ||||
struct sackhole *p; | struct sackhole *p; | ||||
int tso, mtu; | int tso, mtu; | ||||
struct tcpopt to; | struct tcpopt to; | ||||
unsigned int wanted_cookie = 0; | unsigned int wanted_cookie = 0; | ||||
unsigned int dont_sendalot = 0; | unsigned int dont_sendalot = 0; | ||||
#if 0 | #if 0 | ||||
int maxburst = TCP_MAXBURST; | int maxburst = TCP_MAXBURST; | ||||
▲ Show 20 Lines • Show All 585 Lines • ▼ Show 20 Lines | if ((tp->t_flags & TF_NOOPT) == 0) { | ||||
/* Window scaling. */ | /* Window scaling. */ | ||||
if ((flags & TH_SYN) && (tp->t_flags & TF_REQ_SCALE)) { | if ((flags & TH_SYN) && (tp->t_flags & TF_REQ_SCALE)) { | ||||
to.to_wscale = tp->request_r_scale; | to.to_wscale = tp->request_r_scale; | ||||
to.to_flags |= TOF_SCALE; | to.to_flags |= TOF_SCALE; | ||||
} | } | ||||
/* Timestamps. */ | /* Timestamps. */ | ||||
if ((tp->t_flags & TF_RCVD_TSTMP) || | if ((tp->t_flags & TF_RCVD_TSTMP) || | ||||
((flags & TH_SYN) && (tp->t_flags & TF_REQ_TSTMP))) { | ((flags & TH_SYN) && (tp->t_flags & TF_REQ_TSTMP))) { | ||||
to.to_tsval = tcp_ts_getticks() + tp->ts_offset; | curticks = tcp_ts_getticks(); | ||||
to.to_tsval = curticks + tp->ts_offset; | |||||
to.to_tsecr = tp->ts_recent; | to.to_tsecr = tp->ts_recent; | ||||
to.to_flags |= TOF_TS; | to.to_flags |= TOF_TS; | ||||
if (tp->t_rxtshift == 1) | |||||
tp->t_badrxtwin = curticks; | |||||
} | } | ||||
/* Set receive buffer autosizing timestamp. */ | /* Set receive buffer autosizing timestamp. */ | ||||
if (tp->rfbuf_ts == 0 && | if (tp->rfbuf_ts == 0 && | ||||
(so->so_rcv.sb_flags & SB_AUTOSIZE)) | (so->so_rcv.sb_flags & SB_AUTOSIZE)) | ||||
tp->rfbuf_ts = tcp_ts_getticks(); | tp->rfbuf_ts = tcp_ts_getticks(); | ||||
/* Selective ACK's. */ | /* Selective ACK's. */ | ||||
▲ Show 20 Lines • Show All 1,087 Lines • Show Last 20 Lines |