Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/tcp_output.c
Show First 20 Lines • Show All 1,230 Lines • ▼ Show 20 Lines | if (len || (flags & (TH_SYN|TH_FIN)) || | ||||
th->th_seq = htonl(tp->snd_nxt); | th->th_seq = htonl(tp->snd_nxt); | ||||
else | else | ||||
th->th_seq = htonl(tp->snd_max); | th->th_seq = htonl(tp->snd_max); | ||||
} else { | } else { | ||||
th->th_seq = htonl(p->rxmit); | th->th_seq = htonl(p->rxmit); | ||||
p->rxmit += len; | p->rxmit += len; | ||||
tp->sackhint.sack_bytes_rexmit += len; | tp->sackhint.sack_bytes_rexmit += len; | ||||
} | } | ||||
if (IN_RECOVERY(tp->t_flags)) { | |||||
/* | |||||
* Account all bytes transmitted while | |||||
* IN_RECOVERY, simplifying PRR and | |||||
* Lost Retransmit Detection | |||||
*/ | |||||
tp->sackhint.prr_out += len; | |||||
} | |||||
th->th_ack = htonl(tp->rcv_nxt); | th->th_ack = htonl(tp->rcv_nxt); | ||||
if (optlen) { | if (optlen) { | ||||
bcopy(opt, th + 1, optlen); | bcopy(opt, th + 1, optlen); | ||||
th->th_off = (sizeof (struct tcphdr) + optlen) >> 2; | th->th_off = (sizeof (struct tcphdr) + optlen) >> 2; | ||||
} | } | ||||
th->th_flags = flags; | th->th_flags = flags; | ||||
/* | /* | ||||
* Calculate receive window. Don't shrink window, | * Calculate receive window. Don't shrink window, | ||||
▲ Show 20 Lines • Show All 878 Lines • Show Last 20 Lines |