23 #include "ns3/core-module.h" 24 #include "ns3/network-module.h" 25 #include "ns3/internet-module.h" 51 virtual void DoRun ();
54 bool m_connectionFailed{
false};
55 bool m_useEcn {
false};
76 TypeId tid = TcpSocketFactory::GetTypeId ();
78 Ptr<Socket> socket = Socket::CreateSocket (node, tid);
82 tcpSocket->
SetUseEcn (TcpSocketState::On);
90 Simulator::Destroy ();
TcpSynConnectionFailedTest(std::string desc, bool useEcn)
Constructor.
bool m_useEcn
Use ECN (true or false)
void SetUseEcn(TcpSocketState::UseEcn_t useEcn)
Set ECN mode of use on the socket.
aggregate IP/TCP/UDP functionality to existing Nodes.
Callback< R, Ts... > MakeNullCallback(void)
static TcpSynConnectionFailedTestSuite g_TcpSynConnectionFailedTestSuite
Static variable for test initialization.
Test that connection failed callback is called when SYN retransmission number is exceeded.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
#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.
virtual int Connect(const Address &address)=0
Initiate a connection to a remote host.
virtual int Bind(const Address &address)=0
Allocate a local endpoint for this socket.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void HandleConnectionFailed(Ptr< Socket > socket)
Handle a connection failure.
void Install(std::string nodeName) const
Aggregate implementations of the ns3::Ipv4, ns3::Ipv6, ns3::Udp, and ns3::Tcp classes onto the provid...
bool m_connectionFailed
Connection failure indicator.
virtual void DoRun()
Implementation to actually run this TestCase.
TcpSynConnectionFailedTestSuite()
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.
This test suite implements a Unit Test.
a unique identifier for an interface.
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...