i have simulated a 2 node tcp based communication with duplex link and queue in NS2 using TCL script. And i want to access the current queue size during communication of the nodes. so how can i access the current queue size and assign it into a variable?
Asked
Active
Viewed 1,599 times
1 Answers
0
Use this codeto get cwnd size on terminal.
proc plotWindow {tcpSource outfile} {
global ns
set now [$ns now]
set cwnd [$tcpSource set cwnd_]
puts $outfile "$now $cwnd"
$ns at [expr $now+0.1] "plotWindow $tcpSource $outfile"
}
$ns at 0.0 "plotWindow $tcp1 stdout"

nimesh
- 1
- 3