24#include "ns3/tcp-congestion-ops.h"
25#include "ns3/tcp-lp.h"
26#include "ns3/tcp-socket-base.h"
56 const std::string& name);
59 void DoRun()
override;
73 const std::string& name)
78 m_segmentsAcked(segmentsAcked),
86 m_state = CreateObject<TcpSocketState>();
109 "cWnd has not updated correctly");
134 const std::string& name);
137 void DoRun()
override;
150 const std::string& name)
154 m_segmentsAcked(segmentsAcked),
162 m_state = CreateObject<TcpSocketState>();
203 const std::string& name);
206 void DoRun()
override;
219 const std::string& name)
223 m_segmentsAcked(segmentsAcked),
231 m_state = CreateObject<TcpSocketState>();
272 "LP falls to New Reno if the cwd is within threshold"),
280 "LP enters Inference phase when cwd exceeds threshold for the first time"),
288 "LP reduces cWnd to 1 if cwd exceeds threshold in inference phase"),
Smart pointer class similar to boost::intrusive_ptr.
static void Destroy()
Execute the events scheduled with ScheduleDestroy().
static void Run()
Run the simulation.
Testing TcpLp when cwd exceeds threshold.
void DoRun() override
Implementation to actually run this TestCase.
uint32_t m_cWnd
Congestion window size.
TcpLpInferenceTest1(uint32_t cWnd, uint32_t segmentSize, uint32_t segmentsAcked, Time rtt, const std::string &name)
Constructor.
uint32_t m_segmentsAcked
Segments acked.
Ptr< TcpSocketState > m_state
TCP socket state.
uint32_t m_segmentSize
Segment size.
Testing TcpLp when it is inference phase.
uint32_t m_segmentsAcked
Segments acked.
uint32_t m_cWnd
Congestion window size.
TcpLpInferenceTest2(uint32_t cWnd, uint32_t segmentSize, uint32_t segmentsAcked, Time rtt, const std::string &name)
Constructor.
uint32_t m_segmentSize
Segment size.
void DoRun() override
Implementation to actually run this TestCase.
Ptr< TcpSocketState > m_state
TCP socket state.
Test the behaviour common to New Reno.
Testing the behaviour common to New Reno.
uint32_t m_ssThresh
Slow start threshold.
uint32_t m_segmentsAcked
Segments acked.
void DoRun() override
Implementation to actually run this TestCase.
Ptr< TcpSocketState > m_state
TCP socket state.
TcpLpToNewReno(uint32_t cWnd, uint32_t segmentSize, uint32_t segmentsAcked, uint32_t ssThresh, Time rtt, const std::string &name)
Constructor.
uint32_t m_cWnd
Congestion window size.
uint32_t m_segmentSize
Segment size.
uint32_t m_segmentSize
Segment size.
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.
#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 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 TcpLpTestSuite g_tcplpTest
static var for test initialization