- Home Page of ProjectGuideline.com ›
- Forums ›
- Get Help to do your B.E., and M.E., M.Tech., & M.S., Project in Ns2 ›
- Help me out in resolving this error….
Hello
I am doing a project in RSVP protocol. I tried to run a patch file.
When I tried to execute the .tcl file , I get this error….
The code is..
set ns [new Simulator -multicast on]
$ns color 46 purple
#Simulator set EnableMcast_ 1
#Simulator set NumberInterfaces_ 1
set n0 [$ns node]
set n1 [$ns node]
set n2 [$ns node]
set n3 [$ns node]
set f [open out.tr w]
$ns trace-all $f
set nf [open out.nam w]
$ns namtrace-all $nf
$ns duplex-rsvp-link $n0 $n1 1Mb 1s 0.3 50 5000 Param Null
$ns duplex-rsvp-link $n1 $n2 1Mb 1s 0.5 50 5000 Param Null
$ns duplex-rsvp-link $n1 $n3 1Mb 1s 0.5 50 5000 Param Null
DM set PruneTimeout 60.0
set mproto DM
set mrthandle [$ns mrtproto $mproto {}]
Agent/RSVP set noisy_ 255
set rsvp3 [$n3 add-rsvp-agent]
set rsvp2 [$n2 add-rsvp-agent]
set rsvp1 [$n1 add-rsvp-agent]
set rsvp0 [$n0 add-rsvp-agent]
# Enable all upcalls on node 3:
#$rsvp3 set noisy_ 255
# obtain a multicast address
set group [Node allocaddr]
#puts “group = $group”
set sid [$rsvp0 session $group 10]
# Have node 2 and 3 join the multicast group
$ns at 1.0 “$n2 join-group $rsvp2 $group”
$ns at 1.0 “$n3 join-group $rsvp3 $group”
# Send path messages from node 0
# note that the sid only has local significance – this works because
# only 1 session is defined and it has sid of 0 at all of the nodes.
$ns at 2.0 “$rsvp0 sender 0 +500000 5000 32”
# Send reservation messages first from node 2
$ns at 5.0 “$rsvp2 reserve 0 FF +500000 5000 0”
# Request a confirmation for the next reservation from node 3
$ns at 5.5 “$rsvp3 confirm 0”
# Send reservation messages from node 3
$ns at 5.7 “$rsvp3 reserve 0 FF +500000 5000 0”
$ns at 15.0 “finish”
proc print-sessions {} {
global rsvp0 ns
set sessions [$rsvp0 sessions]
set now [$ns now]
puts “time = $now: sessions – $sessions”
}
proc finish {} {
global nf ns
$ns flush-trace
close $nf
puts “Done.”
exit 0
}
$ns run
[root@localhost rsvp]# ns rsvp_conf.tcl
(_o3 cmd line 1)
invoked from within
“_o3 cmd duplex-rsvp-link _o10 _o17 1Mb 1s 0.3 50 5000 Param Null”
invoked from within
“catch “$self cmd $args” ret”
invoked from within
“if [catch “$self cmd $args” ret] {
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error “error when calling class $cls: $args” $…”
(procedure “_o3” line 2)
(SplitObject unknown line 2)
invoked from within
“$ns duplex-rsvp-link $n0 $n1 1Mb 1s 0.3 50 5000 Param Null”
(file “rsvp_conf.tcl” line 20)
Please help me out in resolving this error.
Waiting for ur reply….
Thanks & Regards,
Malar
You must be logged in to reply to this topic.