Bugzilla – Bug 1296
Enhancement in Internet module
Last modified: 2013-07-27 18:02:10 UTC
The following commits slightly modify internals of Internet and Network modules: https://bitbucket.org/cawka/ns-3-dev/changeset/0d7805b771d3 https://bitbucket.org/cawka/ns-3-dev/changeset/f6efe075519f
https://bitbucket.org/cawka/ns-3-dev/changeset/0d7805b771d3 Integrated in changeset 7758 - c678188af993
About https://bitbucket.org/cawka/ns-3-dev/changeset/f6efe075519f This contains two separate enhancements: one (print metric infos) is going to be patched soon by http://codereview.appspot.com/5784068/ The other one is a GetRouting helper function. I don't have anything against this one, but please make one similar for IPv6. The only drawback I see, tho, is that the helper function needs to include the listrouting. Not a biggie tho. There are two other "minor" things included there: 1) a change that seems more like an optimization rather than anything else, and 2) a change from private to protected of a bunch of member variables in IPv4StaticRouting. I don't mind the optimization, but I *do* mind the change from private to protected. Summarizing: +1 for the GetRouting Helper function, but do it for IPv6 as well please. +1 for the optimization in Ipv4StaticRouting::PrintRoutingTable (as above, check if the v6 one can be optimized as well). -1 for the private to protected Last but not least: do two separate commits, don't mix optimizations with new APIs.
Created attachment 1381 [details] Patch implementing GetRouting calls for Ipv4RoutingHelper and Ipv6RoutingHelper Here is the patch that implements only Ipv4RoutingHelper<T>::GetRouting (ptr) and Ipv6RoutingHelper<T>::GetRouting (ptr) methods.
+1 T.
(In reply to comment #4) > +1 > > T. There is a small copy/paste error in the IPv6 version of doxygen (referencing IPv4)-- otherwise, I support merging it.
Any reason not to commit this for upcoming release build?
(In reply to comment #6) > Any reason not to commit this for upcoming release build? None from my side. T.
Pushed in changeset: 9918:dc9ec9fb4578
I just noticed that this patch was applied in a modified form, which I believe would not work. That is, the new static method is templated method: + template<class T> + static Ptr<T> GetRouting (Ptr<Ipv4RoutingProtocol> protocol); In other words, it has to have implementation inside the header file. Right now, it is "implemented" in .cc file, which is kind of meaningless for templated functions: any attempt would result in unresolved symbol error (I guess nobody used it for now, so it was ok...)
You're totally right. I didn't notice they was templates. changeset: 9976:ddcab0ac2e27