|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
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")
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)
void NotifyInterfaceUp(uint32_t interface)
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
virtual void AddRoutingProtocol(Ptr< Ipv4RoutingProtocol > routingProtocol, int16_t priority)
Register a new routing protocol to be used in this IPv4 stack.
SocketErrno
Enumeration of the possible errors returned by a socket.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void NotifyRemoveAddress(uint32_t interface, Ipv4InterfaceAddress address)
IPv4 ListRouting positive test.
IPv4 ListRouting TestSuite.
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.
void NotifyInterfaceDown(uint32_t interface)
void NotifyAddAddress(uint32_t interface, Ipv4InterfaceAddress address)
void NotifyInterfaceDown(uint32_t interface)
Smart pointer class similar to boost::intrusive_ptr.
void PrintRoutingTable(Ptr< OutputStreamWrapper > stream, Time::Unit unit) const
Print the Routing Table entries.
Ipv4ListRoutingNegativeTestCase()
void PrintRoutingTable(Ptr< OutputStreamWrapper > stream, Time::Unit unit) const
Print the Routing Table entries.
void NotifyInterfaceUp(uint32_t interface)
virtual void DoRun(void)
Implementation to actually run this TestCase.
a class to store IPv4 address information on an interface
void NotifyRemoveAddress(uint32_t interface, Ipv4InterfaceAddress address)
void NotifyAddAddress(uint32_t interface, Ipv4InterfaceAddress address)
IPv4 ListRouting negative test.
Abstract base class for IPv4 routing protocols.
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
This test suite implements a Unit Test.
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.
void SetIpv4(Ptr< Ipv4 > ipv4)
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)
static Ipv4ListRoutingTestSuite g_ipv4ListRoutingTestSuite
Static variable for test initialization.
void SetIpv4(Ptr< Ipv4 > ipv4)
virtual void DoRun(void)
Implementation to actually run this TestCase.
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...
Unit
The unit to use to interpret a number representing time.
virtual uint32_t GetNRoutingProtocols(void) const
IPv4 dummy routing class (B)
IPv4 dummy routing class (A)