21 #include "ns3/ipv4-list-routing.h" 22 #include "ns3/ipv4-routing-protocol.h" 76 virtual void DoRun (
void);
80 :
TestCase (
"Check negative priorities")
110 virtual void DoRun (
void);
114 :
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.
IPv4 dummy routing class (A)
IPv4 dummy routing class (B)
IPv4 ListRouting TestSuite.
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)
void PrintRoutingTable(Ptr< OutputStreamWrapper > stream, Time::Unit unit) const
Print the Routing Table entries.
void PrintRoutingTable(Ptr< OutputStreamWrapper > stream, Time::Unit unit) const
Print the Routing Table entries.
IPv4 ListRouting negative test.
SocketErrno
Enumeration of the possible errors returned by a socket.
Ipv4ListRoutingTestSuite()
void NotifyAddAddress(uint32_t interface, Ipv4InterfaceAddress address)
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
IPv4 ListRouting positive test.
void NotifyAddAddress(uint32_t interface, Ipv4InterfaceAddress address)
Ipv4ListRoutingPositiveTestCase()
#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.
void NotifyInterfaceDown(uint32_t interface)
void NotifyRemoveAddress(uint32_t interface, Ipv4InterfaceAddress address)
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void NotifyInterfaceUp(uint32_t interface)
void NotifyInterfaceDown(uint32_t interface)
Ipv4ListRoutingNegativeTestCase()
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.
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...
void NotifyInterfaceUp(uint32_t interface)
static Ipv4ListRoutingTestSuite g_ipv4ListRoutingTestSuite
Static variable for test initialization.
This test suite implements a Unit Test.
virtual uint32_t GetNRoutingProtocols(void) const
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)