19 #include "ns3/ipv4-list-routing.h"
20 #include "ns3/ipv4-routing-protocol.h"
139 void DoRun()
override;
143 :
TestCase(
"Check negative priorities")
154 lr->AddRoutingProtocol(aRouting, -10);
155 lr->AddRoutingProtocol(bRouting, -5);
157 uint32_t
num = lr->GetNRoutingProtocols();
173 void DoRun()
override;
177 :
TestCase(
"Check positive priorities")
189 lr->AddRoutingProtocol(aRouting, 10);
190 lr->AddRoutingProtocol(bRouting, 5);
193 uint32_t
num = lr->GetNRoutingProtocols();
219 static Ipv4ListRoutingTestSuite
IPv4 dummy routing class (A)
void SetIpv4(Ptr< Ipv4 > ipv4) override
void NotifyAddAddress(uint32_t interface, Ipv4InterfaceAddress address) override
Ptr< Ipv4Route > RouteOutput(Ptr< Packet > p, const Ipv4Header &header, Ptr< NetDevice > oif, Socket::SocketErrno &sockerr) override
Query routing cache for an existing route, for an outbound packet.
void PrintRoutingTable(Ptr< OutputStreamWrapper > stream, Time::Unit unit) const override
Print the Routing Table entries.
bool RouteInput(Ptr< const Packet > p, const Ipv4Header &header, Ptr< const NetDevice > idev, const UnicastForwardCallback &ucb, const MulticastForwardCallback &mcb, const LocalDeliverCallback &lcb, const ErrorCallback &ecb) override
Route an input packet (to be forwarded or locally delivered)
void NotifyInterfaceUp(uint32_t interface) override
void NotifyInterfaceDown(uint32_t interface) override
void NotifyRemoveAddress(uint32_t interface, Ipv4InterfaceAddress address) override
IPv4 dummy routing class (B)
void SetIpv4(Ptr< Ipv4 > ipv4) override
void PrintRoutingTable(Ptr< OutputStreamWrapper > stream, Time::Unit unit) const override
Print the Routing Table entries.
Ptr< Ipv4Route > RouteOutput(Ptr< Packet > p, const Ipv4Header &header, Ptr< NetDevice > oif, Socket::SocketErrno &sockerr) override
Query routing cache for an existing route, for an outbound packet.
void NotifyAddAddress(uint32_t interface, Ipv4InterfaceAddress address) override
bool RouteInput(Ptr< const Packet > p, const Ipv4Header &header, Ptr< const NetDevice > idev, const UnicastForwardCallback &ucb, const MulticastForwardCallback &mcb, const LocalDeliverCallback &lcb, const ErrorCallback &ecb) override
Route an input packet (to be forwarded or locally delivered)
void NotifyRemoveAddress(uint32_t interface, Ipv4InterfaceAddress address) override
void NotifyInterfaceDown(uint32_t interface) override
void NotifyInterfaceUp(uint32_t interface) override
a class to store IPv4 address information on an interface
IPv4 ListRouting negative test.
Ipv4ListRoutingNegativeTestCase()
void DoRun() override
Implementation to actually run this TestCase.
IPv4 ListRouting positive test.
Ipv4ListRoutingPositiveTestCase()
void DoRun() override
Implementation to actually run this TestCase.
IPv4 ListRouting TestSuite.
Ipv4ListRoutingTestSuite()
Abstract base class for IPv4 routing protocols.
Smart pointer class similar to boost::intrusive_ptr.
SocketErrno
Enumeration of the possible errors returned by a socket.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
@ UNIT
This test suite implements a Unit Test.
Unit
The unit to use to interpret a number representing time.
#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.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
static Ipv4ListRoutingTestSuite g_ipv4ListRoutingTestSuite
Static variable for test initialization.