The topology is of the form: More...
Inheritance diagram for NixVectorRoutingTest:
Collaboration diagram for NixVectorRoutingTest:Public Member Functions | |
| NixVectorRoutingTest () | |
| virtual void | DoRun (void) |
| Implementation to actually run this TestCase. More... | |
| void | ReceivePkt (Ptr< Socket > socket) |
| Receive data. More... | |
Public Member Functions inherited from ns3::TestCase | |
| virtual | ~TestCase () |
| Destructor. More... | |
| std::string | GetName (void) const |
Public Attributes | |
| std::vector< uint32_t > | m_receivedPacketSizes |
| Received packet sizes. More... | |
Private Member Functions | |
| void | DoSendDatav4 (Ptr< Socket > socket, Ipv4Address to) |
| Send data immediately after being called. More... | |
| void | DoSendDatav6 (Ptr< Socket > socket, Ipv6Address to) |
| Send data immediately after being called. More... | |
| void | SendData (Time delay, Ptr< Socket > socket, Ipv4Address to) |
| Schedules the DoSendData () function to send the data. More... | |
| void | SendData (Time delay, Ptr< Socket > socket, Ipv6Address to) |
| Schedules the DoSendData () function to send the data. More... | |
Private Attributes | |
| Ptr< Packet > | m_receivedPacket |
| Received packet. More... | |
Additional Inherited Members | |
Public Types inherited from ns3::TestCase | |
| enum | TestDuration { QUICK = 1, EXTENSIVE = 2, TAKES_FOREVER = 3 } |
| How long the test takes to execute. More... | |
Protected Member Functions inherited from ns3::TestCase | |
| TestCase (std::string name) | |
| Constructor. More... | |
| void | AddTestCase (TestCase *testCase, TestDuration duration=QUICK) |
| Add an individual child TestCase to this test suite. More... | |
| TestCase * | GetParent () const |
| Get the parent of this TestCsse. More... | |
| bool | IsStatusFailure (void) const |
| Check if any tests failed. More... | |
| bool | IsStatusSuccess (void) const |
| Check if all tests passed. More... | |
| void | SetDataDir (std::string directory) |
| Set the data directory where reference trace files can be found. More... | |
| void | ReportTestFailure (std::string cond, std::string actual, std::string limit, std::string message, std::string file, int32_t line) |
| Log the failure of this TestCase. More... | |
| bool | MustAssertOnFailure (void) const |
| Check if this run should assert on failure. More... | |
| bool | MustContinueOnFailure (void) const |
| Check if this run should continue on failure. More... | |
| std::string | CreateDataDirFilename (std::string filename) |
| Construct the full path to a file in the data directory. More... | |
| std::string | CreateTempDirFilename (std::string filename) |
| Construct the full path to a file in a temporary directory. More... | |
The topology is of the form:
__________
/ \
nSrc -- nA -- nB -- nC -- nDst
Following are the tests in this test case:
IPv4 Nix-Vector Routing Test
Definition at line 66 of file nix-test.cc.
| NixVectorRoutingTest::NixVectorRoutingTest | ( | ) |
Definition at line 113 of file nix-test.cc.
|
virtual |
Implementation to actually run this TestCase.
Subclasses should override this method to conduct their tests.
Implements ns3::TestCase.
Definition at line 160 of file nix-test.cc.
References ns3::NodeContainer::Add(), ns3::Ipv4AddressHelper::Assign(), ns3::Ipv6AddressHelper::Assign(), ns3::Socket::Bind(), ns3::NodeContainer::Create(), ns3::SocketFactory::CreateSocket(), ns3::NetDeviceContainer::Get(), ns3::NodeContainer::Get(), ns3::Ipv6InterfaceContainer::GetAddress(), ns3::Ipv4InterfaceContainer::GetAddress(), ns3::Ipv4::GetInterfaceForDevice(), ns3::Ipv6::GetInterfaceForDevice(), ns3::Object::GetObject(), ns3::SimpleNetDeviceHelper::Install(), m_receivedPacketSizes, ns3::MakeCallback(), NS_TEST_EXPECT_MSG_EQ, ns3::NixVectorHelper< T >::PrintRoutingPathAt(), ReceivePkt(), ns3::Seconds(), SendData(), ns3::Socket::SetAllowBroadcast(), ns3::Ipv4AddressHelper::SetBase(), ns3::Ipv6AddressHelper::SetBase(), ns3::SimpleNetDeviceHelper::SetNetDevicePointToPointMode(), ns3::Socket::SetRecvCallback(), and first::stack.
Here is the call graph for this function:
|
private |
Send data immediately after being called.
| socket | The sending socket. |
| to | IPv4 Destination address. |
Definition at line 130 of file nix-test.cc.
References ns3::Socket::SendTo().
Referenced by SendData().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Send data immediately after being called.
| socket | The sending socket. |
| to | IPv6 Destination address. |
Definition at line 137 of file nix-test.cc.
References ns3::Socket::SendTo().
Referenced by SendData().
Here is the call graph for this function:
Here is the caller graph for this function:Receive data.
| socket | The receiving socket. |
Definition at line 118 of file nix-test.cc.
References ns3::Socket::GetRxAvailable(), ns3::Packet::GetSize(), m_receivedPacket, m_receivedPacketSizes, max, NS_TEST_ASSERT_MSG_EQ, NS_UNUSED, and ns3::Socket::Recv().
Referenced by DoRun().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Schedules the DoSendData () function to send the data.
| delay | The scheduled time to send data. |
| socket | The sending socket. |
| to | IPv4 Destination address. |
Definition at line 144 of file nix-test.cc.
References DoSendDatav4(), ns3::Node::GetId(), ns3::Socket::GetNode(), and m_receivedPacket.
Referenced by DoRun().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Schedules the DoSendData () function to send the data.
| delay | The scheduled time to send data. |
| socket | The sending socket. |
| to | IPv6 Destination address. |
Definition at line 152 of file nix-test.cc.
References DoSendDatav6(), ns3::Node::GetId(), ns3::Socket::GetNode(), and m_receivedPacket.
Here is the call graph for this function:Received packet.
Definition at line 68 of file nix-test.cc.
Referenced by ReceivePkt(), and SendData().
| std::vector<uint32_t> NixVectorRoutingTest::m_receivedPacketSizes |
Received packet sizes.
Definition at line 110 of file nix-test.cc.
Referenced by DoRun(), and ReceivePkt().