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

Re: [ns] Initialisation of TCP Agent variables



check the following:

1. you derived from the right classes
2. look at ns-defaults.tcl to ensure that there are no default values
assigned. sometimes, the defaults are set at the otcl level. so you may
have to put some init code in ns-default.tcl

debo

On Wed, 14 Jun 2000, Sven Ostring wrote:

> I'm developing a flavour of TCP based on the Reno Agent, but I'm having 
> difficulty initialising variables for the basic TCP Agent.  Looking at 
> NewReno, these initalisations are simply inherited from Reno, but I've 
> also called the constructor for the Reno agent in the constructor for my 
> agent:
> 
> NewTcpAgent::NewTcpAgent() : RenoTcpAgent(), variable(0), (etc...) 
> {
>   ...
> }
> 
> However, it is obvious that variables are not being initialised.  For 
> example:
> 
> tcp_tick_ = 
> 30460464189311453658435289295240275330842364727644021878483696509513970204
> 43825911518540508490602178676317619040026624.000000
> 
> t_backoff = -4275384
> which results in the warning
> TcpAgent: negative RTO! (-0.300000)
> 
> Where does initialisation occur if NewRenoTcpAgent() does not invoke 
> RenoTcpAgent() which would invoke TcpAgent()?
> 
> Thanks,
> Sven.
> 
>