19 #include "ns3/core-module.h"
20 #include "ns3/internet-module.h"
21 #include "ns3/network-module.h"
76 void DoRun()
override;
100 socket->
Send(Create<Packet>(536));
101 socket->
Send(Create<Packet>(536));
102 socket->
Send(Create<Packet>(536));
120 TypeId tid = TcpSocketFactory::GetTypeId();
134 Ptr<Socket> source = Socket::CreateSocket(node, tid);
148 Simulator::Destroy();
bool m_v6
True to use IPv6.
void DoRun() override
Implementation to actually run this TestCase.
void Recv(Ptr< Socket > socket)
Receive a packet.
void HandleAccept(Ptr< Socket > s, const Address &from)
Handle an incoming connection.
void HandleConnect(Ptr< Socket > socket)
Handle a connection establishment.
TcpEndPointBug2211Test(std::string desc, bool ipVersion)
Constructor.
TestSuite for bug 2211 - It must be used with valgrind.
TcpEndpointBug2211TestSuite()
a polymophic address class
aggregate IP/TCP/UDP functionality to existing Nodes.
virtual int Send(Ptr< Packet > p, uint32_t flags)=0
Send data (or dummy data) to the remote host.
virtual uint32_t GetRxAvailable() const =0
Return number of bytes which can be returned from one or multiple calls to Recv.
void SetRecvCallback(Callback< void, Ptr< Socket >> receivedData)
Notify application when new data is available to be read.
virtual int Connect(const Address &address)=0
Initiate a connection to a remote host.
virtual int Close()=0
Close a socket.
virtual int Bind(const Address &address)=0
Allocate a local endpoint for this socket.
void SetConnectCallback(Callback< void, Ptr< Socket >> connectionSucceeded, Callback< void, Ptr< Socket >> connectionFailed)
Specify callbacks to allow the caller to determine if the connection succeeds of fails.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
@ UNIT
This test suite implements a Unit Test.
a unique identifier for an interface.
Callback< R, Args... > MakeNullCallback()
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 TcpEndpointBug2211TestSuite g_TcpEndPoint2211TestSuite
Static variable for test initialization.
Ptr< PacketSink > sink
Pointer to the packet sink application.