13#include "ns3/tcp-cubic.h"
14#include "ns3/tcp-linux-reno.h"
15#include "ns3/tcp-socket-state.h"
83 "ECN should be enabled along with ABE");
130 TypeId& congestionControlType,
131 const std::string& desc)
151 m_socket->SetCongestionControlAlgorithm(algo);
165 " congestion control with ABE should apply BetaEcn correctly");
179 " congestion control without ABE should apply Beta correctly");
214 "Test TCP CUBIC without ABE"),
222 "Test TCP CUBIC with ABE"),
232 "Test TCP Linux Reno without ABE"),
240 "Test TCP Linux Reno with ABE"),
250 "Test TCP New Reno without ABE"),
258 "Test TCP New Reno with ABE"),
Instantiate subclasses of ns3::Object.
Ptr< Object > Create() const
Create an Object instance of the configured TypeId.
void SetTypeId(TypeId tid)
Set the TypeId of the Objects to be created by this factory.
Smart pointer class similar to boost::intrusive_ptr.
Test case for congestion control algorithms with ABE.
uint32_t testCase
Test case number.
uint32_t m_expectedCwnd
Expected congestion window after applying Beta(BetaLoss)/BetaEcn.
uint32_t m_bytesInFlight
Bytes in flight.
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.
TypeId m_congestionControlType
TypeId of the congestion control algorithm type used for the test.
uint32_t m_segmentSize
Segment size.
uint32_t m_initialCwnd
Initial congestion window.
Ptr< TestTcpSocketBase > m_socket
Socket used for testing.
Test suite for Alternative Backoff with ECN (ABE)
TcpAbeTestSuite()
Constructor.
Checks if users are able to enable ABE or not.
void DoRun() override
Runs the test.
Ptr< TestTcpSocketBase > m_socket
Socket used for testing.
TcpAbeToggleTest(const std::string &desc)
Constructor.
Congestion control abstract class.
static TypeId GetTypeId()
Get the type ID.
static TypeId GetTypeId()
Get the type ID.
static TypeId GetTypeId()
Get the type ID.
Ptr< TcpSocketState > m_tcb
Congestion control information.
TcpSocketBase()
Create an unbound TCP socket.
@ ECN_ECE_RCVD
Last ACK received had ECE bit set in TCP header.
void AddTestCase(TestCase *testCase, Duration duration=Duration::QUICK)
Add an individual child TestCase to this test suite.
TestCase(const TestCase &)=delete
@ UNIT
This test suite implements a Unit Test.
TestSuite(std::string name, Type type=Type::UNIT)
Construct a new test suite.
Test Socket Base class for ABE testing.
Ptr< TcpSocketState > GetTcb() const
Get the pointer for socket state.
void SetECE()
Set the ECE state for testing ECN behavior.
a unique identifier for an interface.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Ptr< T > CreateObject(Args &&... args)
Create an object by type, with varying number of constructor parameters.
#define NS_TEST_EXPECT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report if not.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
constexpr uint32_t WITH_ABE
Test case with ABE.
constexpr uint32_t WITHOUT_ABE
Test case without ABE.
static TcpAbeTestSuite g_tcpAbeTestSuite
static var for test initialization
Ptr< T1 > DynamicCast(const Ptr< T2 > &p)
Cast a Ptr.