22 #include "ns3/tcp-congestion-ops.h"
23 #include "ns3/tcp-socket-base.h"
24 #include "ns3/tcp-highspeed.h"
46 const std::string &name);
49 virtual void DoRun (
void);
58 const std::string &name)
68 m_state = CreateObject<TcpSocketState> ();
76 uint32_t coeffA = TcpHighSpeed::TableLookupA (segCwnd);
81 cong->IncreaseWindow (
m_state, (segCwnd / coeffA) + 1);
84 "CWnd has not increased");
103 const std::string &name);
106 virtual void DoRun (
void);
115 const std::string &name)
125 m_state = CreateObject<TcpSocketState> ();
133 double coeffB = 1.0 - TcpHighSpeed::TableLookupB (segCwnd);
137 uint32_t ssThHS =
std::max (2.0, segCwnd * coeffB);
140 "HighSpeed decrement fn not used");
229 #define HIGHSPEED_VALUES_N 71
242 std::stringstream ss;
248 "Highspeed increment test on cWnd " + ss.str ()),
251 "Highspeed increment test on cWnd " + ss.str ()),
254 "Highspeed increment test on cWnd " + ss.str ()),
257 "Highspeed Decrement test on cWnd " + ss.str ()),
260 "Highspeed Decrement test on cWnd " + ss.str ()),
263 "Highspeed Decrement test on cWnd " + ss.str ()),
Testing the congestion avoidance decrement on TcpHighSpeed.
uint32_t m_segmentSize
Segment size.
virtual void DoRun(void)
Implementation to actually run this TestCase.
uint32_t m_cWnd
Congestion window.
Ptr< TcpSocketState > m_state
TCP socket state.
TcpHighSpeedDecrementTest(uint32_t cWnd, uint32_t segmentSize, const std::string &name)
Constructor.
Testing the congestion avoidance increment on TcpHighSpeed.
Ptr< TcpSocketState > m_state
TCP socket state.
uint32_t m_segmentSize
Segment size.
uint32_t m_cWnd
Congestion window.
TcpHighSpeedIncrementTest(uint32_t cWnd, uint32_t segmentSize, const std::string &name)
Constructor.
virtual void DoRun(void)
Implementation to actually run this TestCase.
uint32_t m_segmentSize
Segment size.
TracedValue< uint32_t > m_cWnd
Congestion window.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
@ UNIT
This test suite implements a Unit Test.
T Get(void) const
Get the underlying value.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#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.
static const struct HighSpeedImportantValues highSpeedImportantValues[]
List of data to be tested.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
TcpHighSpeed Congestion window values to test.
unsigned int cwnd
Congestion window.
unsigned int md
Currently unused.
static TcpHighSpeedTestSuite g_tcpHighSpeedTest
Static variable for test initialization.
#define HIGHSPEED_VALUES_N