24#include "ns3/string.h"
25#include "ns3/tcp-congestion-ops.h"
26#include "ns3/tcp-prr-recovery.h"
27#include "ns3/tcp-recovery-ops.h"
28#include "ns3/tcp-socket-base.h"
60 const std::string& reductionBound,
61 const std::string& name);
64 void DoRun()
override;
85 const std::string& reductionBound,
86 const std::string& name)
91 m_unAckDataCount(unAckDataCount),
92 m_bytesInFlight(bytesInFlight),
93 m_deliveredBytes(deliveredBytes),
94 m_bytesSent(bytesSent),
95 m_reductionBound(reductionBound)
102 m_state = CreateObject<TcpSocketState>();
117 "There should be at least one transmission on entering recovery");
135 "Updated cwnd should be less than or equal to the existing cwnd");
142 "Updated cwnd should be greater than or equal to the existing cwnd");
166 "Prr test on cWnd when bytesInFlight is greater than ssThresh with SSRB"),
177 "Prr test on cWnd when bytesInFlight is lower than ssThresh with SSRB"),
188 "Prr test on cWnd when bytesInFlight is greater than ssThresh with CRB"),
199 "Prr test on cWnd when bytesInFlight is lower than ssThresh with CRB"),
PRR Recovery algorithm test.
void DoRun() override
Implementation to actually run this TestCase.
uint32_t m_bytesInFlight
Current bytes in flight.
uint32_t m_bytesSent
Bytes sent while in recovery phase.
PrrRecoveryTest(uint32_t cWnd, uint32_t segmentSize, uint32_t ssThresh, uint32_t unAckDataCount, uint32_t bytesInFlight, uint32_t m_deliveredBytes, uint32_t bytesSent, const std::string &reductionBound, const std::string &name)
Constructor.
uint32_t m_segmentSize
Segment size.
Ptr< TcpSocketState > m_state
TCP socket state.
uint32_t m_ssThresh
Slow Start Threshold.
uint32_t m_deliveredBytes
Bytes SACKed on last acknowledgment.
uint32_t m_cWnd
Congestion window.
const std::string m_reductionBound
Type of reduction bound to be used.
uint32_t m_unAckDataCount
Unacknowledged data at the start of recovery.
Smart pointer class similar to boost::intrusive_ptr.
Hold variables of type string.
uint32_t m_segmentSize
Segment size.
TracedValue< uint32_t > m_cWnd
Congestion window.
TracedValue< uint32_t > m_bytesInFlight
Bytes in flight.
TracedValue< uint32_t > m_cWndInfl
Inflated congestion window trace (used only for backward compatibility purpose)
TracedValue< uint32_t > m_ssThresh
Slow start threshold.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
@ UNIT
This test suite implements a Unit Test.
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_LT_OR_EQ(actual, limit, msg)
Test that an actual value is less than or equal to a limit and report and abort if not.
#define NS_TEST_ASSERT_MSG_GT_OR_EQ(actual, limit, msg)
Test that an actual value is greater than or equal to a limit and report and abort if not.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
static PrrRecoveryTestSuite g_TcpPrrRecoveryTest
Static variable for test initialization.