Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/tcp_output.c
Show First 20 Lines • Show All 823 Lines • ▼ Show 20 Lines | if ((flags & TH_SYN) && (tp->t_flags & TF_REQ_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; | to.to_tsval = tcp_ts_getticks() + 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; | ||||
} | |||||
/* 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. */ | ||||
if (tp->t_flags & TF_SACK_PERMIT) { | if (tp->t_flags & TF_SACK_PERMIT) { | ||||
if (flags & TH_SYN) | if (flags & TH_SYN) | ||||
to.to_flags |= TOF_SACKPERM; | to.to_flags |= TOF_SACKPERM; | ||||
else if (TCPS_HAVEESTABLISHED(tp->t_state) && | else if (TCPS_HAVEESTABLISHED(tp->t_state) && | ||||
(tp->t_flags & TF_SACK_PERMIT) && | (tp->t_flags & TF_SACK_PERMIT) && | ||||
tp->rcv_numsacks > 0) { | tp->rcv_numsacks > 0) { | ||||
to.to_flags |= TOF_SACK; | to.to_flags |= TOF_SACK; | ||||
▲ Show 20 Lines • Show All 1,007 Lines • Show Last 20 Lines |