21 #include "ns3/ipv6-list-routing.h"
22 #include "ns3/ipv6-route.h"
23 #include "ns3/ipv6-routing-protocol.h"
65 virtual void DoRun (
void);
68 Ipv6ListRoutingNegativeTestCase::Ipv6ListRoutingNegativeTestCase()
69 :
TestCase (
"Check negative priorities")
83 NS_TEST_ASSERT_MSG_EQ (num, 2,
"XXX");
85 NS_TEST_ASSERT_MSG_EQ (-5, first,
"XXX");
86 NS_TEST_ASSERT_MSG_EQ (firstRp, bRouting,
"XXX");
93 virtual void DoRun (
void);
96 Ipv6ListRoutingPositiveTestCase::Ipv6ListRoutingPositiveTestCase()
97 :
TestCase (
"Check positive priorities")
113 NS_TEST_ASSERT_MSG_EQ (num, 2,
"XXX");
115 NS_TEST_ASSERT_MSG_EQ (10, first,
"XXX");
116 NS_TEST_ASSERT_MSG_EQ (firstRp, aRouting,
"XXX");
118 NS_TEST_ASSERT_MSG_EQ (5, second,
"XXX");
119 NS_TEST_ASSERT_MSG_EQ (secondRp, bRouting,
"XXX");
132 } g_ipv6ListRoutingTestSuite;
smart pointer class similar to boost::intrusive_ptr
virtual uint32_t GetNRoutingProtocols(void) const
Get the number of routing protocols.
void SetIpv6(Ptr< Ipv6 > ipv6)
Typically, invoked directly or indirectly from ns3::Ipv6::SetRoutingProtocol.
void NotifyAddAddress(uint32_t interface, Ipv6InterfaceAddress address)
Notify when specified interface add an address.
IPv6 address associated with an interface.
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 NotifyInterfaceUp(uint32_t interface)
Notify when specified interface goes UP.
TestSuite(std::string name, Type type=UNIT)
Constuct a new test suite.
void NotifyAddRoute(Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse=Ipv6Address::GetZero())
Notify a new route.
void NotifyInterfaceUp(uint32_t interface)
Notify when specified interface goes UP.
virtual void AddRoutingProtocol(Ptr< Ipv6RoutingProtocol > routingProtocol, int16_t priority)
Register a new routing protocol to be used in this IPv4 stack.
void NotifyInterfaceDown(uint32_t interface)
Notify when specified interface goes DOWN.
virtual void DoRun(void)
Implementation to actually run this test case.
void NotifyInterfaceDown(uint32_t interface)
Notify when specified interface goes DOWN.
void SetIpv6(Ptr< Ipv6 > ipv6)
Typically, invoked directly or indirectly from ns3::Ipv6::SetRoutingProtocol.
void NotifyAddAddress(uint32_t interface, Ipv6InterfaceAddress address)
Notify when specified interface add an address.
virtual void PrintRoutingTable(Ptr< OutputStreamWrapper > stream) 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 NotifyAddRoute(Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse=Ipv6Address::GetZero())
Notify a new route.
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)
virtual void DoRun(void)
Implementation to actually run this test case.
void AddTestCase(TestCase *testCase) NS_DEPRECATED
Add an individual test case to this test suite.
void NotifyRemoveRoute(Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse)
Notify route removing.
virtual void PrintRoutingTable(Ptr< OutputStreamWrapper > stream) const
Print the Routing Table entries.
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)
Describes an IPv6 address.
Describes an IPv6 prefix. It is just a bitmask like Ipv4Mask.
Abstract base class for Ipv6 routing protocols.
virtual Ptr< Ipv6RoutingProtocol > GetRoutingProtocol(uint32_t index, int16_t &priority) const
Get pointer to routing protocol stored at index,.
void NotifyRemoveAddress(uint32_t interface, Ipv6InterfaceAddress address)
Notify when specified interface add an address.
void NotifyRemoveAddress(uint32_t interface, Ipv6InterfaceAddress address)
Notify when specified interface add an address.
void NotifyRemoveRoute(Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse)
Notify route removing.