ns-allinone-2.35/tcp/scoreboard.cc
int ScoreBoard::GetNextRetran()	// Returns sequence number of next pkt...
{
	int i;

	if (length_) {
		for (i=SBN[(first_)%sbsize_].seq_no_; 
		     i<SBN[(first_)%sbsize_].seq_no_+length_; i++) {
			if (!SBNI.ack_flag_ && !SBNI.sack_flag_ && !SBNI.retran_) {
				return (i);
			}
		}
	}
	return (-1);
}
/*
 * GetNextRetran() returns "-1" if there is no packet that is
 *   not acked and not sacked and not retransmitted.
 */
GetNextRetran() returns "-1" if there is no packet that is
not acked and not sacked and not retransmitted.
GetNextRetran () returns " - 1 " if there is no packet that is not acked and not sacked and not retransmitted .
int ScoreBoard::GetNextRetran()	
{
	int i;
	if (length_) {
		for (i=SBN[(first_)%sbsize_].seq_no_; 
		     i<SBN[(first_)%sbsize_].seq_no_+length_; i++) {
			if (!SBNI.ack_flag_ && !SBNI.sack_flag_ && !SBNI.retran_) {
				return (i);
			}
		}
	}
	return (-1);
}
int ScoreBoard :: GetNextRetran ( ) { int i ; if ( length_ ) { for ( i = SBN [ ( first_ ) % sbsize_ ] . seq_no_ ; i < SBN [ ( first_ ) % sbsize_ ] . seq_no_ + length_ ; i ++ ) { if ( ! SBNI . ack_flag_ && ! SBNI . sack_flag_ && ! SBNI . retran_ ) { return ( i ) ; } } } return ( -1 ) ; }
GetNextRetran() returns "-1" if there is no packet that is
   not acked and not sacked and not retransmitted.
GetNextRetran () returns " - 1 " if there is no packet that is not acked and not sacked and not retransmitted .
// Returns sequence number of next pkt...