Public Member Functions | |
TcpTestCase (uint32_t totalStreamSize, uint32_t sourceWriteSize, uint32_t sourceReadSize, uint32_t serverWriteSize, uint32_t serverReadSize, bool useIpv6) | |
![]() | |
virtual | ~TestCase () |
Private Member Functions | |
Ptr< SimpleNetDevice > | AddSimpleNetDevice (Ptr< Node > node, const char *ipaddr, const char *netmask) |
Ptr< SimpleNetDevice > | AddSimpleNetDevice6 (Ptr< Node > node, Ipv6Address ipaddr, Ipv6Prefix prefix) |
Ptr< Node > | CreateInternetNode (void) |
Ptr< Node > | CreateInternetNode6 (void) |
virtual void | DoRun (void) |
virtual void | DoTeardown (void) |
void | ServerHandleConnectionCreated (Ptr< Socket > s, const Address &addr) |
void | ServerHandleRecv (Ptr< Socket > sock) |
void | ServerHandleSend (Ptr< Socket > sock, uint32_t available) |
void | SetupDefaultSim (void) |
void | SetupDefaultSim6 (void) |
void | SourceHandleRecv (Ptr< Socket > sock) |
void | SourceHandleSend (Ptr< Socket > sock, uint32_t available) |
Private Attributes | |
uint32_t | m_currentServerRxBytes |
uint32_t | m_currentServerTxBytes |
uint32_t | m_currentSourceRxBytes |
uint32_t | m_currentSourceTxBytes |
uint32_t | m_serverReadSize |
uint8_t * | m_serverRxPayload |
uint32_t | m_serverWriteSize |
uint32_t | m_sourceReadSize |
uint8_t * | m_sourceRxPayload |
uint8_t * | m_sourceTxPayload |
uint32_t | m_sourceWriteSize |
uint32_t | m_totalBytes |
bool | m_useIpv6 |
Additional Inherited Members | |
![]() | |
enum | TestDuration { QUICK = 1, EXTENSIVE = 2, TAKES_FOREVER = 3 } |
How long the test takes to execute. More... | |
![]() | |
TestCase (std::string name) | |
void | AddTestCase (TestCase *testCase) NS_DEPRECATED |
Add an individual test case to this test suite. | |
void | AddTestCase (TestCase *testCase, enum TestDuration duration) |
Add an individual test case to this test suite. | |
std::string | CreateDataDirFilename (std::string filename) |
std::string | CreateTempDirFilename (std::string filename) |
bool | GetErrorStatus (void) const NS_DEPRECATED |
std::string | GetName (void) const |
bool | IsStatusFailure (void) const |
bool | IsStatusSuccess (void) const |
bool | MustAssertOnFailure (void) const |
bool | MustContinueOnFailure (void) const |
void | ReportTestFailure (std::string cond, std::string actual, std::string limit, std::string message, std::string file, int32_t line) |
void | SetDataDir (std::string directory) |
Definition at line 56 of file tcp-test.cc.
TcpTestCase::TcpTestCase | ( | uint32_t | totalStreamSize, |
uint32_t | sourceWriteSize, | ||
uint32_t | sourceReadSize, | ||
uint32_t | serverWriteSize, | ||
uint32_t | serverReadSize, | ||
bool | useIpv6 | ||
) |
Definition at line 120 of file tcp-test.cc.
|
private |
Definition at line 302 of file tcp-test.cc.
References ns3::Ipv4::AddAddress(), ns3::Node::AddDevice(), ns3::Ipv4::AddInterface(), ns3::Object::GetObject(), ns3::SimpleNetDevice::SetAddress(), and ns3::Ipv4::SetUp().
Referenced by SetupDefaultSim().
|
private |
Definition at line 415 of file tcp-test.cc.
References ns3::Ipv6::AddAddress(), ns3::Node::AddDevice(), ns3::Ipv6::AddInterface(), ns3::Object::GetObject(), ns3::SimpleNetDevice::SetAddress(), and ns3::Ipv6::SetUp().
Referenced by SetupDefaultSim6().
Definition at line 275 of file tcp-test.cc.
References ns3::Object::AggregateObject(), and ns3::Ipv4L3Protocol::SetRoutingProtocol().
Referenced by SetupDefaultSim().
Definition at line 388 of file tcp-test.cc.
References ns3::Object::AggregateObject().
Referenced by SetupDefaultSim6().
|
privatevirtual |
Definition at line 143 of file tcp-test.cc.
References m_currentServerRxBytes, m_currentServerTxBytes, m_currentSourceRxBytes, m_currentSourceTxBytes, m_serverRxPayload, m_sourceRxPayload, m_sourceTxPayload, m_totalBytes, m_useIpv6, NS_TEST_EXPECT_MSG_EQ, ns3::TestCase::Run(), SetupDefaultSim(), and SetupDefaultSim6().
|
privatevirtual |
Definition at line 180 of file tcp-test.cc.
References m_serverRxPayload, m_sourceRxPayload, and m_sourceTxPayload.
Definition at line 189 of file tcp-test.cc.
References ns3::MakeCallback(), ServerHandleRecv(), ServerHandleSend(), ns3::Socket::SetRecvCallback(), and ns3::Socket::SetSendCallback().
Referenced by SetupDefaultSim(), and SetupDefaultSim6().
Definition at line 196 of file tcp-test.cc.
References ns3::Socket::GetErrno(), ns3::Socket::GetRxAvailable(), GetString(), ns3::Socket::GetTxAvailable(), m_currentServerRxBytes, m_serverReadSize, m_serverRxPayload, m_totalBytes, NS_FATAL_ERROR, NS_LOG_DEBUG, NS_TEST_EXPECT_MSG_EQ, ns3::Socket::Recv(), and ServerHandleSend().
Referenced by ServerHandleConnectionCreated().
Definition at line 216 of file tcp-test.cc.
References ns3::Socket::Close(), GetString(), ns3::Socket::GetTxAvailable(), m_currentServerRxBytes, m_currentServerTxBytes, m_serverRxPayload, m_serverWriteSize, m_totalBytes, NS_LOG_DEBUG, NS_TEST_EXPECT_MSG_EQ, and ns3::Socket::Send().
Referenced by ServerHandleConnectionCreated(), and ServerHandleRecv().
|
private |
Definition at line 316 of file tcp-test.cc.
References AddSimpleNetDevice(), ns3::Socket::Connect(), CreateInternetNode(), ns3::SocketFactory::CreateSocket(), ns3::Socket::CreateSocket(), ns3::Object::GetObject(), ns3::MakeCallback(), ns3::MakeNullCallback(), port, ServerHandleConnectionCreated(), ns3::SimpleNetDevice::SetChannel(), ns3::Socket::SetRecvCallback(), ns3::Socket::SetSendCallback(), SourceHandleRecv(), and SourceHandleSend().
Referenced by DoRun().
|
private |
Definition at line 352 of file tcp-test.cc.
References AddSimpleNetDevice6(), ns3::Socket::Connect(), CreateInternetNode6(), ns3::SocketFactory::CreateSocket(), ns3::Socket::CreateSocket(), ns3::Object::GetObject(), ns3::MakeCallback(), ns3::MakeNullCallback(), port, ServerHandleConnectionCreated(), ns3::SimpleNetDevice::SetChannel(), ns3::Socket::SetRecvCallback(), ns3::Socket::SetSendCallback(), SourceHandleRecv(), and SourceHandleSend().
Referenced by DoRun().
Definition at line 252 of file tcp-test.cc.
References ns3::Socket::Close(), ns3::Socket::GetErrno(), ns3::Socket::GetRxAvailable(), GetString(), m_currentSourceRxBytes, m_sourceReadSize, m_sourceRxPayload, m_totalBytes, NS_FATAL_ERROR, NS_LOG_DEBUG, NS_TEST_EXPECT_MSG_EQ, and ns3::Socket::Recv().
Referenced by SetupDefaultSim(), and SetupDefaultSim6().
Definition at line 236 of file tcp-test.cc.
References GetString(), ns3::Socket::GetTxAvailable(), m_currentSourceTxBytes, m_sourceTxPayload, m_sourceWriteSize, m_totalBytes, NS_LOG_DEBUG, NS_TEST_EXPECT_MSG_EQ, and ns3::Socket::Send().
Referenced by SetupDefaultSim(), and SetupDefaultSim6().
|
private |
Definition at line 88 of file tcp-test.cc.
Referenced by DoRun(), ServerHandleRecv(), and ServerHandleSend().
|
private |
Definition at line 89 of file tcp-test.cc.
Referenced by DoRun(), and ServerHandleSend().
|
private |
Definition at line 87 of file tcp-test.cc.
Referenced by DoRun(), and SourceHandleRecv().
|
private |
Definition at line 86 of file tcp-test.cc.
Referenced by DoRun(), and SourceHandleSend().
|
private |
Definition at line 85 of file tcp-test.cc.
Referenced by ServerHandleRecv().
|
private |
Definition at line 92 of file tcp-test.cc.
Referenced by DoRun(), DoTeardown(), ServerHandleRecv(), and ServerHandleSend().
|
private |
Definition at line 84 of file tcp-test.cc.
Referenced by ServerHandleSend().
|
private |
Definition at line 83 of file tcp-test.cc.
Referenced by SourceHandleRecv().
|
private |
Definition at line 91 of file tcp-test.cc.
Referenced by DoRun(), DoTeardown(), and SourceHandleRecv().
|
private |
Definition at line 90 of file tcp-test.cc.
Referenced by DoRun(), DoTeardown(), and SourceHandleSend().
|
private |
Definition at line 82 of file tcp-test.cc.
Referenced by SourceHandleSend().
|
private |
Definition at line 81 of file tcp-test.cc.
Referenced by DoRun(), ServerHandleRecv(), ServerHandleSend(), SourceHandleRecv(), and SourceHandleSend().
|
private |
Definition at line 94 of file tcp-test.cc.
Referenced by DoRun().