21 #include "ns3/ipv6-list-routing.h"
22 #include "ns3/ipv6-route.h"
23 #include "ns3/ipv6-routing-protocol.h"
83 virtual void DoRun (
void);
87 :
TestCase (
"Check negative priorities")
97 lr->AddRoutingProtocol (aRouting, -10);
98 lr->AddRoutingProtocol (bRouting, -5);
100 uint32_t num = lr->GetNRoutingProtocols ();
117 virtual void DoRun (
void);
121 :
TestCase (
"Check positive priorities")
132 lr->AddRoutingProtocol (aRouting, 10);
133 lr->AddRoutingProtocol (bRouting, 5);
136 uint32_t num = lr->GetNRoutingProtocols ();
IPv6 dummy routing class (A)
virtual void PrintRoutingTable(Ptr< OutputStreamWrapper > stream, Time::Unit unit) const
Print the Routing Table entries.
Ptr< Ipv6Route > RouteOutput(Ptr< Packet > p, const Ipv6Header &header, Ptr< NetDevice > oif, Socket::SocketErrno &sockerr)
Query routing cache for an existing route, for an outbound packet.
void NotifyRemoveRoute(Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse)
Notify route removing.
void SetIpv6(Ptr< Ipv6 > ipv6)
Typically, invoked directly or indirectly from ns3::Ipv6::SetRoutingProtocol.
void NotifyInterfaceDown(uint32_t interface)
Notify when specified interface goes DOWN.
bool RouteInput(Ptr< const Packet > p, const Ipv6Header &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)
Notify when specified interface goes UP.
void NotifyRemoveAddress(uint32_t interface, Ipv6InterfaceAddress address)
Notify when specified interface add an address.
void NotifyAddAddress(uint32_t interface, Ipv6InterfaceAddress address)
Notify when specified interface add an address.
void NotifyAddRoute(Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse=Ipv6Address::GetZero())
Notify a new route.
IPv6 dummy routing class (B)
void NotifyRemoveRoute(Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse)
Notify route removing.
bool RouteInput(Ptr< const Packet > p, const Ipv6Header &header, Ptr< const NetDevice > idev, UnicastForwardCallback ucb, MulticastForwardCallback mcb, LocalDeliverCallback lcb, ErrorCallback ecb)
Route an input packet (to be forwarded or locally delivered)
void NotifyInterfaceDown(uint32_t interface)
Notify when specified interface goes DOWN.
virtual void PrintRoutingTable(Ptr< OutputStreamWrapper > stream, Time::Unit unit) const
Print the Routing Table entries.
void NotifyInterfaceUp(uint32_t interface)
Notify when specified interface goes UP.
Ptr< Ipv6Route > RouteOutput(Ptr< Packet > p, const Ipv6Header &header, Ptr< NetDevice > oif, Socket::SocketErrno &sockerr)
Query routing cache for an existing route, for an outbound packet.
void NotifyRemoveAddress(uint32_t interface, Ipv6InterfaceAddress address)
Notify when specified interface add an address.
void NotifyAddRoute(Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse=Ipv6Address::GetZero())
Notify a new route.
void NotifyAddAddress(uint32_t interface, Ipv6InterfaceAddress address)
Notify when specified interface add an address.
void SetIpv6(Ptr< Ipv6 > ipv6)
Typically, invoked directly or indirectly from ns3::Ipv6::SetRoutingProtocol.
IPv6 ListRouting negative test.
virtual void DoRun(void)
Implementation to actually run this TestCase.
Ipv6ListRoutingNegativeTestCase()
IPv6 ListRouting positive test.
virtual void DoRun(void)
Implementation to actually run this TestCase.
Ipv6ListRoutingPositiveTestCase()
IPv6 ListRouting TestSuite.
Ipv6ListRoutingTestSuite()
Describes an IPv6 address.
IPv6 address associated with an interface.
Describes an IPv6 prefix.
Abstract base class for IPv6 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 Ipv6ListRoutingTestSuite g_ipv6ListRoutingTestSuite
Static variable for test initialization.
Every class exported by the ns3 library is enclosed in the ns3 namespace.