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

RE: [ns] Serializing TCP Communications



Sorry about the blank message.
This is what I sent.

Where am I misunderstanding.

I have a TCP/FullTcp agent called tcp0
When that agent finishes sending it executes FullTcpAgent::finish()
Tcl::instance().evalf("%s done", this->name()); is called.
Is this equivalent to:

$tcp0 done
or
tcp0 done

in the Tcl script?
I wasn't sure so I added both:

Agent/TCP/FullTcp instproc done {} { ... }
and
proc "tcp0 done" {} { ... }

to my Tcl script, but neither are ever called.

The functions work if tested with:
$ns at 0.5 "$tcp0 done"
$ns at 0.5 "\"tcp0 done\""

Do I need to tell tcp0 do disconnect after sending, so the
TCP connection is actually brought down?

Currently I'm only doing
$ns at 0.05 "$ftp0 produce 80"
# ftp0 is a source attached to tcp0

Please help

Chad

-----Original Message-----
From: [email protected] [mailto:[email protected]]On Behalf Of
Ratul Mahajan
Sent: Saturday, October 28, 2000 11:48 PM
To: Chad Fox
Cc: [email protected]
Subject: Re: [ns] Serializing TCP Communications



Take a look at the "done" function of TCP. This is an upcall to Tcl when
the tranfer ends (receipt of last ack). You could define your own "done"
function in Tcl in which you connect your source TCP agent to the
sink of the next node and so on.

	-ratul

On Sat, 28 Oct 2000, Chad Fox wrote:

> I would like to simulate a collection of nodes that each have a
> list of communications to perform.
>
> A given node may have a list of tasks as follows:
> - Send n packets to node i
> - Send m packets to node j
> - Send p packets to node k
>
> I need to tell the node to start it's communication and have it
> proceed with the communications serially. Only when the first task is
> completed, can it begin the next task. In other words, the node MUST wait
> until all communication has been completed before moving on
> (that is, ACKs must be received before starting the new task).
>
> Is there a why that this can be implemented in a tcl script so that
> multiple nodes can serialize their tasks?
>
> Thank you,
>
> Chad
>
>