[ns] Calculate link bandwidth in C++

Lee yli@gpu.srv.ualberta.ca
Wed, 31 Jan 2001 23:09:45 -0700 (MST)


Hi,

I want to get the bandwidth of some link in C++
however the following instproc failed.
(Called by evalf(), it always returns 1000.)
Would you like to tell me how to do that?
Thanks,

Lee

SimpleLink instproc bandwidth? {} {
	$self instvar bandwidth_
	if ![info exists bandwidth_] {
		set bandwidth_ 1000
	}
	set bandwidth_
}

Link is created using
$ns duplex-link $src $dst $bw $delay DropTail