well i was trying to insert multiple routes to node
but following error are comming

below is the code
plz reply
 *Code:*

Agent/rtProto/SLRA instproc madd-route {peerAddr dst check nodeid} {
  $self instvar nextHop_
  global multi test target_list
  puts "check $check"
  set node_ [$self id2handle $nodeid]
  set dest_ [$self id2handle $dst]
  if { $multi !=1} {
  puts "for subnet $dst the link is $peerAddr"
  set ns_ [Simulator instance]
  set nullAgent_ [$ns_ set nullAgent_]
  set a [$dest_ set address_]
  set b [$ns_ link $node_ $peerAddr]
  if { $test == 1 } {
   lset target_list 0 $b
   set test 2
   } else {
  lappend target_list $b
  puts " target list $target_list"
  }



   if { $check == 1 } {
    if { $nextHop_($dest_) != "" } {
   $node_ delete-route [$dst id] $nextHop_($dst) $nullAgent_
   }
   $node_ add-routes $dst $target_list
   $node_ set multipath_ 1
     }
  }
}




 *Quote:*
it gives following error


ns: _o371 madd-route 3 5 1 2: can't read "class::": no such variable
while executing
"warn "$class::$proc cannot install multiple routes""
invoked from within
"if !$multiPath_ {
if {[llength $ifs] > 1} {
warn "$class::$proc cannot install multiple routes"
set ifs [lindex $ifs 0]
}
$self add-route $id [$ifs he..."
(procedure "_o16" line 3)
(Node add-routes line 3)
invoked from within
"$node_ add-routes $dst $target_list"
(procedure "_o371" line 44)
(Agent/rtProto/SLRA madd-route line 44)
invoked from within
"_o371 madd-route 3 5 1 2" [/code]

Reply via email to