[Ns-bugs] [Bug 74] Redundant routing table lookup for setting src addr of outoging IP packets
bugzilla-daemon at nsnam-www.ece.gatech.edu
Fri Sep 14 03:56:11 PDT 2007
------- Comment #3 from gjcarneiro at gmail.com 2007-09-14 06:56 -------
OK, some more comments. I was looking to quickly implement the
RouteExpireCallback approach, but then I realized that a routing protocol will
have a hard time implementing this interface. In order for a routing protocol
to call RouteExpireCallback when route expires, it needs to keep a list of
RouteExpireCallbacks associated with every Ipv4Route, and call them all. This
adds a lot of complexity to the routing protocol, already complex enough. And
also the caller needs to the define two separate callbacks...
The other alternative appears simpler. The caller just stores the previous
route along with a timestamp, then for each packet requests a new route but
passing along the previous route and a timestamp. The routing protocol can
if (Simulator::Now () - timestamp < Seconds(2))
return previousRoute; // returns the cached result, very fast
// else the route has become stale and a new one needs to be looked up
This second alternative seems much simpler to implement. What do you think?
Configure bugmail: http://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the Ns-bugs