[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ns] Location of TCP Clock granularity Initialisation




The Tcl-level initialization takes precidence over the C++ constructor
(for bound variables there shouldn't be C++ constructor statements
because they're misleading).

Since TCP now uses delay binding by default, it's the call in
delay_bind_init_all() that actually ends up doing the work.  The
bind() code used to do this but is now ifdef'ed out.  (We're migrating
from bind() to delay_bind to save memory.)  (The bind's in TCP will be
gone in the next release because they're misleading.)

   -John


> There appears to be 3 places where variables can be initialised for the
> TCP agent:
>
> (1) Constructor
> TcpAgent::TcpAgent() : Agent(PT_TCP),
>         t_seqno_(0), t_rtt_(0)
>
> (2) Constructor - from initialisations in ns-default.tcl
>         bind("t_seqno_", &t_seqno_);
>
> (3) Method
> void TcpAgent::delay_bind_init_all()
> { // Defaults for bound variables should be set in ns-default.tcl.
>   delay_bind_init_one("window_");
>
> Why isn't (for example) the clock granularity tcp_tick_ bound in the
> constructor, but rather in the method delay_bin_init_all()?
>
> Sven.