ns-allinone-2.35/tcp/tcp-sack1.cc
void
Sack1TcpAgent::partial_ack_action()
{
	if (next_pkt_ < highest_ack_ + 1) {
		next_pkt_ = highest_ack_ + 1;
	}
	// Output two packets in response to a partial ack,
	//   so as not to do worse than slow-start.
	int i;
	for (i = 1; i<=2; i++) {
		int getNext = scb_->GetNextUnacked(next_pkt_);
		if (getNext > next_pkt_) {
			next_pkt_ = getNext;
		}
		if (t_seqno_ < next_pkt_) {
			t_seqno_ = next_pkt_;
		}
		output(next_pkt_, TCP_REASON_PARTIALACK);	
		scb_->MarkRetran(next_pkt_);
		++next_pkt_; 
	}
	return;
}
/*
 * Process a packet that acks previously unacknowleges data, but
 * does not take us out of Fast Retransmit.
 *
 * The need for a mechanism to ensure that Sack TCP sends a packet in
 * response to a partial ACK has been discussed in
 * "Challenges to Reliable Data Transport over Heterogeneous
 * Wireless Networks", Hari Balakrishnan, 1998, and in
 * "Responding to Spurious Timeouts in TCP", Andrei Gurtov and 
 * Reiner Ludwig, 2003. 
 */
Process a packet that acks previously unacknowleges data, but
does not take us out of Fast Retransmit.

The need for a mechanism to ensure that Sack TCP sends a packet in
response to a partial ACK has been discussed in
"Challenges to Reliable Data Transport over Heterogeneous
Wireless Networks", Hari Balakrishnan, 1998, and in
"Responding to Spurious Timeouts in TCP", Andrei Gurtov and
Reiner Ludwig, 2003.
Process a packet that acks previously unacknowleges data but does not take us out of Fast Retransmit . The need for a mechanism to ensure that Sack TCP sends a packet in response to a partial ACK has been discussed in " Challenges to Reliable Data Transport over Heterogeneous Wireless Networks " Hari Balakrishnan 1998 and in " Responding to Spurious Timeouts in TCP " Andrei Gurtov and Reiner Ludwig 2003 .
void
Sack1TcpAgent::partial_ack_action()
{
	if (next_pkt_ < highest_ack_ + 1) {
		next_pkt_ = highest_ack_ + 1;
	}
	int i;
	for (i = 1; i<=2; i++) {
		int getNext = scb_->GetNextUnacked(next_pkt_);
		if (getNext > next_pkt_) {
			next_pkt_ = getNext;
		}
		if (t_seqno_ < next_pkt_) {
			t_seqno_ = next_pkt_;
		}
		output(next_pkt_, TCP_REASON_PARTIALACK);	
		scb_->MarkRetran(next_pkt_);
		++next_pkt_; 
	}
	return;
}
void Sack1TcpAgent :: partial_ack_action ( ) { if ( next_pkt_ < highest_ack_ + 1 ) { next_pkt_ = highest_ack_ + 1 ; } int i ; for ( i = 1 ; i <= 2 ; i ++ ) { int getNext = scb_ -> GetNextUnacked ( next_pkt_ ) ; if ( getNext > next_pkt_ ) { next_pkt_ = getNext ; } if ( t_seqno_ < next_pkt_ ) { t_seqno_ = next_pkt_ ; } output ( next_pkt_ , TCP_REASON_PARTIALACK ) ; scb_ -> MarkRetran ( next_pkt_ ) ; ++ next_pkt_ ; } return ; }
Process a packet that acks previously unacknowleges data, but
 does not take us out of Fast Retransmit.
Process a packet that acks previously unacknowleges data but does not take us out of Fast Retransmit .
// Output two packets in response to a partial ack, //   so as not to do worse than slow-start.