ns-allinone-2.35/tcp/tcp-int.cc
void
IntTcpAgent::newack(Packet* pkt)
{
	hdr_tcp *tcph = hdr_tcp::access(pkt);
	last_ack_ = tcph->seqno();
	highest_ack_ = last_ack_;

	if (t_seqno_ < last_ack_ + 1)
		t_seqno_ = last_ack_ + 1;
	/* if the connection is done, call finish() */
	if ((highest_ack_ >= curseq_-1) && !closed_) {
		closed_ = 1;
		finish();
	}
}
/* 
 * Update the ack information and reset the timer. RTT update is done in 
 * TcpSessionAgent.
 */
Update the ack information and reset the timer. RTT update is done in
TcpSessionAgent.
Update the ack information and reset the timer . RTT update is done in TcpSessionAgent .
void
IntTcpAgent::newack(Packet* pkt)
{
	hdr_tcp *tcph = hdr_tcp::access(pkt);
	last_ack_ = tcph->seqno();
	highest_ack_ = last_ack_;
	if (t_seqno_ < last_ack_ + 1)
		t_seqno_ = last_ack_ + 1;
	if ((highest_ack_ >= curseq_-1) && !closed_) {
		closed_ = 1;
		finish();
	}
}
void IntTcpAgent :: newack ( Packet * pkt ) { hdr_tcp * tcph = hdr_tcp :: access ( pkt ) ; last_ack_ = tcph -> seqno ( ) ; highest_ack_ = last_ack_ ; if ( t_seqno_ < last_ack_ + 1 ) t_seqno_ = last_ack_ + 1 ; if ( ( highest_ack_ >= curseq_ - 1 ) && ! closed_ ) { closed_ = 1 ; finish ( ) ; } }
Update the ack information and reset the timer.
Update the ack information and reset the timer .
/* if the connection is done, call finish() */