Bugzilla – Full Text Bug Listing |
Summary: | enable OLSR HNA table access | ||
---|---|---|---|
Product: | ns-3 | Reporter: | Tom Henderson <tomh> |
Component: | olsr | Assignee: | Lalith Suresh <suresh.lalith> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | CC: | gjcarneiro, ns-bugs, tommaso.pecorella |
Priority: | P5 | ||
Version: | pre-release | ||
Hardware: | PC | ||
OS: | Linux | ||
Attachments: | suggested patch |
Description
Tom Henderson
2014-03-10 00:23:23 EDT
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 |