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

[ns] A few issues (fulltcp, parameters...) related to webtraf.**



I recently downloaded ns-2.1b8 (released June 06, '01) and modified
the webtraf.** to support FullTcp. When the code tried to recycle a
FullTcp agent for multiple connections, I ran into the error that the
agent was not listening. Then I traced the FullTcpAgent code, it seems
that in FullTcpAgent, the "closed_" member variable is
redeclared. But, in the member function FullTcpAgent::reset(), this
variable is not reset (it calls the parent's reset function, which
resets its own "closed_" variable and does not reset the child's
"closed_" variable.). Therefore, if we want to reuse the same Fulltcp
agent for multiple connections, as the example shown in
tcl/ex/web-traffic.tcl, the closed_ remains 1 after
FullTcpAgent::reset() is called . In finish(), we will never reach the
point where the "done" procedure declared in tcl is called. It seems
to me there is no reason to redeclare the variable "closed_" again in
FullTcpAgent.

Another problem is in the code tcpapp.cc, the "send" command is
allowed to have 3 args, which will call "send(size, NULL)". However,
in "send" procedure, there is no sanity checking for the pointer. I
ran into this problem when the tcpapp only sent something but didnot
register a callback. Below is the diff.

Index: tcpapp.cc
===================================================================
RCS file: /homes/yxw/cvsroot/ns-2/webcache/tcpapp.cc,v
retrieving revision 1.1
diff -r1.1 tcpapp.cc
35,36c35,39
<       size_ = c->size();
<       if (size_ > 0) 
---
>       // BUG fixed by Xiaowei. send() may be called by 3 args
>       // only. Then c is NULL. Should do a sanity check.
> //    size_ = c->size();
> //    if (size_ > 0)
>       if ( (c != NULL) && ((size_ = c->size()) > 0))
261c268,270
<               Tcl::instance().eval(tmp->str());
---
>               char* tmp1;
>               if ((tmp != NULL)  && (( tmp1 = tmp->str()) != NULL))
>                       Tcl::instance().eval(tmp1);
263a273
> 

And, in the example tcl/ex/large-scale-web-traffic.tcl, the
"interSession" random variable is used as the interarrival random
variable for the aggregated session arrivals among all clients. Does
anyone know what is the distribution of a client's session arrivals
(the average value)?  Any useful reference?

Moreover, does anyone know, how the increasing deployment of HTTP1.1
changes the size distribution of a connection? I would like to have
some updated parameters for my simulations. 

	 Thanks,
	--Xiaowei