[ns] problem regarding MAODV implementation
Sheraz Nadeem
sheraz_nadeem at hotmail.com
Wed Mar 5 00:53:29 PST 2008
Hi all
i am using ns-2.31 and i am having problem regarding the implementation of MAODV. i am trying to achieve multicasting in AODV.
i am having the error which is
///////////////////////ERROR///////////////////////////////////////
./ns ns.tcl 01 10 1
num_nodes is set 50
INITIALIZE THE LIST xListHead
Loading connection pattern ...
Loading scenarios file...
Starting Simulation ...
ns: _o734 aodv-join-group 0xE000000:
(_o734 cmd line 1)
invoked from within
"_o734 cmd aodv-join-group 0xE000000"
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 "_o734" line 2)
(SplitObject unknown line 2)
invoked from within
"_o734 a
odv-join-group 0xE000000"
////////////////////////////////////////////////////////////////////////
and i am using the simulation script
///////////////////////////////////////////////////////////////////////
set opt(stop) 910.0
set nodes 50
set mobility 1
set scenario [lindex $argv 2]
set pausetime 0
set traffic cbr
set senders [lindex $argv 0]
set receivers [lindex $argv 1]
set ns_ [new Simulator]
set topo [new Topography]
$topo load_flatgrid 1500 300
set tracefd [open ./trace-$pausetime-$mobility-$scenario-$senders-$receivers w]
$ns_ trace-all $tracefd
set god_ [create-god $nodes]
$ns_ node-config -adhocRouting AODV \
-llType LL \
-macType Mac/802_11 \
-ifqLen 50 \
-ifqType Queue/DropTail/PriQueue \
-antType Antenna/OmniAntenna \
-propType Propagation/TwoRayGround \
-phyType Phy/WirelessPhy \
-channel [new Channel/WirelessChannel] \
-topoInstance $topo \
-agentTrace ON \
-routerTrace ON \
-macTrace OFF \
-movementTrace OFF
for {set i 0} {$i < $nodes} {incr i} {
set node_($i) [$ns_ node]
$node_($i) random-motion 0;
}
puts "Loading connection pattern ..."
source "traffic/$traffic-$senders-$receivers"
puts "Loading scenarios file..."
source "scenarios/scen-1500x300-$nodes-$pausetime-$mobility-$scenario"
for {set i 0} {$i < $nodes} {incr i} {
$ns_ at $opt(stop) "$node_($i) reset";
}
$ns_ at $opt(stop) "$ns_ halt"
puts "Starting Simulation ..."
$ns_ run
/////////////////////////////////////////////////////////////////
i have got the sample traffic and scenario files from the internet for multicasting but i am having errror regarding the
multicast address (0xE000000) why is this happening. i got the whole package of multicasting inclluding all the header and cc files
necessary for multicasting. and i have enabled the multicast feature in aodv.h so why this is happening.
i have the following lines aodv.cc
///////////////////////in aodv.cc////////////////
#ifdef MULTICAST
else if (strcmp(argv[1], "aodv-join-group") == 0){
nsaddr_t mcast_addr = atoi(argv[2]);
if (mcast_addr < IP_MULTICAST) return TCL_ERROR;
aodv_mt_entry *mt = mtable.mt_lookup(mcast_addr);
if (mt == 0) mt = mtable.mt_add(mcast_addr);
if (mt->mt_node_status == ON_GROUP){
return TCL_OK;
}
if (mt->mt_node_status == ON_TREE){
mt->mt_node_status = ON_GROUP;
return TCL_OK;
}
// node is not on the tree
mt->mt_flags = MTF_IN_REPAIR;
mt->mt_grp_leader_addr = INFINITY8;
mt->mt_node_status = ON_GROUP;
sendMRQ(mt, RREQ_J);
return TCL_OK;
}
else if (strcmp(argv[1], "aodv-leave-group") == 0){
nsaddr_t mcast_addr = atoi(argv[2]);
if (mcast_addr < IP_MULTICAST) return TCL_ERROR;
aodv_mt_entry *mt = mtable.mt_lookup(mcast_addr);
if (mt == 0 || mt->mt_node_status != ON_GROUP) return TCL_OK;
if (mt->mt_grp_leader_addr != index) mt_prune(mt->mt_dst);
else {
mt->mt_node_status = ON_TREE;
mt->mt_grp_leader_addr = INFINITY8;
selectLeader(mt, INFINITY8);
}
return TCL_OK;
}
#endif
//////////////////////////////////////////////////////////////
so is it not recognising the strings "aodv-join-group" or aodv-leave-group"
tell me plz as quickly as you can.
thanks
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
More information about the Ns-users
mailing list