A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ns3::TcpTestCase Class Reference
+ Inheritance diagram for ns3::TcpTestCase:
+ Collaboration diagram for ns3::TcpTestCase:

Public Member Functions

 TcpTestCase (uint32_t totalStreamSize, uint32_t sourceWriteSize, uint32_t sourceReadSize, uint32_t serverWriteSize, uint32_t serverReadSize, bool useIpv6)
- Public Member Functions inherited from ns3::TestCase
virtual ~TestCase ()

Private Member Functions

Ptr< SimpleNetDeviceAddSimpleNetDevice (Ptr< Node > node, const char *ipaddr, const char *netmask)
Ptr< SimpleNetDeviceAddSimpleNetDevice6 (Ptr< Node > node, Ipv6Address ipaddr, Ipv6Prefix prefix)
Ptr< NodeCreateInternetNode (void)
Ptr< NodeCreateInternetNode6 (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

- Protected Member Functions inherited from ns3::TestCase
 TestCase (std::string name)
void AddTestCase (TestCase *testCase)
 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)

Detailed Description

Definition at line 56 of file tcp-test.cc.

Constructor & Destructor Documentation

ns3::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.

Member Function Documentation

Ptr< SimpleNetDevice > ns3::TcpTestCase::AddSimpleNetDevice ( Ptr< Node node,
const char *  ipaddr,
const char *  netmask 
)
private

Definition at line 302 of file tcp-test.cc.

References ns3::Ipv4::AddAddress(), ns3::Node::AddDevice(), ns3::Ipv4::AddInterface(), ns3::Mac48Address::Allocate(), ns3::Mac48Address::ConvertFrom(), ns3::Object::GetObject(), ns3::SimpleNetDevice::SetAddress(), and ns3::Ipv4::SetUp().

Referenced by SetupDefaultSim().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Ptr< SimpleNetDevice > ns3::TcpTestCase::AddSimpleNetDevice6 ( Ptr< Node node,
Ipv6Address  ipaddr,
Ipv6Prefix  prefix 
)
private

Definition at line 415 of file tcp-test.cc.

References ns3::Ipv6::AddAddress(), ns3::Node::AddDevice(), ns3::Ipv6::AddInterface(), ns3::Mac48Address::Allocate(), ns3::Mac48Address::ConvertFrom(), ns3::Object::GetObject(), ns3::SimpleNetDevice::SetAddress(), and ns3::Ipv6::SetUp().

Referenced by SetupDefaultSim6().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Ptr< Node > ns3::TcpTestCase::CreateInternetNode ( void  )
private

Definition at line 275 of file tcp-test.cc.

References ns3::Object::AggregateObject(), and ns3::Ipv4L3Protocol::SetRoutingProtocol().

Referenced by SetupDefaultSim().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Ptr< Node > ns3::TcpTestCase::CreateInternetNode6 ( void  )
private

Definition at line 388 of file tcp-test.cc.

References ns3::Object::AggregateObject().

Referenced by SetupDefaultSim6().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::TcpTestCase::DoRun ( void  )
privatevirtual
void ns3::TcpTestCase::DoTeardown ( void  )
privatevirtual

Definition at line 180 of file tcp-test.cc.

References ns3::Simulator::Destroy(), m_serverRxPayload, m_sourceRxPayload, and m_sourceTxPayload.

+ Here is the call graph for this function:

void ns3::TcpTestCase::ServerHandleConnectionCreated ( Ptr< Socket s,
const Address addr 
)
private

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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::TcpTestCase::ServerHandleRecv ( Ptr< Socket sock)
private
void ns3::TcpTestCase::ServerHandleSend ( Ptr< Socket sock,
uint32_t  available 
)
private
void ns3::TcpTestCase::SourceHandleRecv ( Ptr< Socket sock)
private
void ns3::TcpTestCase::SourceHandleSend ( Ptr< Socket sock,
uint32_t  available 
)
private

Definition at line 236 of file tcp-test.cc.

References ns3::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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

uint32_t ns3::TcpTestCase::m_currentServerRxBytes
private

Definition at line 88 of file tcp-test.cc.

Referenced by DoRun(), ServerHandleRecv(), and ServerHandleSend().

uint32_t ns3::TcpTestCase::m_currentServerTxBytes
private

Definition at line 89 of file tcp-test.cc.

Referenced by DoRun(), and ServerHandleSend().

uint32_t ns3::TcpTestCase::m_currentSourceRxBytes
private

Definition at line 87 of file tcp-test.cc.

Referenced by DoRun(), and SourceHandleRecv().

uint32_t ns3::TcpTestCase::m_currentSourceTxBytes
private

Definition at line 86 of file tcp-test.cc.

Referenced by DoRun(), and SourceHandleSend().

uint32_t ns3::TcpTestCase::m_serverReadSize
private

Definition at line 85 of file tcp-test.cc.

Referenced by ServerHandleRecv().

uint8_t* ns3::TcpTestCase::m_serverRxPayload
private

Definition at line 92 of file tcp-test.cc.

Referenced by DoRun(), DoTeardown(), ServerHandleRecv(), and ServerHandleSend().

uint32_t ns3::TcpTestCase::m_serverWriteSize
private

Definition at line 84 of file tcp-test.cc.

Referenced by ServerHandleSend().

uint32_t ns3::TcpTestCase::m_sourceReadSize
private

Definition at line 83 of file tcp-test.cc.

Referenced by SourceHandleRecv().

uint8_t* ns3::TcpTestCase::m_sourceRxPayload
private

Definition at line 91 of file tcp-test.cc.

Referenced by DoRun(), DoTeardown(), and SourceHandleRecv().

uint8_t* ns3::TcpTestCase::m_sourceTxPayload
private

Definition at line 90 of file tcp-test.cc.

Referenced by DoRun(), DoTeardown(), and SourceHandleSend().

uint32_t ns3::TcpTestCase::m_sourceWriteSize
private

Definition at line 82 of file tcp-test.cc.

Referenced by SourceHandleSend().

uint32_t ns3::TcpTestCase::m_totalBytes
private
bool ns3::TcpTestCase::m_useIpv6
private

Definition at line 94 of file tcp-test.cc.

Referenced by DoRun().


The documentation for this class was generated from the following file: