21 #include "ns3/ipv4-list-routing.h"
22 #include "ns3/ipv4-routing-protocol.h"
58 virtual void DoRun (
void);
61 Ipv4ListRoutingNegativeTestCase::Ipv4ListRoutingNegativeTestCase()
62 :
TestCase (
"Check negative priorities")
76 NS_TEST_ASSERT_MSG_EQ (num, 2,
"XXX");
78 NS_TEST_ASSERT_MSG_EQ (-5, first,
"XXX");
79 NS_TEST_ASSERT_MSG_EQ (firstRp, bRouting,
"XXX");
86 virtual void DoRun (
void);
89 Ipv4ListRoutingPositiveTestCase::Ipv4ListRoutingPositiveTestCase()
90 :
TestCase (
"Check positive priorities")
106 NS_TEST_ASSERT_MSG_EQ (num, 2,
"XXX");
108 NS_TEST_ASSERT_MSG_EQ (10, first,
"XXX");
109 NS_TEST_ASSERT_MSG_EQ (firstRp, aRouting,
"XXX");
111 NS_TEST_ASSERT_MSG_EQ (5, second,
"XXX");
112 NS_TEST_ASSERT_MSG_EQ (secondRp, bRouting,
"XXX");
125 } g_ipv4ListRoutingTestSuite;
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
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)
TestSuite(std::string name, Type type=UNIT)
Constuct a new test suite.
void NotifyAddAddress(uint32_t interface, Ipv4InterfaceAddress address)
void NotifyAddAddress(uint32_t interface, Ipv4InterfaceAddress address)
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)
void AddTestCase(TestCase *testCase) NS_DEPRECATED
Add an individual test case to this test suite.
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 test case.
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 test case.
Abstract base class for IPv4 routing protocols.
void NotifyInterfaceUp(uint32_t interface)
void PrintRoutingTable(Ptr< OutputStreamWrapper > stream) const
Print the Routing Table entries.
void PrintRoutingTable(Ptr< OutputStreamWrapper > stream) const
Print the Routing Table entries.
void NotifyRemoveAddress(uint32_t interface, Ipv4InterfaceAddress address)
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)