12#include "ns3/tcp-header.h"
107 .AddConstructor<DummyCongControl>()
108 .SetGroupName(
"Internet");
115 m_segmentsReceived(0)
133 s->SetCongestionControlAlgorithm(
m_congCtl);
158 "Not all acked segments have been passed to PktsAcked method");
173 TestCase::Duration::QUICK);
Behaves as NewReno, except that each time PktsAcked is called, a notification is sent to TcpPktsAcked...
Callback< void, uint32_t > m_test
Callback to be used when an ACK is received.
void SetCallback(Callback< void, uint32_t > test)
Set the callback to be used when an ACK is received.
static TypeId GetTypeId()
Get the type ID.
void PktsAcked(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked, const Time &rtt) override
Timing information on received ACK.
Check the number of times that PktsAcked is called.
void PktsAckedCalled(uint32_t segmentsAcked)
Called when an ACK is received.
uint32_t m_segmentsAcked
Contains the number of times PktsAcked is called.
Ptr< DummyCongControl > m_congCtl
Dummy congestion control.
void Rx(const Ptr< const Packet > p, const TcpHeader &h, SocketWho who) override
Packet received from IP layer.
void FinalChecks() override
Performs the (eventual) final checks through test asserts.
void ConfigureEnvironment() override
Change the configuration of the environment.
Ptr< TcpSocketMsgBase > CreateSenderSocket(Ptr< Node > node) override
Create and install the socket to install on the sender.
uint32_t m_segmentsReceived
Contains the ack number received.
TcpPktsAckedOpenTest(const std::string &desc)
Constructor.
PktsAcked is calls TestSuite.
Smart pointer class similar to boost::intrusive_ptr.
NUMERIC_TYPE GetValue() const
Extracts the numeric value of the sequence number.
General infrastructure for TCP testing.
virtual Ptr< TcpSocketMsgBase > CreateSenderSocket(Ptr< Node > node)
Create and install the socket to install on the sender.
void SetAppPktCount(uint32_t pktCount)
Set app packet count.
SocketWho
Used as parameter of methods, specifies on what node the caller is interested (e.g.
void SetMTU(uint32_t mtu)
MTU of the bottleneck link.
uint32_t GetSegSize(SocketWho who)
Get the segment size of the node specified.
virtual void ConfigureEnvironment()
Change the configuration of the environment.
The NewReno implementation.
void AddTestCase(TestCase *testCase, Duration duration=Duration::QUICK)
Add an individual child TestCase to this test suite.
static constexpr auto UNIT
Simulation virtual time values and global simulation resolution.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Ptr< T > CreateObject(Args &&... args)
Create an object by type, with varying number of constructor parameters.
#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.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Callback< R, Args... > MakeCallback(R(T::*memPtr)(Args...), OBJ objPtr)
Build Callbacks for class method members which take varying numbers of arguments and potentially retu...
-ns3 Test suite for the ns3 wrapper script
static TcpPktsAckedTestSuite g_TcpPktsAckedTestSuite
Static variable for test initialization.