Kannan Varadhan kannan at ISI.EDU
Tue Jun 30 07:47:20 PDT 1998

> From: Bing Chen <bing at kinsey.Egr.UNLV.EDU>
> Date: Tue, 30 Jun 1998 07:30:17 PDT

> Does anyone use "dump-routes" command? I can't make it work. 
> Part of my script is: 
> set fh [open dyn.trc w] 
> set dr [$n1 rtObject?]
> $dr dump-routes $fh
> When I run the script, I get:
> invalid command name ""
>     while executing
> "$dr dump-routes $fh"

Two things that are not clearly documented are

	1.  dump-routes only works with dynamic routing, and we 
		only currently have DV in there (if someone wants
		to donate their LS code, we'd shamelessly 
		purloin it...hint, hint :-)
	2.  dump-routes only works after you issue the ``$ns run''
		command, because it is that command that sets up
		all the rtObject instances.

If you are using dynamic routing, then try the following code:

	proc my-dump-routes {node fh} {
		set dr [$node rtObject?]
		$dr dump-routes $fh
	$ns at 0.0 "my-dump-routes $node $fh"
	$ns run

and see if it works,


kannan at isi.edu

More information about the Ns-users mailing list