tcp-test.cc

17 views
Skip to first unread message

Harald Ott

unread,
May 12, 2016, 8:30:40 AM5/12/16
to ns-3-users
The file src/internet/test/tcp-test.cc already contains much functionality I need for my simulation, so I would like to take this as a basis.
I just can't seem to find the main program (like there is udp-echo.cc, which uses the model udp-echo-server/client in src/applications/model) which uses the test defined in tcp-test (there is no program called tcp-test). How can I use it?

Tommaso Pecorella

unread,
May 12, 2016, 9:39:07 AM5/12/16
to ns-3-users
Hi,

tests aren't normal programs, they're meant to be run by a special program that collects all the classes inheriting from a specific one, and launches its instances.

Practically speaking, that test is executed by creating some instances to the TestCases:
    AddTestCase (new TcpTestCase (13, 200, 200, 200, 200, false), TestCase::QUICK);
   
AddTestCase (new TcpTestCase (13, 1, 1, 1, 1, false), TestCase::QUICK);
   
AddTestCase (new TcpTestCase (100000, 100, 50, 100, 20, false), TestCase::QUICK);


   
AddTestCase (new TcpTestCase (13, 200, 200, 200, 200, true), TestCase::QUICK);
   
AddTestCase (new TcpTestCase (13, 1, 1, 1, 1, true), TestCase::QUICK);
   
AddTestCase (new TcpTestCase (100000, 100, 50, 100, 20, true), TestCase::QUICK);


You can "easily" borrow some code, but I don't think you can copy-paste how it works.

Cheers,

T.
Reply all
Reply to author
Forward
0 new messages