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")
117 virtual void DoRun (
void);
121 :
TestCase (
"Check positive priorities")
Smart pointer class similar to boost::intrusive_ptr.
Ipv6ListRoutingNegativeTestCase()
virtual Ptr< Ipv6RoutingProtocol > GetRoutingProtocol(uint32_t index, int16_t &priority) const
Get pointer to routing protocol stored at index,.
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.
IPv6 ListRouting negative test.
void NotifyInterfaceUp(uint32_t interface)
Notify when specified interface goes UP.
SocketErrno
Enumeration of the possible errors returned by a socket.
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 TestCase.
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.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
IPv6 ListRouting positive test.
virtual void PrintRoutingTable(Ptr< OutputStreamWrapper > stream, Time::Unit unit) const
Print the Routing Table entries.
#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.
Unit
The unit to use to interpret a number representing time.
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.
virtual void PrintRoutingTable(Ptr< OutputStreamWrapper > stream, Time::Unit unit) const
Print the Routing Table entries.
void NotifyAddRoute(Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse=Ipv6Address::GetZero())
Notify a new route.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
IPv6 dummy routing class (A)
IPv6 dummy routing class (B)
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 uint32_t GetNRoutingProtocols(void) const
Get the number of routing protocols.
virtual void DoRun(void)
Implementation to actually run this TestCase.
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)
Ipv6ListRoutingPositiveTestCase()
Describes an IPv6 address.
Describes an IPv6 prefix.
This test suite implements a Unit Test.
Ipv6ListRoutingTestSuite()
Abstract base class for IPv6 routing protocols.
IPv6 ListRouting TestSuite.
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.
static Ipv6ListRoutingTestSuite g_ipv6ListRoutingTestSuite
Static variable for test initialization.
void NotifyRemoveRoute(Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse)
Notify route removing.