ns-allinone-2.35/ns-2.35/baytcp/tcp-full-bay.cc
int BayFullTcpAgent::need_send()
{
	//first cut, send if anything to ack. Might need maxseg_
	if(flags_ & TF_ACKNOW)
		return 1;
	if(rcv_nxt_ < switch_spa_thresh_)
		return ((rcv_nxt_ - last_ack_sent_) >= 1);
	return ((rcv_nxt_ - last_ack_sent_) >= (segs_per_ack_ * maxseg_));
}
/* kmn - adding code to switch from one seg per ack to set value
  */
adding code to switch from one seg per ack to set value
adding code to switch from one seg per ack to set value
int BayFullTcpAgent::need_send()
{
	if(flags_ & TF_ACKNOW)
		return 1;
	if(rcv_nxt_ < switch_spa_thresh_)
		return ((rcv_nxt_ - last_ack_sent_) >= 1);
	return ((rcv_nxt_ - last_ack_sent_) >= (segs_per_ack_ * maxseg_));
}
int BayFullTcpAgent :: need_send ( ) { if ( flags_ & TF_ACKNOW ) return 1 ; if ( rcv_nxt_ < switch_spa_thresh_ ) return ( ( rcv_nxt_ - last_ack_sent_ ) >= 1 ) ; return ( ( rcv_nxt_ - last_ack_sent_ ) >= ( segs_per_ack_ * maxseg_ ) ) ; }
kmn - adding code to switch from one seg per ack to set value
kmn - adding code to switch from one seg per ack to set value
//first cut, send if anything to ack. Might need maxseg_