21 #include "ns3/ipv4-list-routing.h"
22 #include "ns3/ipv4-routing-protocol.h"
76 virtual void DoRun (
void);
80 :
TestCase (
"Check negative priorities")
90 lr->AddRoutingProtocol (aRouting, -10);
91 lr->AddRoutingProtocol (bRouting, -5);
93 uint32_t num = lr->GetNRoutingProtocols ();
110 virtual void DoRun (
void);
114 :
TestCase (
"Check positive priorities")
125 lr->AddRoutingProtocol (aRouting, 10);
126 lr->AddRoutingProtocol (bRouting, 5);
129 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)
Query routing cache for an existing route, for an outbound packet.
bool RouteInput(Ptr< const Packet > p, const Ipv4Header &header, Ptr< const NetDevice > idev, UnicastForwardCallback ucb, MulticastForwardCallback mcb, LocalDeliverCallback lcb, ErrorCallback ecb)
Route an input packet (to be forwarded or locally delivered)
void NotifyInterfaceUp(uint32_t interface)
void NotifyInterfaceDown(uint32_t interface)
void PrintRoutingTable(Ptr< OutputStreamWrapper > stream, Time::Unit unit) const
Print the Routing Table entries.
void NotifyRemoveAddress(uint32_t interface, Ipv4InterfaceAddress address)
void NotifyAddAddress(uint32_t interface, Ipv4InterfaceAddress address)
void SetIpv4(Ptr< Ipv4 > ipv4)
IPv4 dummy routing class (B)
void NotifyRemoveAddress(uint32_t interface, Ipv4InterfaceAddress address)
Ptr< Ipv4Route > RouteOutput(Ptr< Packet > p, const Ipv4Header &header, Ptr< NetDevice > oif, Socket::SocketErrno &sockerr)
Query routing cache for an existing route, for an outbound packet.
void NotifyInterfaceUp(uint32_t interface)
void NotifyAddAddress(uint32_t interface, Ipv4InterfaceAddress address)
void SetIpv4(Ptr< Ipv4 > ipv4)
void NotifyInterfaceDown(uint32_t interface)
void PrintRoutingTable(Ptr< OutputStreamWrapper > stream, Time::Unit unit) const
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)
Route an input packet (to be forwarded or locally delivered)
IPv4 ListRouting negative test.
Ipv4ListRoutingNegativeTestCase()
virtual void DoRun(void)
Implementation to actually run this TestCase.
IPv4 ListRouting positive test.
virtual void DoRun(void)
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.