Commit 4b9acdc6 authored by Shashi Guruprasad's avatar Shashi Guruprasad

Fixed tcl-to-tcl reparsing while testing the 416 node topology. It was

a simple problem in the duplex-link instproc which caused the code for
simnode creation to go to one pnode while an rlink from this simnode
was mapped to another pnode.

Also added $ns rtproto Manual for generated tcl code since IP address
based routes are being added.
parent 6309bb00
......@@ -405,6 +405,9 @@ namespace eval GLOBALS {
foreach pnode [array names p2vmapsim] {
real_set nseconfig($pnode) {}
append nseconfig($pnode) "set [$sim set objname] [$sim set createcmd]\n"
# Since we will be adding IP address based routes, any ns default
# routing causes problems
append nseconfig($pnode) "\$[$sim set objname] rtproto Manual\n"
append nseconfig($pnode) \
"\$[$sim set objname] set tbname \{$v2vmap([$sim set objname])\}\n"
append nseconfig($pnode) "[$sim set nseconfig]\n\n"
......
......@@ -167,17 +167,17 @@ Simulator instproc duplex-link {n0 n1 bw delay type args} {
if { $n0pnode == $n1pnode } {
append nseconfiglanlinks($n0pnode) \
"set $linkname \[\$$objname duplex-link \$[$n0 set objname] \$[$n1 set objname] $bw $delay $type $args]\n"
"set $linkname \[\$$objname duplex-link \$$n0name \$$n1name $bw $delay $type $args]\n"
append nseconfiglanlinks($n0pnode) \
"\[\$$objname link \$[$n0 set objname] \$[$n1 set objname]] set-ip $n0ip\n"
"\[\$$objname link \$$n0name \$$n1name\] set-ip $n0ip\n"
append nseconfiglanlinks($n1pnode) \
"\[\$$objname link \$[$n1 set objname] \$[$n0 set objname]] set-ip $n1ip\n"
"\[\$$objname link \$$n1name \$$n0name\] set-ip $n1ip\n"
} else {
append nseconfigrlinks($n0pnode) \
"set $linkname \[\$$objname rlink \$[$n0 set objname] $n1ip $bw $delay $type $args]\n"
"set $linkname \[\$$objname rlink \$$n0name $n1ip $bw $delay $type $args]\n"
append nseconfigrlinks($n0pnode) "\$\{$linkname\} set-ip $n0ip\n"
append nseconfigrlinks($n1pnode) \
"set $linkname \[\$$objname rlink \$[$n1 set objname] $n0ip $bw $delay $type $args]\n"
"set $linkname \[\$$objname rlink \$$n1name $n0ip $bw $delay $type $args]\n"
append nseconfigrlinks($n1pnode) "\$\{$linkname\} set-ip $n1ip\n"
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment