Bugzilla – Bug 1058
InternetStackHelper pitfall: calling Install before adding routing protocols
Last modified: 2011-05-13 01:48:55 UTC
I have seen more than once people asking me for help in ns-3 because (it turned out) that they called Install() of an InternetStackHelper object, and only after did they configure the routing protocol. I wonder if it makes sense to prevent modification of an InternetStackHelper object after the first time it is Install'ed? It should be simple to implement, and could be helpful to prevent newbie mistakes...
(In reply to comment #0) > I have seen more than once people asking me for help in ns-3 because (it turned > out) that they called Install() of an InternetStackHelper object, and only > after did they configure the routing protocol. > > I wonder if it makes sense to prevent modification of an InternetStackHelper > object after the first time it is Install'ed? It should be simple to > implement, and could be helpful to prevent newbie mistakes... However, I have used the same helper to configure different nodes in different ways (e.g. change routing or change TCP, and install on a different set of nodes), so I would be a bit leery of such a change. Is there possibly some routing-related example file that is often cloned and modified in the wrong way that we could perhaps add more explicit documentation about Install?
(In reply to comment #1) > (In reply to comment #0) > > I have seen more than once people asking me for help in ns-3 because (it turned > > out) that they called Install() of an InternetStackHelper object, and only > > after did they configure the routing protocol. > > > > I wonder if it makes sense to prevent modification of an InternetStackHelper > > object after the first time it is Install'ed? It should be simple to > > implement, and could be helpful to prevent newbie mistakes... > > However, I have used the same helper to configure different nodes in different > ways (e.g. change routing or change TCP, and install on a different set of > nodes), so I would be a bit leery of such a change. If you used the helper in that way, than there's no way we can fix without breaking lots of existing script. I honestly thought no one used it that way, but if it is, then it's not worth it IMHO. > Is there possibly some > routing-related example file that is often cloned and modified in the wrong way > that we could perhaps add more explicit documentation about Install? Perhaps. I'll look again later.
Created attachment 1037 [details] add comment to examples I guess adding a simple comment like this might help newbies. internet_olsr.SetRoutingHelper (list); // has effect on the next Install()
changeset: 43d2fb5bfb12