ns-allinone-2.35/tcp/tcp-vegas.cc
int
VegasTcpAgent::vegas_expire(Packet* pkt)
{
	hdr_tcp *tcph = hdr_tcp::access(pkt);
	double elapse = vegastime() - v_sendtime_[(tcph->seqno()+1)%v_maxwnd_];
	if (elapse >= v_timeout_) {
		return(tcph->seqno()+1);
	}
	return(-1);
}
/*
 * return -1 if the oldest sent pkt has not been timeout (based on
 * fine grained timer).
 */
1 if the oldest sent pkt has not been timeout (based on
fine grained timer).
1 if the oldest sent pkt has not been timeout ( based on fine grained timer ) .
int
VegasTcpAgent::vegas_expire(Packet* pkt)
{
	hdr_tcp *tcph = hdr_tcp::access(pkt);
	double elapse = vegastime() - v_sendtime_[(tcph->seqno()+1)%v_maxwnd_];
	if (elapse >= v_timeout_) {
		return(tcph->seqno()+1);
	}
	return(-1);
}
int VegasTcpAgent :: vegas_expire ( Packet * pkt ) { hdr_tcp * tcph = hdr_tcp :: access ( pkt ) ; double elapse = vegastime ( ) - v_sendtime_ [ ( tcph -> seqno ( ) + 1 ) % v_maxwnd_ ] ; if ( elapse >= v_timeout_ ) { return ( tcph -> seqno ( ) + 1 ) ; } return ( -1 ) ; }
return -1 if the oldest sent pkt has not been timeout (based on
 fine grained timer).
return - 1 if the oldest sent pkt has not been timeout ( based on fine grained timer ) .