30 #include "ns3/tcp-congestion-ops.h"
31 #include "ns3/tcp-socket-base.h"
32 #include "ns3/tcp-scalable.h"
55 uint32_t segmentsAcked,
56 const std::string &name);
59 virtual void DoRun (
void);
69 uint32_t segmentsAcked,
70 const std::string &name)
74 m_segmentsAcked (segmentsAcked)
81 m_state = CreateObject<TcpSocketState> ();
92 cong->GetAttribute (
"AIFactor", aiFactor);
97 uint32_t w =
std::min (segCwnd, (uint32_t) aiFactor.
Get ());
103 "CWnd has not increased");
122 const std::string &name);
125 virtual void DoRun (
void);
134 const std::string &name)
144 m_state = CreateObject<TcpSocketState> ();
155 cong->GetAttribute (
"MDFactor", mdFactor);
157 double b = 1.0 - mdFactor.
Get ();
159 uint32_t ssThresh =
std::max (2.0, segCwnd * b);
164 "Scalable decrement fn not used");
180 "Scalable increment test on cWnd = 38 segments and segmentSize = 536 bytes"),
183 "Scalable increment test on cWnd = 38 segments and segmentSize = 1 byte"),
186 "Scalable increment test on cWnd = 53 segments and segmentSize = 1446 bytes"),
190 "Scalable decrement test on cWnd = 38 segments and segmentSize = 1 byte"),
193 "Scalable decrement test on cWnd = 100 segments and segmentSize = 536 bytes"),
196 "Scalable decrement test on cWnd = 40 segments and segmentSize = 1446 bytes"),
Testing the multiplicative decrease on TcpScalable.
uint32_t m_segmentSize
Segment size.
virtual void DoRun(void)
Implementation to actually run this TestCase.
Ptr< TcpSocketState > m_state
TCP socket state.
TcpScalableDecrementTest(uint32_t cWnd, uint32_t segmentSize, const std::string &name)
Constructor.
uint32_t m_cWnd
Congestion window.
Testing the congestion avoidance increment on TcpScalable.
TcpScalableIncrementTest(uint32_t cWnd, uint32_t segmentSize, uint32_t segmentsAcked, const std::string &name)
Constructor.
uint32_t m_segmentSize
Segment size.
Ptr< TcpSocketState > m_state
TCP socket state.
uint32_t m_segmentsAcked
Segments ACKed.
virtual void DoRun(void)
Implementation to actually run this TestCase.
uint32_t m_cWnd
Congestion window.
This class can be used to hold variables of floating point type such as 'double' or 'float'.
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.
Hold an unsigned integer type.
#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.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
static TcpScalableTestSuite g_tcpScalableTest
Static variable for test initialization.