A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::TcpAbeTest Class Reference

Test case for congestion control algorithms with ABE. More...

+ Inheritance diagram for ns3::TcpAbeTest:
+ Collaboration diagram for ns3::TcpAbeTest:

Public Member Functions

 TcpAbeTest (uint32_t testCase, uint32_t segmentSize, uint32_t initialCwnd, uint32_t expectedCwnd, uint32_t bytesInFlight, TypeId &congestionControlType, const std::string &desc)
 Constructor.
 
void DoRun () override
 Runs the test.
 
- Public Member Functions inherited from ns3::TestCase
 TestCase (const TestCase &)=delete
 
virtual ~TestCase ()
 Destructor.
 
std::string GetName () const
 
TestCaseoperator= (const TestCase &)=delete
 

Private Attributes

uint32_t m_bytesInFlight
 Bytes in flight.
 
TypeId m_congestionControlType
 TypeId of the congestion control algorithm type used for the test.
 
uint32_t m_expectedCwnd
 Expected congestion window after applying Beta(BetaLoss)/BetaEcn.
 
uint32_t m_initialCwnd
 Initial congestion window.
 
uint32_t m_segmentSize
 Segment size.
 
Ptr< TestTcpSocketBasem_socket
 Socket used for testing.
 
uint32_t testCase
 Test case number.
 

Additional Inherited Members

- Public Types inherited from ns3::TestCase
enum class  Duration { QUICK = 1 , EXTENSIVE = 2 , TAKES_FOREVER = 3 }
 How long the test takes to execute. More...
 
- Protected Member Functions inherited from ns3::TestCase
 TestCase (std::string name)
 Constructor.
 
void AddTestCase (TestCase *testCase, Duration duration=Duration::QUICK)
 Add an individual child TestCase to this test suite.
 
TestCaseGetParent () const
 Get the parent of this TestCase.
 
bool IsStatusFailure () const
 Check if any tests failed.
 
bool IsStatusSuccess () const
 Check if all tests passed.
 
void SetDataDir (std::string directory)
 Set the data directory where reference trace files can be found.
 
void ReportTestFailure (std::string cond, std::string actual, std::string limit, std::string message, std::string file, int32_t line)
 Log the failure of this TestCase.
 
bool MustAssertOnFailure () const
 Check if this run should assert on failure.
 
bool MustContinueOnFailure () const
 Check if this run should continue on failure.
 
std::string CreateDataDirFilename (std::string filename)
 Construct the full path to a file in the data directory.
 
std::string CreateTempDirFilename (std::string filename)
 Construct the full path to a file in a temporary directory.
 

Detailed Description

Test case for congestion control algorithms with ABE.

This test verifies that when a TCP socket has ABE enabled, the congestion window value returned by its GetSsThresh() method will be calculated using the default BetaEcn value, and when ABE is disabled, the standard multiplicative decrease by half is used. ABE should only work for TcpCubic, TcpNewReno, TcpLinuxReno as specified in RFC-8511

Definition at line 101 of file tcp-abe-test.cc.

Constructor & Destructor Documentation

◆ TcpAbeTest()

ns3::TcpAbeTest::TcpAbeTest ( uint32_t testCase,
uint32_t segmentSize,
uint32_t initialCwnd,
uint32_t expectedCwnd,
uint32_t bytesInFlight,
TypeId & congestionControlType,
const std::string & desc )
inline

Constructor.

Parameters
descTest case description
testCaseTest case identifier (0 for without ABE, 1 for with ABE)
segmentSizeSegment size
initialCwndInitial congestion window
expectedCwndExpected congestion window after applying Beta(BetaLoss)/BetaEcn
bytesInFlightBytes in flight
congestionControlTypeTypeId of the congestion control algorithm type used for the test

Definition at line 125 of file tcp-abe-test.cc.

References ns3::TestCase::TestCase(), m_bytesInFlight, m_congestionControlType, m_expectedCwnd, m_initialCwnd, m_segmentSize, segmentSize, and testCase.

+ Here is the call graph for this function:

Member Function Documentation

◆ DoRun()

void ns3::TcpAbeTest::DoRun ( )
inlineoverridevirtual

Runs the test.

Implements ns3::TestCase.

Definition at line 145 of file tcp-abe-test.cc.

References ns3::ObjectFactory::Create(), ns3::CreateObject(), ns3::DynamicCast(), m_bytesInFlight, m_congestionControlType, m_expectedCwnd, m_initialCwnd, m_segmentSize, m_socket, NS_TEST_EXPECT_MSG_EQ, ns3::ObjectFactory::SetTypeId(), testCase, ns3::WITH_ABE, and ns3::WITHOUT_ABE.

+ Here is the call graph for this function:

Member Data Documentation

◆ m_bytesInFlight

uint32_t ns3::TcpAbeTest::m_bytesInFlight
private

Bytes in flight.

Definition at line 108 of file tcp-abe-test.cc.

Referenced by TcpAbeTest(), and DoRun().

◆ m_congestionControlType

TypeId ns3::TcpAbeTest::m_congestionControlType
private

TypeId of the congestion control algorithm type used for the test.

Definition at line 109 of file tcp-abe-test.cc.

Referenced by TcpAbeTest(), and DoRun().

◆ m_expectedCwnd

uint32_t ns3::TcpAbeTest::m_expectedCwnd
private

Expected congestion window after applying Beta(BetaLoss)/BetaEcn.

Definition at line 107 of file tcp-abe-test.cc.

Referenced by TcpAbeTest(), and DoRun().

◆ m_initialCwnd

uint32_t ns3::TcpAbeTest::m_initialCwnd
private

Initial congestion window.

Definition at line 106 of file tcp-abe-test.cc.

Referenced by TcpAbeTest(), and DoRun().

◆ m_segmentSize

uint32_t ns3::TcpAbeTest::m_segmentSize
private

Segment size.

Definition at line 105 of file tcp-abe-test.cc.

Referenced by TcpAbeTest(), and DoRun().

◆ m_socket

Ptr<TestTcpSocketBase> ns3::TcpAbeTest::m_socket
private

Socket used for testing.

Definition at line 111 of file tcp-abe-test.cc.

Referenced by DoRun().

◆ testCase

uint32_t ns3::TcpAbeTest::testCase
private

Test case number.

Definition at line 104 of file tcp-abe-test.cc.

Referenced by TcpAbeTest(), and DoRun().


The documentation for this class was generated from the following file: