23 #include "ns3/tcp-header.h"
59 void PktsAckedCalled(uint32_t segmentsAcked);
65 void ConfigureEnvironment()
override;
67 void FinalChecks()
override;
106 m_test(segmentsAcked);
118 .AddConstructor<DummyCongControl>()
119 .SetGroupName(
"Internet");
126 m_segmentsReceived(0)
133 TcpGeneralTest::ConfigureEnvironment();
142 m_congCtl = CreateObject<DummyCongControl>();
144 s->SetCongestionControlAlgorithm(
m_congCtl);
169 "Not all acked segments have been passed to PktsAcked method");
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.
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.
The NewReno implementation.
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.
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.
#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...
static TcpPktsAckedTestSuite g_TcpPktsAckedTestSuite
Static variable for test initialization.