Bug 2546 - Add PrintRoutingChange and PrintRoutingChangeAll functions
Add PrintRoutingChange and PrintRoutingChangeAll functions
Product: ns-3
Classification: Unclassified
Component: routing
PC All
: P5 enhancement
Assigned To: ns-bugs
Depends on:
  Show dependency treegraph
Reported: 2016-11-06 08:00 EST by Robert Ammon
Modified: 2017-06-03 15:50 EDT (History)
2 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Robert Ammon 2016-11-06 08:00:02 EST
These API functions provide the ability to only print the routing table when it changes. They behave like PrintRoutingTableEvery and PrintRoutingTableAllEvery except if the routing table has not changed since the last time is was printed, no output is produced.  Currently these functions are only available for routing protocols that maintain state information in a routing table (AODV and DSDV).
Comment 1 Tommaso Pecorella 2016-11-06 09:50:36 EST
Well, technically al the routing protocols are using a routing table, and it should be quite easy to notify a change through a callback.

I'm gonna wait to see the implementation for AODV and DSDV, perhaps we can figure out something generic.
Comment 2 Robert Ammon 2016-11-06 11:02:27 EST
Changes uploaded as https://codereview.appspot.com/317900043/
Comment 3 Robert Ammon 2016-11-06 11:13:05 EST
The implementation submitted uses the same implementation as PrintRoutingTable(All)Every which is repetitive schedule at the user specified frequency and then saves a copy of the routing table to compare during the next call.

I considered using callbacks but struggled getting that implementation to work. There are lots of us of that in NS-3 but could not find an example that was appropriate for this type of situation.

If you can provide a simple example when one calls sets up a bound callback that another class could use to execute on a state change that would be extremely helpful and then I could implement for the other routing protocols.
Comment 4 Robert Ammon 2016-11-11 01:06:09 EST
Updated change set uploaded to remove periodic scheduling and generate output on routing changes.  Also implemented all models that actually implement PrintRoutingTable.
Comment 5 Tom Henderson 2017-06-03 15:50:07 EDT
Moving to patch pending (with unresolved comments in the code review issue)