22 #include "ns3/tcp-congestion-ops.h"
23 #include "ns3/tcp-socket-base.h"
24 #include "ns3/tcp-highspeed.h"
37 const std::string &name);
40 virtual void DoRun (
void);
49 const std::string &name)
52 m_segmentSize (segmentSize)
59 m_state = CreateObject<TcpSocketState> ();
72 cong->IncreaseWindow (
m_state, (segCwnd / coeffA) + 1);
75 "CWnd has not increased");
85 const std::string &name);
88 virtual void DoRun (
void);
97 const std::string &name)
100 m_segmentSize (segmentSize)
107 m_state = CreateObject<TcpSocketState> ();
119 uint32_t ssThHS = std::max (2.0, segCwnd * coeffB);
122 "HighSpeed decrement fn not used");
207 #define HIGHSPEED_VALUES_N 71
214 std::stringstream ss;
220 "Highspeed increment test on cWnd " + ss.str ()),
223 "Highspeed increment test on cWnd " + ss.str ()),
226 "Highspeed increment test on cWnd " + ss.str ()),
229 "Highspeed Decrement test on cWnd " + ss.str ()),
232 "Highspeed Decrement test on cWnd " + ss.str ()),
235 "Highspeed Decrement test on cWnd " + ss.str ()),
Smart pointer class similar to boost::intrusive_ptr.
Testing the congestion avoidance increment on TcpHighSpeed.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Ptr< TcpSocketState > m_state
This test suite implements a Unit Test.
static double TableLookupB(uint32_t w)
Lookup table for the coefficent b (from RFC 3649)
TcpHighSpeedIncrementTest(uint32_t cWnd, uint32_t segmentSize, const std::string &name)
static uint32_t TableLookupA(uint32_t w)
Lookup table for the coefficent a (from RFC 3649)
virtual void DoRun(void)
Implementation to actually run this TestCase.
void AddTestCase(TestCase *testCase, enum TestDuration duration)
Add an individual child TestCase to this test suite.
#define NS_TEST_ASSERT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report and abort if not.
#define HIGHSPEED_VALUES_N
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Testing the congestion avoidance increment on TcpHighSpeed.
Ptr< TcpSocketState > m_state
static const struct ns3::HighSpeedImportantValues highSpeedImportantValues[]
TcpHighSpeedDecrementTest(uint32_t ssThresh, uint32_t segmentSize, const std::string &name)
virtual void DoRun(void)
Implementation to actually run this TestCase.
ns3::TcpHighSpeedTestSuite g_tcpHighSpeedTest