26 #include "ns3/tcp-congestion-ops.h"    27 #include "ns3/tcp-recovery-ops.h"    28 #include "ns3/tcp-socket-base.h"    29 #include "ns3/string.h"    53                        const std::string &name);
    56   virtual void DoRun (
void);
    70                                           const std::string &name)
    74     m_ssThresh (ssThresh),
    75     m_dupAckCount (dupAckCount)
    82   m_state = CreateObject<TcpSocketState> ();
    91                          "The name of recovery used should be TcpClassicRecovery");
    95                          "cWnd should be set to ssThresh on entering recovery");
    97                          "cWndInfl should be set to (ssThresh + dupAckCount * segmentSize) on entering recovery");
   103                          "m_cWndInfl should be incresed by one segmentSize on calling DoRecovery");
   105                          "cWnd should not change in recovery");
   109                          "cWndInfl should be set to ssThresh on exiting recovery");
   111                          "cWnd should be set to ssThresh on exiting recovery");
 
static ClassicRecoveryTestSuite g_TcpClassicRecoveryTest
Static variable for test initialization. 
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name. 
uint32_t m_ssThresh
Slow Start Threshold. 
uint32_t m_segmentSize
Segment size. 
Classic Recovery algorithm test. 
Classic Recovery TestSuite. 
TracedValue< uint32_t > m_cWndInfl
Inflated congestion window trace (used only for backward compatibility purpose) 
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite. 
virtual void ExitRecovery(Ptr< TcpSocketState > tcb) override
Performs cwnd adjustments at the end of recovery. 
#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. 
uint32_t m_segmentSize
Segment size. 
TracedValue< uint32_t > m_ssThresh
Slow start threshold. 
virtual void DoRecovery(Ptr< TcpSocketState > tcb, uint32_t deliveredBytes) override
Performs recovery based on the recovery algorithm. 
uint32_t m_dupAckCount
Duplicate acknowledgement Threshold. 
virtual void DoRun(void)
Implementation to actually run this TestCase. 
Every class exported by the ns3 library is enclosed in the ns3 namespace. 
ClassicRecoveryTest(uint32_t cWnd, uint32_t segmentSize, uint32_t ssThresh, uint32_t dupAckCount, const std::string &name)
Constructor. 
ClassicRecoveryTestSuite()
virtual void EnterRecovery(Ptr< TcpSocketState > tcb, uint32_t dupAckCount, uint32_t unAckDataCount, uint32_t deliveredBytes) override
Performs variable initialization at the start of recovery. 
TracedValue< uint32_t > m_cWnd
Congestion window. 
uint32_t m_cWnd
Congestion window. 
Ptr< TcpSocketState > m_state
TCP socket state. 
This test suite implements a Unit Test. 
virtual std::string GetName() const override
Get the name of the recovery algorithm.