Bugzilla – Bug 1876
enable OLSR HNA table access
Last modified: 2014-04-29 14:44:19 EDT
Suggested by Christopher Kosecki here: http://mailman.isi.edu/pipermail/ns-developers/2014-March/011800.html
Created attachment 1797 [details] suggested patch
I'm not sure if, with the provided pinter, the caller could mess up with the HNA data. I'd suggets to return a copy of the object, rather than the object itself. T.
(In reply to Tommaso Pecorella from comment #2) > I'm not sure if, with the provided pinter, the caller could mess up with the > HNA data. > I'd suggets to return a copy of the object, rather than the object itself. > > T. I agree about providing read-only access. How about instead of returning an object copy, to use: Ptr<const Ipv4StaticRouting> GetRoutingTableAssociation () const; This should give access to the PrintRoutingTable() and GetRoute()/GetNRoutes() methods.
(In reply to Tom Henderson from comment #3) > (In reply to Tommaso Pecorella from comment #2) > > I'm not sure if, with the provided pinter, the caller could mess up with the > > HNA data. > > I'd suggets to return a copy of the object, rather than the object itself. > > > > T. > > I agree about providing read-only access. How about instead of returning an > object copy, to use: > > Ptr<const Ipv4StaticRouting> GetRoutingTableAssociation () const; > > This should give access to the PrintRoutingTable() and > GetRoute()/GetNRoutes() methods. Seems a good solution.
+1. Feel free to commit.
changeset: 10709:82c7c2aabbb1