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