[ns] TCP F-RTO fix
Daikichi Osuga
osugad at s1.nttdocomo.co.jp
Sun Jan 6 20:18:44 PST 2008
Hello
I fixed just one different errors.
--
Daikichi Osuga
--- ns-2.29-org/tcp/tcp.cc Thu Oct 20 13:45:25 2005
+++ ns-2.29/tcp/tcp.cc Tue Sep 4 10:30:27 2007
@@ -1450,7 +1450,7 @@ void TcpAgent::recv_newack_helper(Packet
* If there are no new data or receiver window limits the
* transmission, revert to traditional recovery.
*/
- if (recover_ + 1 >= highest_ack_ + wnd_ ||
+ if (recover_ + 1 > highest_ack_ + wnd_ ||
recover_ + 1 >= curseq_) {
frto_ = 0;
} else if (highest_ack_ == recover_) {
--- ns-2.29-org/tcp/tcp-sack1.cc Thu Oct 20 13:45:25 2005
+++ ns-2.29/tcp/tcp-sack1.cc Wed Oct 10 16:31:59 2007
@@ -256,6 +256,15 @@ void Sack1TcpAgent::recv(Packet *pkt, Ha
int Sack1TcpAgent::is_sacked(hdr_tcp *tcph, int seqlo, int seqhi)
{
int i, sleft, sright;
+
+ /*
+ * In ns TCP Agent "maxseq_" is highest SENT sequence number.
+ * In actual TCP "snd_max" is lowest UNSENT sequence number.
+ * So adjustment is needed.
+ */
+ seqlo++;
+ seqhi++;
+
for (i=0; i < tcph->sa_length(); i++) {
sleft = tcph->sa_left(i);
sright = tcph->sa_right(i);
More information about the Ns-users
mailing list