ns-allinone-2.35/tcp/tcp-full.cc
void
FullTcpAgent::advanceby(int np)
{
	// XXX hack:
	//	because np is in packets and a data source
	//	may pass a *huge* number as a way to tell us
	//	to go forever, just look for the huge number
	//	and if it's there, pre-divide it
	if (np >= 0x10000000)
		np /= maxseg_;

	advance_bytes(np * maxseg_);
	return;
}
/*
 * the 'advance' interface to the regular tcp is in packet
 * units.  Here we scale this to bytes for full tcp.
 *
 * 'advance' is normally called by an "application" (i.e. data source)
 * to signal that there is something to send
 *
 * 'curseq_' is the sequence number of the last byte provided
 * by the application.  In the case where no data has been supplied
 * by the application, curseq_ is the iss_.
 */
the 'advance' interface to the regular tcp is in packet
units.  Here we scale this to bytes for full tcp.

'advance' is normally called by an "application"
to signal that there is something to send

'curseq_' is the sequence number of the last byte provided
by the application.  In the case where no data has been supplied
by the application, curseq_ is the iss_.
the ' advance ' interface to the regular tcp is in packet units . Here we scale this to bytes for full tcp . ' advance ' is normally called by an " application " to signal that there is something to send ' curseq_ ' is the sequence number of the last byte provided by the application . In the case where no data has been supplied by the application curseq_ is the iss_ .
void
FullTcpAgent::advanceby(int np)
{
	if (np >= 0x10000000)
		np /= maxseg_;
	advance_bytes(np * maxseg_);
	return;
}
void FullTcpAgent :: advanceby ( int np ) { if ( np >= 0x10000000 ) np /= maxseg_ ; advance_bytes ( np * maxseg_ ) ; return ; }
the 'advance' interface to the regular tcp is in packet
 units.
the ' advance ' interface to the regular tcp is in packet units .
// XXX hack: //	because np is in packets and a data source //	may pass a *huge* number as a way to tell us //	to go forever, just look for the huge number //	and if it's there, pre-divide it