22 #include "ns3/node-list.h"
23 #include "ns3/simulator.h"
24 #include "ns3/ipv4-routing-protocol.h"
25 #include "ns3/ipv4-list-routing.h"
26 #include "ns3/ipv4-l3-protocol.h"
27 #include "ns3/ipv4-interface.h"
28 #include "ns3/arp-cache.h"
29 #include "ns3/names.h"
76 rp->PrintRoutingTable (stream);
85 rp->PrintRoutingTable (stream);
126 *os <<
"ARP Cache of node ";
134 *os << static_cast<int> (node->
GetId ());
139 for (uint32_t i=0; i<ipv4->GetNInterfaces(); i++)
141 Ptr<ArpCache> arpCache = ipv4->GetInterface (i)->GetArpCache ();
154 *os <<
"ARP Cache of node ";
162 *os << static_cast<int> (node->
GetId ());
167 for (uint32_t i=0; i<ipv4->GetNInterfaces(); i++)
169 Ptr<ArpCache> arpCache = ipv4->GetInterface (i)->GetArpCache ();
static void Print(Ptr< Node > node, Ptr< OutputStreamWrapper > stream)
prints the routing tables of a node.
static void PrintNeighborCacheAllAt(Time printTime, Ptr< OutputStreamWrapper > stream)
prints the neighbor cache of all nodes at a particular time.
Simulation virtual time values and global simulation resolution.
static uint32_t GetNNodes(void)
static void PrintNeighborCacheAllEvery(Time printInterval, Ptr< OutputStreamWrapper > stream)
prints the neighbor cache of all nodes at regular intervals specified by user.
void PrintArpCache(Ptr< OutputStreamWrapper > stream)
Print the ARP cache entries.
virtual ~Ipv4RoutingHelper()
static Ptr< Node > GetNode(uint32_t n)
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
static void PrintRoutingTableAllEvery(Time printInterval, Ptr< OutputStreamWrapper > stream)
prints the routing tables of all nodes at regular intervals specified by user.
static void PrintNeighborCacheEvery(Time printInterval, Ptr< Node > node, Ptr< OutputStreamWrapper > stream)
prints the neighbor cache of a node at regular intervals specified by user.
static EventId Schedule(Time const &time, MEM mem_ptr, OBJ obj)
Schedule an event to expire at the relative time "time" is reached.
double GetSeconds(void) const
Get an approximation of the time stored in this instance in the indicated unit.
static void PrintEvery(Time printInterval, Ptr< Node > node, Ptr< OutputStreamWrapper > stream)
prints the routing tables of a node at regular intervals specified by user.
static void PrintArpCacheEvery(Time printInterval, Ptr< Node > node, Ptr< OutputStreamWrapper > stream)
prints the neighbor cache of a node at regular intervals specified by user.
Access to the Ipv4 forwarding table, interfaces, and configuration.
Implement the Ipv4 layer.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
static void PrintRoutingTableAllAt(Time printTime, Ptr< OutputStreamWrapper > stream)
prints the routing tables of all nodes at a particular time.
static Time Now(void)
Return the current simulation virtual time.
uint32_t GetId(void) const
static void PrintArpCache(Ptr< Node > node, Ptr< OutputStreamWrapper > stream)
prints the neighbor cache of a node.
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...
Ptr< T > GetObject(void) const
Get a pointer to the requested aggregated Object.
static void PrintRoutingTableEvery(Time printInterval, Ptr< Node > node, Ptr< OutputStreamWrapper > stream)
prints the routing tables of a node at regular intervals specified by user.
std::ostream * GetStream(void)
Return a pointer to an ostream previously set in the wrapper.
static void PrintNeighborCacheAt(Time printTime, Ptr< Node > node, Ptr< OutputStreamWrapper > stream)
prints the neighbor cache of a node at a particular time.
static void PrintRoutingTableAt(Time printTime, Ptr< Node > node, Ptr< OutputStreamWrapper > stream)
prints the routing tables of a node at a particular time.