First, patch the ns-2.34 code using the patch and recipe from http://wpage.unina.it/marcello.caleffi/ns2/tora.html.

Then, to avoid eternal loops making the simulation never ending, fix the line 504 (ns-2.34) in imep/imep.cc which reads

rexmitTimer.start(rexat - CURRENT_TIME);

If rexat – CURRENT_TIME is 0, then the same function is called immediately without increasing the simulation time, creating an eternal loop. I would have replaced the line with the following lines:

if (rexat-CURRENT_TIME<0.000001) // Preventing eternal loop.
   rexmitTimer.start(0.000001);
else
   rexmitTimer.start(rexat - CURRENT_TIME);

Then recompile with make, and enjoy. 🙂

Advertisements