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

[ns] Bind a new variable



>Hi everybody
>i am using ns-2.1b6 on Redhat Linux 6.0.
>I have modified the Jacobson /Karels RTT estimation algorithm and i have introduced a >new variable : oldt_.I am using a TCP/Reno but i have to define and bind the variable in >tcp.{cc,h}.Is it correct?
>I don't understand why xgraph is the same before and after the change of the >algorithm.
>I make these changes :
>at the end of the protected variables of TCPAgent in tcp.h i add the line
>                                              int oldt_;
>in constructor of TCP in tcp.cc i use the bind command  to bind the C++ >"oldt_"variable with the TCL "oldt_rtt_" variable
>                                      bind ("oldt_rtt_", &oldt_)
>in ns-default.tcl i initialise the bound variable, add the line
>                                Agent/TCP set timeout_ 0
>
>Where am I being wrong?
>Please,help me.                                                  Thank you in advance.