[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ns] Network Topology in Nam
> Is there a 'cool' way of viewing the gtm-itm generated
> topology in Nam. Scenerio generator talks of using
> topo-view.tcl, but I cdn't figure out how it can be
> used.
No there isn't, but there's at least an ugly way. Put the following into a
file, say, view-nam.tcl:
source [lindex $argv 0]
set ns [new Simulator]
set fp [open "out.nam" w]
$ns namtrace-config $fp
create-topology ns n 10Mb
proc finish {} {
global ns fp
$ns namtrace-config $fp
$ns flush-trace
close $fp
exit 0
}
$ns at 1.0 "finish"
$ns run
Assuming your converted (using sgb2ns) topology file is topo.tcl, run
it like:
ns view-nam.tcl topo.tcl
Then it'll dump it to out.nam. You can use autolayout to see it.
Notice the namtrace-config{} in the above script. If you do namtrace-all
it won't give you anything.
- Haobo