[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dump-routes
> From: Bing Chen <[email protected]>
> 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
--
[email protected]
http://www.isi.edu/~kannan