|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
26 #include "ns3/tcp-congestion-ops.h"
27 #include "ns3/tcp-recovery-ops.h"
28 #include "ns3/tcp-socket-base.h"
29 #include "ns3/tcp-prr-recovery.h"
30 #include "ns3/string.h"
57 uint32_t unAckDataCount,
58 uint32_t bytesInFlight,
59 uint32_t m_deliveredBytes,
61 const std::string &reductionBound,
62 const std::string &name);
65 virtual void DoRun (
void);
82 uint32_t unAckDataCount,
83 uint32_t bytesInFlight,
84 uint32_t deliveredBytes,
86 const std::string &reductionBound,
87 const std::string &name)
91 m_ssThresh (ssThresh),
92 m_unAckDataCount (unAckDataCount),
93 m_bytesInFlight (bytesInFlight),
94 m_deliveredBytes (deliveredBytes),
95 m_bytesSent (bytesSent),
96 m_reductionBound (reductionBound)
103 m_state = CreateObject<TcpSocketState> ();
117 "There should be at least one transmission on entering recovery");
119 for (uint32_t iterator = 0; iterator <
m_bytesSent; )
133 "Updated cwnd should be less than or equal to the existing cwnd");
138 "Updated cwnd should be greater than or equal to the existing cwnd");
154 "Prr test on cWnd when bytesInFlight is greater than ssThresh with SSRB"),
157 "Prr test on cWnd when bytesInFlight is lower than ssThresh with SSRB"),
160 "Prr test on cWnd when bytesInFlight is greater than ssThresh with CRB"),
163 "Prr test on cWnd when bytesInFlight is lower than ssThresh with CRB"),
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
uint32_t m_ssThresh
Slow Start Threshold.
#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.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
T Get(void) const
Get the underlying value.
#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.
uint32_t m_segmentSize
Segment size.
uint32_t m_bytesSent
Bytes sent while in recovery phase.
static PrrRecoveryTestSuite g_TcpPrrRecoveryTest
Static variable for test initialization.
uint32_t m_unAckDataCount
Unacknowledged data at the start of recovery.
virtual void EnterRecovery(Ptr< TcpSocketState > tcb, uint32_t dupAckCount, uint32_t unAckDataCount, uint32_t deliveredBytes) override
Performs variable initialization at the start of recovery.
void SetAttribute(std::string name, const AttributeValue &value)
Set a single attribute, raising fatal errors if unsuccessful.
uint32_t m_deliveredBytes
Bytes SACKed on last acknowledgment.
const std::string m_reductionBound
Type of reduction bound to be used.
uint32_t m_bytesInFlight
Current bytes in flight.
virtual void UpdateBytesSent(uint32_t bytesSent) override
Keeps track of bytes sent during recovery phase.
Ptr< TcpSocketState > m_state
TCP socket state.
TracedValue< uint32_t > m_cWndInfl
Inflated congestion window trace (used only for backward compatibility purpose)
uint32_t m_segmentSize
Segment size.
Hold variables of type string.
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.
virtual void DoRun(void)
Implementation to actually run this TestCase.
uint32_t m_cWnd
Congestion window.
@ UNIT
This test suite implements a Unit Test.
TracedValue< uint32_t > m_bytesInFlight
Bytes in flight.
TracedValue< uint32_t > m_cWnd
Congestion window.
virtual void DoRecovery(Ptr< TcpSocketState > tcb, uint32_t deliveredBytes) override
Performs recovery based on the recovery algorithm.
TracedValue< uint32_t > m_ssThresh
Slow start threshold.
PRR Recovery algorithm test.