0

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?

Donal Fellows
  • 133,037
  • 18
  • 149
  • 215

1 Answers1

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