11#include "ns3/string.h"
12#include "ns3/tcp-congestion-ops.h"
13#include "ns3/tcp-ledbat.h"
14#include "ns3/tcp-socket-base.h"
48 const std::string& name);
51 void DoRun()
override;
74 const std::string& name)
78 m_segmentsAcked(segmentsAcked),
81 m_highTxMark(highTxMark),
82 m_lastAckedSeq(lastAckedSeq)
119 "cWnd has not updated correctly");
149 const std::string& name);
152 void DoRun()
override;
175 const std::string& name)
179 m_segmentsAcked(segmentsAcked),
180 m_ssThresh(ssThresh),
182 m_highTxMark(highTxMark),
183 m_lastAckedSeq(lastAckedSeq)
209 m_state->m_rcvTimestampValue = 2;
210 m_state->m_rcvTimestampEchoReply = 1;
213 m_state->m_rcvTimestampValue = 7;
214 m_state->m_rcvTimestampEchoReply = 4;
251 const std::string& name);
254 void DoRun()
override;
277 const std::string& name)
281 m_segmentsAcked(segmentsAcked),
282 m_ssThresh(ssThresh),
284 m_highTxMark(highTxMark),
285 m_lastAckedSeq(lastAckedSeq)
311 cong->GetAttribute(
"MinCwnd", minCwnd);
313 m_state->m_rcvTimestampValue = 2;
314 m_state->m_rcvTimestampEchoReply = 1;
317 m_state->m_rcvTimestampValue = 205;
318 m_state->m_rcvTimestampEchoReply = 6;
347 "LEDBAT falls to New Reno for slowstart"),
348 TestCase::Duration::QUICK);
356 "LEDBAT falls to New Reno if timestamps are not found"),
357 TestCase::Duration::QUICK);
365 "LEDBAT increment test"),
366 TestCase::Duration::QUICK);
374 "LEDBAT decrement test"),
375 TestCase::Duration::QUICK);
Test to validate cWnd decrement in LEDBAT.
TcpLedbatDecrementTest(uint32_t cWnd, uint32_t segmentSize, uint32_t ssThresh, uint32_t segmentsAcked, SequenceNumber32 highTxMark, SequenceNumber32 lastAckedSeq, Time rtt, const std::string &name)
Constructor.
SequenceNumber32 m_highTxMark
high tx mark
uint32_t m_segmentSize
segment size
uint32_t m_ssThresh
ss thresh
void ExecuteTest()
Execute the test.
uint32_t m_segmentsAcked
segments acked
SequenceNumber32 m_lastAckedSeq
last acked seq
void DoRun() override
Implementation to actually run this TestCase.
Ptr< TcpSocketState > m_state
state
Test to validate cWnd increment in LEDBAT.
SequenceNumber32 m_highTxMark
high tx mark
void DoRun() override
Implementation to actually run this TestCase.
uint32_t m_segmentsAcked
segments acked
void ExecuteTest()
Execute the test.
uint32_t m_segmentSize
segment size
TcpLedbatIncrementTest(uint32_t cWnd, uint32_t segmentSize, uint32_t ssThresh, uint32_t segmentsAcked, SequenceNumber32 highTxMark, SequenceNumber32 lastAckedSeq, Time rtt, const std::string &name)
Constructor.
uint32_t m_ssThresh
ss thresh
SequenceNumber32 m_lastAckedSeq
last acked seq
Ptr< TcpSocketState > m_state
state
LEDBAT should be same as NewReno during slow start, and when timestamps are disabled.
uint32_t m_segmentsAcked
segments acked
TcpLedbatToNewReno(uint32_t cWnd, uint32_t segmentSize, uint32_t ssThresh, uint32_t segmentsAcked, SequenceNumber32 highTxMark, SequenceNumber32 lastAckedSeq, Time rtt, const std::string &name)
Constructor.
SequenceNumber32 m_highTxMark
high tx mark
Ptr< TcpSocketState > m_state
state
SequenceNumber32 m_lastAckedSeq
last acked seq
void DoRun() override
Implementation to actually run this TestCase.
void ExecuteTest()
Execute the test.
uint32_t m_segmentSize
segment size
uint32_t m_ssThresh
ss thresh
Smart pointer class similar to boost::intrusive_ptr.
static EventId Schedule(const Time &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
static void Destroy()
Execute the events scheduled with ScheduleDestroy().
static void Run()
Run the simulation.
Hold variables of type string.
void AddTestCase(TestCase *testCase, Duration duration=Duration::QUICK)
Add an individual child TestCase to this test suite.
static constexpr auto UNIT
Simulation virtual time values and global simulation resolution.
Hold an unsigned integer type.
#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.
SequenceNumber< uint32_t, int32_t > SequenceNumber32
32 bit Sequence number.
#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.
Time Seconds(double value)
Construct a Time in the indicated unit.
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
static TcpLedbatTestSuite g_tcpledbatTest
static var for test initialization