21 #include "ns3/node-list.h"
22 #include "ns3/simulator.h"
23 #include "ns3/ipv4-routing-protocol.h"
24 #include "ipv4-routing-helper.h"
28 Ipv4RoutingHelper::~Ipv4RoutingHelper ()
48 Simulator::Schedule (printInterval, &Ipv4RoutingHelper::PrintEvery,
this, printInterval, node, stream);
61 Simulator::Schedule (printInterval, &Ipv4RoutingHelper::PrintEvery,
this, printInterval, node, stream);
70 rp->PrintRoutingTable (stream);
74 Ipv4RoutingHelper::PrintEvery (Time printInterval, Ptr<Node> node, Ptr<OutputStreamWrapper> stream)
const
76 Ptr<Ipv4> ipv4 = node->GetObject<Ipv4> ();
77 Ptr<Ipv4RoutingProtocol> rp = ipv4->GetRoutingProtocol ();
79 rp->PrintRoutingTable (stream);
80 Simulator::Schedule (printInterval, &Ipv4RoutingHelper::PrintEvery,
this, printInterval, node, stream);
static uint32_t GetNNodes(void)
static Ptr< Node > GetNode(uint32_t n)
#define NS_ASSERT(condition)
static EventId Schedule(Time const &time, MEM mem_ptr, OBJ obj)
Access to the Ipv4 forwarding table, interfaces, and configuration.
void PrintRoutingTableAllAt(Time printTime, Ptr< OutputStreamWrapper > stream) const
prints the routing tables of all nodes at a particular time.
void PrintRoutingTableAt(Time printTime, Ptr< Node > node, Ptr< OutputStreamWrapper > stream) const
prints the routing tables of a node at a particular time.
void PrintRoutingTableAllEvery(Time printInterval, Ptr< OutputStreamWrapper > stream) const
prints the routing tables of all nodes at regular intervals specified by user.
void PrintRoutingTableEvery(Time printInterval, Ptr< Node > node, Ptr< OutputStreamWrapper > stream) const
prints the routing tables of a node at regular intervals specified by user.
Ptr< T > GetObject(void) const