ns-allinone-2.35/tcp/tcp-sack1.cc
int Sack1TcpAgent::is_sacked(hdr_tcp *tcph, int seqlo, int seqhi)
{
	int i, sleft, sright;
	for (i=0; i < tcph->sa_length(); i++) {
		sleft = tcph->sa_left(i);
		sright = tcph->sa_right(i);

		if ((sright > seqlo && sright <= seqhi) ||
		    (sleft >= seqlo && sleft < seqhi) ||
		    (sleft < seqlo && sright > seqhi)) {
			return TRUE;
		}
	}
	return FALSE;
}
/*
 * Returns TRUE if any of the SACK blocks in the current packet (tcph)
 * cover sequence numbers between seqlo and seqhi
 */
Returns TRUE if any of the SACK blocks in the current packet (tcph)
cover sequence numbers between seqlo and seqhi
Returns TRUE if any of the SACK blocks in the current packet ( tcph ) cover sequence numbers between seqlo and seqhi
int Sack1TcpAgent::is_sacked(hdr_tcp *tcph, int seqlo, int seqhi)
{
	int i, sleft, sright;
	for (i=0; i < tcph->sa_length(); i++) {
		sleft = tcph->sa_left(i);
		sright = tcph->sa_right(i);
		if ((sright > seqlo && sright <= seqhi) ||
		    (sleft >= seqlo && sleft < seqhi) ||
		    (sleft < seqlo && sright > seqhi)) {
			return TRUE;
		}
	}
	return FALSE;
}
int Sack1TcpAgent :: is_sacked ( hdr_tcp * tcph , int seqlo , int seqhi ) { int i , sleft , sright ; for ( i = 0 ; i < tcph -> sa_length ( ) ; i ++ ) { sleft = tcph -> sa_left ( i ) ; sright = tcph -> sa_right ( i ) ; if ( ( sright > seqlo && sright <= seqhi ) || ( sleft >= seqlo && sleft < seqhi ) || ( sleft < seqlo && sright > seqhi ) ) { return TRUE ; } } return FALSE ; }
Returns TRUE if any of the SACK blocks in the current packet (tcph)
 cover sequence numbers between seqlo and seqhi
Returns TRUE if any of the SACK blocks in the current packet ( tcph ) cover sequence numbers between seqlo and seqhi