22#include "ns3/string.h"
23#include "ns3/tcp-congestion-ops.h"
24#include "ns3/tcp-ledbat.h"
25#include "ns3/tcp-socket-base.h"
59 const std::string& name);
62 void DoRun()
override;
84 const std::string& name)
88 m_segmentsAcked(segmentsAcked),
91 m_highTxMark(highTxMark),
92 m_lastAckedSeq(lastAckedSeq)
107 m_state = CreateObject<TcpSocketState>();
129 "cWnd has not updated correctly");
159 const std::string& name);
162 void DoRun()
override;
184 const std::string& name)
188 m_segmentsAcked(segmentsAcked),
189 m_ssThresh(ssThresh),
191 m_highTxMark(highTxMark),
192 m_lastAckedSeq(lastAckedSeq)
207 m_state = CreateObject<TcpSocketState>();
260 const std::string& name);
263 void DoRun()
override;
285 const std::string& name)
289 m_segmentsAcked(segmentsAcked),
290 m_ssThresh(ssThresh),
292 m_highTxMark(highTxMark),
293 m_lastAckedSeq(lastAckedSeq)
309 m_state = CreateObject<TcpSocketState>();
319 cong->GetAttribute(
"MinCwnd", minCwnd);
355 "LEDBAT falls to New Reno for slowstart"),
364 "LEDBAT falls to New Reno if timestamps are not found"),
373 "LEDBAT increment test"),
382 "LEDBAT decrement test"),
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.
uint32_t m_segmentSize
Segment size.
TracedValue< SequenceNumber32 > m_highTxMark
Highest seqno ever sent, regardless of ReTx.
SequenceNumber32 m_lastAckedSeq
Last sequence ACKed.
TracedValue< uint32_t > m_cWnd
Congestion window.
uint32_t m_rcvTimestampEchoReply
Sender Timestamp echoed by the receiver.
TracedValue< uint32_t > m_ssThresh
Slow start threshold.
uint32_t m_rcvTimestampValue
Receiver Timestamp value.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
@ UNIT
This test suite implements a Unit Test.
Simulation virtual time values and global simulation resolution.
T Get() const
Get the underlying value.
Hold an unsigned integer type.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
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