[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
simple code-no outpuit-help!
Hi :
I have created a simple 2 node network and tcp agents to un an ftp applications. but there is no trace produced. can some one tell me what i am doing wrong.
thanks
Sid
----------------------code-----------------------
set ns [new Simulator]
set nf [open out.nam w]
proc finish {} {
global ns nf
$ns flush-trace
close $nf
exec nam out.nam &
exit 0
}
set node0 [$ns node]
set node1 [$ns node]
$ns duplex-link $node0 $node1 1Mb 10ms DropTail
set src [new Agent/TCP/FullTcp]
set sink [new Agent/TCP/FullTcp]
$ns attach-agent $node0 $src
$ns attach-agent $node1 $sink
$ns connect $src $sink
$sink listen;
$src set window_ 100
set ftp1 [new Application/FTP]
$ftp1 attach-agent $src
Application/FTP instproc start {} {
[$self agent] send -1;
}
$ns namtrace-all $nf
$ns at 0.0 "ftp start"
$ns at 10.0 "finish"