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

TCP monitor trace



Hi!!
    I have a strange question. when i trace throughput, it works
successfully on UDP. but now i wan to trace TCP flow. as it does need a
TCPSink then how could do to attach a loss monitor on it. the following
is my source code but it failed. If i take lossmonitor instead of
TCPSink it won't work as TCP does. hope someone could give me a hint!!
thanks
regards


############# Set up TCP/Tahoe Agent ##############
set tcp [new Agent/TCP]
$tcp set class_ 1
$tcp set fid_ 1

set sink [new Agent/TCPSink]
$ns attach-agent $n0 $tcp
$ns attach-agent $n3 $sink
$ns connect $tcp $sink

set loss1 [new Agent/LossMonitor]
$ns attach-agent $sink $loss1

set ftp [new Application/FTP]
$ftp attach-agent $tcp