Bug 1058 - InternetStackHelper pitfall: calling Install before adding routing protocols
InternetStackHelper pitfall: calling Install before adding routing protocols
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: internet
ns-3-dev
All All
: P5 normal
Assigned To: ns-bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-02-21 11:03 UTC by Gustavo J. A. M. Carneiro
Modified: 2011-05-13 01:48 UTC (History)
1 user (show)

See Also:


Attachments
add comment to examples (6.68 KB, patch)
2011-02-22 14:19 UTC, Gustavo J. A. M. Carneiro
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gustavo J. A. M. Carneiro 2011-02-21 11:03:09 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...
Comment 1 Tom Henderson 2011-02-21 23:47:16 UTC
(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?
Comment 2 Gustavo J. A. M. Carneiro 2011-02-22 05:39:56 UTC
(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.
Comment 3 Gustavo J. A. M. Carneiro 2011-02-22 14:19:40 UTC
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()
Comment 4 Tom Henderson 2011-05-13 01:48:55 UTC
changeset: 43d2fb5bfb12