ns-allinone-2.35/tcp/scoreboard.cc
int ScoreBoard::GetNextUnacked (int seqno)
{
	int i;
	if (!length_) {
		return (-1);
	} else if (seqno < SBN[(first_)%sbsize_].seq_no_ ||
		seqno >= SBN[(first_)%sbsize_].seq_no_+length_) {
		return (-1);
	} else {
		for (i=seqno; i<SBN[(first_)%sbsize_].seq_no_+length_; i++) {
			if (!SBNI.ack_flag_ && !SBNI.sack_flag_) {
				return (i);
			}
		}
	}
	return (-1);

}
/*
 * GetNextUnacked returns sequence number of next unacked pkt,
 * starting with seqno.
 * Returns -1 if there is no unacked packet in that range.
 */
GetNextUnacked returns sequence number of next unacked pkt,
starting with seqno.
Returns -1 if there is no unacked packet in that range.
GetNextUnacked returns sequence number of next unacked pkt starting with seqno . Returns - 1 if there is no unacked packet in that range .
int ScoreBoard::GetNextUnacked (int seqno)
{
	int i;
	if (!length_) {
		return (-1);
	} else if (seqno < SBN[(first_)%sbsize_].seq_no_ ||
		seqno >= SBN[(first_)%sbsize_].seq_no_+length_) {
		return (-1);
	} else {
		for (i=seqno; i<SBN[(first_)%sbsize_].seq_no_+length_; i++) {
			if (!SBNI.ack_flag_ && !SBNI.sack_flag_) {
				return (i);
			}
		}
	}
	return (-1);
}
int ScoreBoard :: GetNextUnacked ( int seqno ) { int i ; if ( ! length_ ) { return ( -1 ) ; } else if ( seqno < SBN [ ( first_ ) % sbsize_ ] . seq_no_ || seqno >= SBN [ ( first_ ) % sbsize_ ] . seq_no_ + length_ ) { return ( -1 ) ; } else { for ( i = seqno ; i < SBN [ ( first_ ) % sbsize_ ] . seq_no_ + length_ ; i ++ ) { if ( ! SBNI . ack_flag_ && ! SBNI . sack_flag_ ) { return ( i ) ; } } } return ( -1 ) ; }
GetNextUnacked returns sequence number of next unacked pkt,
 starting with seqno.
GetNextUnacked returns sequence number of next unacked pkt starting with seqno .