[Ns-developers] ns-3 tcp implementation
mathieu.lacage at sophia.inria.fr
Sun Jan 13 08:09:21 PST 2008
On Sat, 2008-01-12 at 15:57 -0800, Tom Henderson wrote:
> > The way you use DefaultValues is a bit on the edge I think: you seem to
> > be using them to initialize each Socket when it is created. This means
> > that, while the simulation is running, if someone creates a new Socket,
> > this Socket will be influenced by the state of the DefaultValues.
> Why do you think this is on the edge? This is how many of the default
> values for ns-2 are used. See, for instance, ns-2/tcp/tcp.cc
I thought that we had agreed that default values should have a
construct-only impact. Here, the impact is going to be
post-topology-construction too because you can create a socket at any
time, including _after_ the topology is created and during the
simulation. Furthermore, it is seriously bad taste to export static
global variables in public API.
You raise another issue which is that ns-2 does this anyway. Well, ns-2
does lots of questionable things so, I don't think that it is a good
idea to attempt to copy it blindly.
More information about the Ns-developers