30 #include "ns3/tcp-congestion-ops.h"
31 #include "ns3/tcp-socket-base.h"
32 #include "ns3/tcp-scalable.h"
45 uint32_t segmentsAcked,
46 const std::string &name);
49 virtual void DoRun (
void);
59 uint32_t segmentsAcked,
60 const std::string &name)
63 m_segmentSize (segmentSize),
64 m_segmentsAcked (segmentsAcked)
71 m_state = CreateObject<TcpSocketState> ();
82 cong->GetAttribute (
"AIFactor", aiFactor);
87 uint32_t
w =
std::min (segCwnd, (uint32_t) aiFactor.
Get ());
93 "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> ();
136 cong->GetAttribute (
"MDFactor", mdFactor);
138 double b = 1.0 - mdFactor.
Get ();
140 uint32_t ssThresh =
std::max (2.0, segCwnd * b);
145 "Scalable decrement fn not used");
157 "Scalable increment test on cWnd = 38 segments and segmentSize = 536 bytes"),
160 "Scalable increment test on cWnd = 38 segments and segmentSize = 1 byte"),
163 "Scalable increment test on cWnd = 53 segments and segmentSize = 1446 bytes"),
167 "Scalable decrement test on cWnd = 38 segments and segmentSize = 1 byte"),
170 "Scalable decrement test on cWnd = 100 segments and segmentSize = 536 bytes"),
173 "Scalable decrement test on cWnd = 40 segments and segmentSize = 1446 bytes"),
TcpScalableIncrementTest(uint32_t cWnd, uint32_t segmentSize, uint32_t segmentsAcked, const std::string &name)
Smart pointer class similar to boost::intrusive_ptr.
Testing the congestion avoidance increment on TcpScalable.
#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.
Ptr< TcpSocketState > m_state
void AddTestCase(TestCase *testCase, enum TestDuration duration)
Add an individual child TestCase to this test suite.
Hold an unsigned integer type.
#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.
Testing the multiplicative decrease on TcpScalable.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
virtual void DoRun(void)
Implementation to actually run this TestCase.
TcpScalableDecrementTest(uint32_t ssThresh, uint32_t segmentSize, const std::string &name)
virtual void DoRun(void)
Implementation to actually run this TestCase.
ns3::TcpScalableTestSuite g_tcpScalableTest
This class can be used to hold variables of floating point type such as 'double' or 'float'...