21 #include "ns3/ipv4-list-routing.h"
22 #include "ns3/ipv4-routing-protocol.h"
58 virtual void DoRun (
void);
62 :
TestCase (
"Check negative priorities")
86 virtual void DoRun (
void);
90 :
TestCase (
"Check positive priorities")
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.
virtual Ptr< Ipv4RoutingProtocol > GetRoutingProtocol(uint32_t index, int16_t &priority) const
Return pointer to routing protocol stored at index, with the first protocol (index 0) the highest pri...
virtual void AddRoutingProtocol(Ptr< Ipv4RoutingProtocol > routingProtocol, int16_t priority)
Register a new routing protocol to be used in this IPv4 stack.
void SetIpv4(Ptr< Ipv4 > ipv4)
SocketErrno
Enumeration of the possible errors returned by a socket.
Ipv4ListRoutingTestSuite()
void NotifyAddAddress(uint32_t interface, Ipv4InterfaceAddress address)
void NotifyAddAddress(uint32_t interface, Ipv4InterfaceAddress address)
Ipv4ListRoutingPositiveTestCase()
void NotifyInterfaceDown(uint32_t interface)
void NotifyRemoveAddress(uint32_t interface, Ipv4InterfaceAddress address)
virtual uint32_t GetNRoutingProtocols(void) const
void NotifyInterfaceUp(uint32_t interface)
void NotifyInterfaceDown(uint32_t interface)
Ipv4ListRoutingNegativeTestCase()
void AddTestCase(TestCase *testCase) NS_DEPRECATED
Add an individual child TestCase case to this TestCase.
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.
virtual void DoRun(void)
Implementation to actually run this TestCase.
void SetIpv4(Ptr< Ipv4 > ipv4)
a class to store IPv4 address information on an interface
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)
virtual void DoRun(void)
Implementation to actually run this TestCase.
Abstract base class for IPv4 routing protocols.
Ipv4ListRoutingTestSuite g_ipv4ListRoutingTestSuite
void NotifyInterfaceUp(uint32_t interface)
void PrintRoutingTable(Ptr< OutputStreamWrapper > stream) const
Print the Routing Table entries.
This test suite implements a Unit Test.
void PrintRoutingTable(Ptr< OutputStreamWrapper > stream) const
Print the Routing Table entries.
void NotifyRemoveAddress(uint32_t interface, Ipv4InterfaceAddress address)
#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.
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)