i got a bug while executing the below procedure.
(Myagent is a udp agent created that just functions as
a UDP agent that ships with ns)

proc ctrlAckDcs {} {

global ns ctrler dc

set group [Node allocaddr]

set p0 [new Agent/Myagent]

$ns attach-agent $ctrler $p0
$p0 set dst_addr_ $group
$p0 set dst_port_ 0



set rcvr1 [new Agent/Myagent]
set rcvr2 [new Agent/Myagent]
set rcvr3 [new Agent/Myagent]

$ns attach-agent $dc(1) $rcvr1
$ns attach-agent $dc(2) $rcvr2
$ns attach-agent $dc(3) $rcvr3

$ns at 0.6 "$dc(1) join-group $rcvr1  $group"
$ns at 1.5 "$dc(1) leave-group $rcvr1 $group"
$ns at 0.6 "$dc(2) join-group $rcvr2 $group"
$ns at 1.5 "$dc(2) leave-group $rcvr2 $group"
$ns at 0.6 "$dc(3) join-group $rcvr3 $group"
$ns at 1.5 "$dc(3) leave-group $rcvr3 $group"

##usage :: $agent operation type data
senderDesignation
#$ns at 0.7 "$p0 send MRDA Ready.. CTLR DCs  " 
}


the error said 
-----------------------------------------------------
: _o29 new-group 2 -2147483648 -1 cache-miss: can't
read "protocols_(-1)": no such variable
    while executing
"$protocols_($iface) upcall $code $source $group
$iface"
    (procedure "_o30" line 9)
    (mrtObject upcall line 9)
    invoked from within
"$mrtObject_ upcall $code $src $group $iface"
    (procedure "_o24" line 3)
    (Node new-group line 3)
    invoked from within
"$node_ new-group $src $group $iface $code"
    (procedure "_o29" line 3)
    (Classifier/Multicast new-group line 3)
    invoked from within
"_o29 new-group 2 -2147483648 -1 cache-miss"
--------------------------

the same code worked in a another procedure of the
same type in another tcl script....

Can you help me??? i am having headache for a week now

  

<FONT color=blue>
VINU
"Fight Till there is some life left in you
coz Victory comes only at the end of the Fight!!"<IMG 
src="http://us.i1.yimg.com/us.yimg.com/i/mesg/tsmileys/f.gif";></FONT>

Send instant messages to your online friends http://in.messenger.yahoo.com 

Reply via email to