11#include "ns3/arp-cache.h"
12#include "ns3/ipv4-interface.h"
13#include "ns3/ipv4-l3-protocol.h"
14#include "ns3/ipv4-list-routing.h"
15#include "ns3/ipv4-routing-protocol.h"
17#include "ns3/node-list.h"
19#include "ns3/simulator.h"
88 rp->PrintRoutingTable(stream, unit);
103 rp->PrintRoutingTable(stream, unit);
171 std::ostream* os = stream->GetStream();
173 *os <<
"ARP Cache of node ";
181 *os << static_cast<int>(node->GetId());
185 for (
uint32_t i = 0; i < ipv4->GetNInterfaces(); i++)
187 Ptr<ArpCache> arpCache = ipv4->GetInterface(i)->GetArpCache();
190 arpCache->PrintArpCache(stream);
205 std::ostream* os = stream->GetStream();
207 *os <<
"ARP Cache of node ";
215 *os << static_cast<int>(node->GetId());
219 for (
uint32_t i = 0; i < ipv4->GetNInterfaces(); i++)
221 Ptr<ArpCache> arpCache = ipv4->GetInterface(i)->GetArpCache();
224 arpCache->PrintArpCache(stream);
Access to the IPv4 forwarding table, interfaces, and configuration.
Implement the IPv4 layer.
static void PrintRoutingTableAt(Time printTime, Ptr< Node > node, Ptr< OutputStreamWrapper > stream, Time::Unit unit=Time::S)
prints the routing tables of a node at a particular time.
static void PrintRoutingTableAllAt(Time printTime, Ptr< OutputStreamWrapper > stream, Time::Unit unit=Time::S)
prints the routing tables of all nodes at a particular time.
static void PrintArpCache(Ptr< Node > node, Ptr< OutputStreamWrapper > stream, Time::Unit unit=Time::S)
prints the neighbor cache of a node.
static void PrintNeighborCacheAllEvery(Time printInterval, Ptr< OutputStreamWrapper > stream, Time::Unit unit=Time::S)
prints the neighbor cache of all nodes at regular intervals specified by user.
static void PrintEvery(Time printInterval, Ptr< Node > node, Ptr< OutputStreamWrapper > stream, Time::Unit unit=Time::S)
prints the routing tables of a node at regular intervals specified by user.
virtual ~Ipv4RoutingHelper()
static void PrintNeighborCacheEvery(Time printInterval, Ptr< Node > node, Ptr< OutputStreamWrapper > stream, Time::Unit unit=Time::S)
prints the neighbor cache of a node at regular intervals specified by user.
static void Print(Ptr< Node > node, Ptr< OutputStreamWrapper > stream, Time::Unit unit=Time::S)
prints the routing tables of a node.
static void PrintNeighborCacheAt(Time printTime, Ptr< Node > node, Ptr< OutputStreamWrapper > stream, Time::Unit unit=Time::S)
prints the neighbor cache of a node at a particular time.
static void PrintArpCacheEvery(Time printInterval, Ptr< Node > node, Ptr< OutputStreamWrapper > stream, Time::Unit unit=Time::S)
prints the neighbor cache of a node at regular intervals specified by user.
static void PrintNeighborCacheAllAt(Time printTime, Ptr< OutputStreamWrapper > stream, Time::Unit unit=Time::S)
prints the neighbor cache of all nodes at a particular time.
static void PrintRoutingTableEvery(Time printInterval, Ptr< Node > node, Ptr< OutputStreamWrapper > stream, Time::Unit unit=Time::S)
prints the routing tables of a node at regular intervals specified by user.
static void PrintRoutingTableAllEvery(Time printInterval, Ptr< OutputStreamWrapper > stream, Time::Unit unit=Time::S)
prints the routing tables of all nodes at regular intervals specified by user.
static std::string FindName(Ptr< Object > object)
Given a pointer to an object, look to see if that object has a name associated with it and,...
static uint32_t GetNNodes()
static Ptr< Node > GetNode(uint32_t n)
Smart pointer class similar to boost::intrusive_ptr.
static EventId Schedule(const Time &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
static Time Now()
Return the current simulation virtual time.
Simulation virtual time values and global simulation resolution.
double GetSeconds() const
Get an approximation of the time stored in this instance in the indicated unit.
Unit
The unit to use to interpret a number representing time.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
Every class exported by the ns3 library is enclosed in the ns3 namespace.