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