|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
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");
a unique identifier for an interface.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
SocketWho
Used as parameter of methods, specifies on what node the caller is interested (e.g.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
uint32_t m_segmentsAcked
Contains the number of times PktsAcked is called.
Callback< void, uint32_t > m_test
Callback to be used when an ACK is received.
Ptr< DummyCongControl > m_congCtl
Dummy congestion control.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void PktsAckedCalled(uint32_t segmentsAcked)
Called when an ACK is received.
void SetAppPktCount(uint32_t pktCount)
Set app packet count.
static TypeId GetTypeId(void)
Get the type ID.
void FinalChecks()
Performs the (eventual) final checks through test asserts.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
uint32_t GetSegSize(SocketWho who)
Get the segment size of the node specified.
uint32_t m_segmentsReceived
Contains the ack number received.
void SetMTU(uint32_t mtu)
MTU of the bottleneck link.
Behaves as NewReno, except that each time PktsAcked is called, a notification is sent to TcpPktsAcked...
Smart pointer class similar to boost::intrusive_ptr.
Check the number of times that PktsAcked is called.
void PktsAcked(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked, const Time &rtt)
Timing information on received ACK.
Simulation virtual time values and global simulation resolution.
Callback< R, Ts... > MakeCallback(R(T::*memPtr)(Ts...), OBJ objPtr)
Build Callbacks for class method members which take varying numbers of arguments and potentially retu...
General infrastructure for TCP testing.
TcpPktsAckedOpenTest(const std::string &desc)
Constructor.
NUMERIC_TYPE GetValue() const
Extracts the numeric value of the sequence number.
#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.
PktsAcked is calls TestSuite.
@ UNIT
This test suite implements a Unit Test.
The NewReno implementation.
void SetCongestionControlAlgorithm(Ptr< TcpCongestionOps > algo)
Install a congestion control algorithm on this socket.
void SetCallback(Callback< void, uint32_t > test)
Set the callback to be used when an ACK is received.
virtual void ConfigureEnvironment()
Change the configuration of the environment.
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.
virtual Ptr< TcpSocketMsgBase > CreateSenderSocket(Ptr< Node > node)
Create and install the socket to install on the sender.