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)
61 m_segmentSize (segmentSize)
68 m_state = CreateObject<TcpSocketState> ();
76 uint32_t coeffA = TcpHighSpeed::TableLookupA (segCwnd);
84 "CWnd has not increased");
103 const std::string &name);
106 virtual void DoRun (
void);
114 uint32_t segmentSize,
115 const std::string &name)
118 m_segmentSize (segmentSize)
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 ()),
virtual void DoRun(void)
Implementation to actually run this TestCase.
unsigned int cwnd
Congestion window.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
virtual uint32_t GetSsThresh(Ptr< const TcpSocketState > tcb, uint32_t bytesInFlight)
Get slow start threshold following HighSpeed principles.
uint32_t m_segmentSize
Segment size.
virtual void IncreaseWindow(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked)
Try to increase the cWnd following the NewReno specification.
TcpHighSpeedIncrementTest(uint32_t cWnd, uint32_t segmentSize, const std::string &name)
Constructor.
uint32_t m_segmentSize
Segment size.
uint32_t m_segmentSize
Segment size.
Ptr< TcpSocketState > m_state
TCP socket state.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
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.
uint32_t m_cWnd
Congestion window.
#define HIGHSPEED_VALUES_N
static TcpHighSpeedTestSuite g_tcpHighSpeedTest
Static variable for test initialization.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Ptr< TcpSocketState > m_state
TCP socket state.
Testing the congestion avoidance decrement on TcpHighSpeed.
TracedValue< uint32_t > m_cWnd
Congestion window.
TcpHighSpeed Congestion window values to test.
static const struct HighSpeedImportantValues highSpeedImportantValues[]
List of data to be tested.
T Get(void) const
Get the underlying value.
uint32_t m_cWnd
Congestion window.
TcpHighSpeedDecrementTest(uint32_t cWnd, uint32_t segmentSize, const std::string &name)
Constructor.
Testing the congestion avoidance increment on TcpHighSpeed.
virtual void DoRun(void)
Implementation to actually run this TestCase.
This test suite implements a Unit Test.
unsigned int md
Currently unused.