19#include "ns3/ipv4-list-routing.h"
20#include "ns3/ipv4-routing-protocol.h"
141 void DoRun()
override;
145 :
TestCase(
"Check negative priorities")
156 lr->AddRoutingProtocol(aRouting, -10);
157 lr->AddRoutingProtocol(bRouting, -5);
159 uint32_t num = lr->GetNRoutingProtocols();
176 void DoRun()
override;
180 :
TestCase(
"Check positive priorities")
192 lr->AddRoutingProtocol(aRouting, 10);
193 lr->AddRoutingProtocol(bRouting, 5);
196 uint32_t num = lr->GetNRoutingProtocols();
IPv4 dummy routing class (A)
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 NotifyInterfaceDown(uint32_t interface) override
bool RouteInput(Ptr< const Packet > p, const Ipv4Header &header, Ptr< const NetDevice > idev, UnicastForwardCallback ucb, MulticastForwardCallback mcb, LocalDeliverCallback lcb, ErrorCallback ecb) override
Route an input packet (to be forwarded or locally delivered)
void NotifyRemoveAddress(uint32_t interface, Ipv4InterfaceAddress address) override
void NotifyAddAddress(uint32_t interface, Ipv4InterfaceAddress address) override
void PrintRoutingTable(Ptr< OutputStreamWrapper > stream, Time::Unit unit) const override
Print the Routing Table entries.
void NotifyInterfaceUp(uint32_t interface) override
void SetIpv4(Ptr< Ipv4 > ipv4) 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.
bool RouteInput(Ptr< const Packet > p, const Ipv4Header &header, Ptr< const NetDevice > idev, UnicastForwardCallback ucb, MulticastForwardCallback mcb, LocalDeliverCallback lcb, ErrorCallback ecb) override
Route an input packet (to be forwarded or locally delivered)
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 NotifyRemoveAddress(uint32_t interface, Ipv4InterfaceAddress address) override
void NotifyInterfaceDown(uint32_t interface) override
void NotifyAddAddress(uint32_t interface, Ipv4InterfaceAddress address) override
void NotifyInterfaceUp(uint32_t interface) override
IPv4 ListRouting negative test.
void DoRun() override
Implementation to actually run this TestCase.
Ipv4ListRoutingNegativeTestCase()
IPv4 ListRouting positive test.
void DoRun() override
Implementation to actually run this TestCase.
Ipv4ListRoutingPositiveTestCase()
IPv4 ListRouting TestSuite.
Ipv4ListRoutingTestSuite()
a class to store IPv4 address information on an interface
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.
static Ipv4ListRoutingTestSuite g_ipv4ListRoutingTestSuite
Static variable for test initialization.
Every class exported by the ns3 library is enclosed in the ns3 namespace.