23 #include "ns3/tcp-header.h"
61 .SetGroupName(
"Internet")
69 return CopyObject<TcpSocketHalfAck>(
this);
76 static uint32_t times = 1;
121 void DataSent(uint32_t size, SocketWho who)
override;
122 void ConfigureEnvironment()
override;
123 void FinalChecks()
override;
135 SetAppPktCount(m_pktCount);
136 SetAppPktSize(m_pktSize);
144 m_notifiedData += size;
151 GetPktSize() * GetPktCount(),
152 "Notified more data than application sent");
Ptr< TcpSocketMsgBase > CreateReceiverSocket(Ptr< Node > node) override
Create and install the socket to install on the receiver.
void DataSent(uint32_t size, SocketWho who) override
void ConfigureEnvironment() override
Change the configuration of the environment.
uint32_t m_notifiedData
Amount of data notified.
TcpDataSentCbTestCase(const std::string &desc, uint32_t size, uint32_t packets)
Constructor.
uint32_t m_pktCount
Number of packets sent.
uint32_t m_pktSize
Packet size.
void FinalChecks() override
Performs the (eventual) final checks through test asserts.
TestSuite: Data Sent callback.
Socket that the 50% of the times saves the entire packet in the buffer, while in the other 50% saves ...
Ptr< TcpSocketBase > Fork() override
Call CopyObject<> to clone me.
static TypeId GetTypeId()
Get the type ID.
void ReceivedData(Ptr< Packet > packet, const TcpHeader &tcpHeader) override
Recv of a data, put into buffer, call L7 to get it if necessary.
uint32_t GetSize() const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
void RemoveAtEnd(uint32_t size)
Remove size bytes from the end of the current packet.
Ptr< Packet > Copy() const
performs a COW copy of the packet.
Smart pointer class similar to boost::intrusive_ptr.
General infrastructure for TCP testing.
SocketWho
Used as parameter of methods, specifies on what node the caller is interested (e.g.
virtual void ConfigureEnvironment()
Change the configuration of the environment.
virtual void ReceivedData(Ptr< Packet > packet, const TcpHeader &tcpHeader)
Recv of a data, put into buffer, call L7 to get it if necessary.
Class for inserting callbacks special points of the flow of TCP sockets.
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_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
#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.
static TcpDataSentCbTestSuite g_tcpDataSentCbTestSuite
Static variable for test initialization.