📄 topo-gen-script.tcl
字号:
# make sure that gt-itm and ns conversion prog are in the path !!!XXX# until the these two files become part of the release, we# need to source themsource topo-gen.tcl source topo-view.tcl # the files that will contain the topology scripts and nam dump filesset topofile mytoposet topoext tclset outfile nam-view-testset outext namset topology_number 1set hier_flag 0# create 3 flat random topologies of 12 nodes, with connection # probability of 0.25# for more help on the topology command type "topology -h"for { set i 0 } { $i < $topology_number } { incr i } { topology -outfile $topofile-$i.$topoext -nodes 12 -connection_prob 0.25# topology -outfile $topofile-$i.$topoext -type transit_stub -nodes 100 \ -connection_prob 0.1 }# after creation, view the topology, the first layout in nam is going# to be a mess, hit re-layout to get a reasonable layout.# for now, sgb2ns and sgb2hierns are not combined ; hence pass a flag to view-topology# for { set i 0 } { $i < $topology_number } { incr i } { view-topology $topofile-$i.$topoext $outfile-$i.$outext $hier_flag puts "Do you want to view another toplogy (Y/N) ?! \[N\]" gets stdin x if ![regexp {^(y|Y|yes|Yes|YES)} $x] { break }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -