Print routing table entries of each node

118 views
Skip to first unread message

Sabniveesu Shashank

unread,
Jul 21, 2014, 2:49:30 PM7/21/14
to ns-3-...@googlegroups.com
Hi!

I need to 'print the routing table entries at each node' in a mobile
network that uses OLSR.

I have implemented 'OLSR in a mobile network' using 'MobilityHelper' and
'OlsrHelper'.

Now I am using 'Dump()' from olsr::RoutingProtocol to achieve my aim yet I
don't see any output.

What am I doing wrong?

Please respond

-- Shashank

Tommaso Pecorella

unread,
Jul 21, 2014, 3:35:14 PM7/21/14
to ns-3-...@googlegroups.com
Hi,

try the following function of Ipv4RoutingHelper:
  /**
   * \brief prints the routing tables of all nodes at a particular time.
   * \param printTime the time at which the routing table is supposed to be printed.
   * \param stream The output stream object to use
   *
   * This method calls the PrintRoutingTable() method of the
   * Ipv4RoutingProtocol stored in the Ipv4 object, for all nodes at the
   * specified time; the output format is routing protocol-specific.
   */

 
void PrintRoutingTableAllAt (Time printTime, Ptr<OutputStreamWrapper> stream) const;


 
/**
   * \brief prints the routing tables of all nodes at regular intervals specified by user.
   * \param printInterval the time interval for which the routing table is supposed to be printed.
   * \param stream The output stream object to use
   *
   * This method calls the PrintRoutingTable() method of the
   * Ipv4RoutingProtocol stored in the Ipv4 object, for all nodes at the
   * specified time interval; the output format is routing protocol-specific.
   */

 
void PrintRoutingTableAllEvery (Time printInterval, Ptr<OutputStreamWrapper> stream) const;


 
/**
   * \brief prints the routing tables of a node at a particular time.
   * \param printTime the time at which the routing table is supposed to be printed.
   * \param node The node ptr for which we need the routing table to be printed
   * \param stream The output stream object to use
   *
   * This method calls the PrintRoutingTable() method of the
   * Ipv4RoutingProtocol stored in the Ipv4 object, for the selected node
   * at the specified time; the output format is routing protocol-specific.
   */

 
void PrintRoutingTableAt (Time printTime, Ptr<Node> node, Ptr<OutputStreamWrapper> stream) const;


 
/**
   * \brief prints the routing tables of a node at regular intervals specified by user.
   * \param printInterval the time interval for which the routing table is supposed to be printed.
   * \param node The node ptr for which we need the routing table to be printed
   * \param stream The output stream object to use
   *
   * This method calls the PrintRoutingTable() method of the
   * Ipv4RoutingProtocol stored in the Ipv4 object, for the selected node
   * at the specified interval; the output format is routing protocol-specific.
   */

 
void PrintRoutingTableEvery (Time printInterval, Ptr<Node> node, Ptr<OutputStreamWrapper> stream) const;

Cheers,

T.
Reply all
Reply to author
Forward
0 new messages