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);
79 m_segmentSize (segmentSize),
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);
168 m_segmentSize (segmentSize),
169 m_segmentsAcked (segmentsAcked),
170 m_ssThresh (ssThresh),
172 m_highTxMark (highTxMark),
173 m_lastAckedSeq (lastAckedSeq)
182 Simulator::Destroy ();
188 m_state = CreateObject <TcpSocketState> ();
212 "cWnd has not updated correctly");
241 virtual void DoRun (
void);
261 m_segmentSize (segmentSize),
262 m_segmentsAcked (segmentsAcked),
263 m_ssThresh (ssThresh),
265 m_highTxMark (highTxMark),
266 m_lastAckedSeq (lastAckedSeq)
275 Simulator::Destroy ();
282 m_state = CreateObject <TcpSocketState> ();
308 "cWnd has not updated correctly");
uint32_t m_rcvTimestampValue
Receiver Timestamp value.
Simulation virtual time values and global simulation resolution.
SequenceNumber32 m_lastAckedSeq
last acked seq
uint32_t m_segmentSize
segment size
static TcpLedbatTestSuite g_tcpledbatTest
static var for test initialization
Hold variables of type string.
Ptr< TcpSocketState > m_state
state
virtual void PktsAcked(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked, const Time &rtt)
Get information from the acked packet.
uint32_t m_rcvTimestampEchoReply
Sender Timestamp echoed by the receiver.
virtual void DoRun(void)
Implementation to actually run this TestCase.
uint32_t m_segmentsAcked
segments acked
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
virtual void IncreaseWindow(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked)
Adjust cwnd following LEDBAT algorithm.
virtual void DoRun(void)
Implementation to actually run this TestCase.
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Test to validate cWnd increment in LEDBAT.
SequenceNumber32 m_lastAckedSeq
last acked seq
uint32_t m_segmentSize
Segment size.
SequenceNumber32 m_highTxMark
high tx mark
virtual void IncreaseWindow(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked)
Try to increase the cWnd following the NewReno specification.
virtual void DoRun(void)
Implementation to actually run this TestCase.
uint32_t m_ssThresh
ss thresh
uint32_t m_segmentsAcked
segments acked
Ptr< TcpSocketState > m_state
state
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
Hold an unsigned integer type.
#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.
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.
LEDBAT should be same as NewReno during slow start, and when timestamps are disabled.
SequenceNumber32 m_lastAckedSeq
Last sequence ACKed.
TracedValue< uint32_t > m_ssThresh
Slow start threshold.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void ExecuteTest(void)
Execute the test.
Generic "sequence number" class.
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.
TracedValue< uint32_t > m_cWnd
Congestion window.
uint32_t m_segmentsAcked
segments acked
SequenceNumber32 m_highTxMark
high tx mark
void ExecuteTest(void)
Execute the test.
Ptr< TcpSocketState > m_state
state
T Get(void) const
Get the underlying value.
Time Seconds(double value)
Construct a Time in the indicated unit.
TracedValue< SequenceNumber32 > m_highTxMark
Highest seqno ever sent, regardless of ReTx.
SequenceNumber32 m_highTxMark
high tx mark
TcpLedbatToNewReno(uint32_t cWnd, uint32_t segmentSize, uint32_t ssThresh, uint32_t segmentsAcked, SequenceNumber32 highTxMark, SequenceNumber32 lastAckedSeq, Time rtt, const std::string &name)
Constructor.
This test suite implements a Unit Test.
void SetAttribute(std::string name, const AttributeValue &value)
Set a single attribute, raising fatal errors if unsuccessful.
void GetAttribute(std::string name, AttributeValue &value) const
Get the value of an attribute, raising fatal errors if unsuccessful.
uint32_t m_ssThresh
ss thresh
SequenceNumber32 m_lastAckedSeq
last acked seq
uint32_t m_segmentSize
segment size
uint32_t m_segmentSize
segment size
uint32_t m_ssThresh
ss thresh