Bug 217 - sample/regression program tcp-2way
sample/regression program tcp-2way
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: internet
pre-release
All All
: P1 normal
Assigned To: ns-bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-06-11 12:06 UTC by evensky
Modified: 2008-06-24 12:17 UTC (History)
0 users

See Also:


Attachments
proposed ns-3-dev/examples/tcp-2way.cc (20.75 KB, text/plain)
2008-06-11 12:12 UTC, evensky
Details
patch for ns-3-dev/examples/wscript to add tcp-2way (487 bytes, text/plain)
2008-06-11 12:15 UTC, evensky
Details
proposed ns-3-dev/regression/tests/test-tcp-2way.py (260 bytes, text/plain)
2008-06-11 12:18 UTC, evensky
Details
proposed ns-3-dev/examples/tcp-2way.cc (20.81 KB, text/plain)
2008-06-17 21:04 UTC, evensky
Details
new version that sends increasing sizes back and forth.... (23.59 KB, text/plain)
2008-06-18 11:38 UTC, evensky
Details
cleaned up version of tcp-2way with packet's scheduled in.... (17.42 KB, text/plain)
2008-06-18 17:35 UTC, evensky
Details
much cleaned up and better documented version. (21.58 KB, text/plain)
2008-06-18 19:47 UTC, evensky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description evensky 2008-06-11 12:06:34 UTC
Working towards a version of tcp-2way.cc suitable for release.
Comment 1 evensky 2008-06-11 12:12:07 UTC
Created attachment 162 [details]
proposed ns-3-dev/examples/tcp-2way.cc

I have some #def's set for use as a regression test. It doesn't output anything as is except for ascii and pcap traces. I've changed the formatting to follow ns-3-dev, but may have missed a few things. I've included copyrights from my starting code and other things I've stolen, .... err. aggregated.

With the current MTU, it send a first fragment with 3 packets in it, followed by fragments with the rest of the last packet. It also send 2 packets, in one fragment, on the back channel. It also tests if Tags are preserved from Tx to Rx over TCP.
Comment 2 evensky 2008-06-11 12:15:23 UTC
Created attachment 163 [details]
patch for ns-3-dev/examples/wscript to add tcp-2way
Comment 3 evensky 2008-06-11 12:18:04 UTC
Created attachment 164 [details]
proposed ns-3-dev/regression/tests/test-tcp-2way.py
Comment 4 evensky 2008-06-17 21:04:29 UTC
Created attachment 169 [details]
proposed ns-3-dev/examples/tcp-2way.cc

Changed the SetConnectionCallback and SetAcceptCallback to the current API. There's some cleanup and some new callbacks to add as TODOs.
Comment 5 evensky 2008-06-18 11:38:50 UTC
Created attachment 170 [details]
new version that sends increasing sizes back and forth....

This test version send packets from size 0 to 10000 by decades. There are a few weird packets that very large headers, and MTUs that are > they typical value of 536.
Comment 6 evensky 2008-06-18 17:35:21 UTC
Created attachment 174 [details]
cleaned up version of tcp-2way with packet's scheduled in....

I removed most of the #defines to clean up the code, and removed a bunch of debugging output to make the code a little more readable. Still more to do.

Right now I get different fatal errors depending on if VERBOSE_TESTING is #defined or not. With it, the program dies during Packet::Print, without it dies in the NS_ASSERT that checks the existence of Rx addr. Both of these are in TalkerApp::HandleRead().
Comment 7 evensky 2008-06-18 19:47:18 UTC
Created attachment 175 [details]
much cleaned up and better documented version.

I've added more comments and cleaned up the code a bit more.

NOTE: I've also added a #define TOO_SMALL_BUG which is you uncomment in the code
will cause the program to die earlier than the other bug this program exercises.
Comment 8 evensky 2008-06-24 12:17:12 UTC
fixed in the latest version. thx