24 #include "ns3/tcp-congestion-ops.h"
25 #include "ns3/tcp-socket-base.h"
26 #include "ns3/tcp-ledbat.h"
27 #include "ns3/string.h"
59 virtual void DoRun (
void);
62 void ExecuteTest (
void);
80 m_segmentsAcked (segmentsAcked),
81 m_ssThresh (ssThresh),
83 m_highTxMark (highTxMark),
84 m_lastAckedSeq (lastAckedSeq)
93 Simulator::Destroy ();
99 m_state = CreateObject <TcpSocketState> ();
120 "cWnd has not updated correctly");
148 virtual void DoRun (
void);
169 m_segmentsAcked (segmentsAcked),
170 m_ssThresh (ssThresh),
172 m_highTxMark (highTxMark),
173 m_lastAckedSeq (lastAckedSeq)
182 Simulator::Destroy ();
188 m_state = CreateObject <TcpSocketState> ();
196 cong->SetAttribute (
"SSParam",
StringValue (
"no"));
212 "cWnd has not updated correctly");
241 virtual void DoRun (
void);
262 m_segmentsAcked (segmentsAcked),
263 m_ssThresh (ssThresh),
265 m_highTxMark (highTxMark),
266 m_lastAckedSeq (lastAckedSeq)
275 Simulator::Destroy ();
282 m_state = CreateObject <TcpSocketState> ();
290 cong->SetAttribute (
"SSParam",
StringValue (
"no"));
292 cong->GetAttribute (
"MinCwnd", minCwnd);
308 "cWnd has not updated correctly");
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
virtual void DoRun(void)
Implementation to actually run this TestCase.
uint32_t m_segmentSize
segment size
uint32_t m_ssThresh
ss thresh
void ExecuteTest(void)
Execute the test.
uint32_t m_segmentsAcked
segments acked
SequenceNumber32 m_lastAckedSeq
last acked seq
Ptr< TcpSocketState > m_state
state
Test to validate cWnd increment in LEDBAT.
SequenceNumber32 m_highTxMark
high tx mark
uint32_t m_segmentsAcked
segments acked
uint32_t m_segmentSize
segment size
virtual void DoRun(void)
Implementation to actually run this TestCase.
void ExecuteTest(void)
Execute the test.
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
void ExecuteTest(void)
Execute the test.
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
virtual void DoRun(void)
Implementation to actually run this TestCase.
SequenceNumber32 m_lastAckedSeq
last acked seq
uint32_t m_segmentSize
segment size
uint32_t m_ssThresh
ss thresh
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(void) const
Get the underlying value.
Hold an unsigned integer type.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#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