LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-22-2013, 01:11 PM   #1
chenil
LQ Newbie
 
Registered: Apr 2013
Posts: 21

Rep: Reputation: Disabled
NS: blackhole in aodv error


hi...i was trying to add blackholeaodv patch
done all the changes in related files.
Got the output after
ns blackhole.tcl
num_nodes is set 50
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
invalid command name "Agent/rtProto/blackholeAODV"
while executing
"Agent/rtProto/blackholeAODV instproc init args {
$self next $args
} "
(file "blackholeaodv.tcl" line 49)

any trace file not generated.

blackholeaodv.tcl is as follows:

# ======================================================================
# Default Script Options
set val(x) 800 ; # X dimension of the topography
set val(y) 800 ; # Y dimension of the topography
set val(nn) 50 ; # how many nodes
set val(stop) 200.0 ; # simulation time
set val(routing) blackholeAODV

set ns_ [new Simulator]
set topo [new Topography]
$topo load_flatgrid $val(x) $val(y)
set tracefd [open out.tr w]
$ns_ trace-all $tracefd
$ns_ use-newtrace
set namtrace [open out.nam w]
$ns_ namtrace-all-wireless $namtrace $val(x) $val(y)

set god_ [create-god $val(nn)]
$ns_ node-config -adhocRouting $val(routing) \
-llType LL \
-macType Mac/802_11 \
-ifqType Queue/DropTail/PriQueue \
-ifqLen 50 \
-antType Antenna/OmniAntenna \
-propType Propagation/TwoRayGround \
-phyType Phy/WirelessPhy \
-channelType Channel/WirelessChannel \
-topoInstance $topo \
-agentTrace ON \
-routerTrace ON \
-macTrace OFF

# ======================================================================

set opt(ragent) Agent/rtProto/blackholeAODV
set opt(pos) NONE

if { $opt(pos) != "NONE" } {
puts "*** WARNING: blackholeAODV using $opt(pos) position configuration..."
}

# ======================================================================
Agent instproc init args {
$self next $args
}
Agent/rtProto instproc init args {
$self next $args
}
Agent/rtProto/blackholeAODV instproc init args {
$self next $args
}

Agent/rtProto/blackholeAODV set sport_ 0
Agent/rtProto/" set dport_ 0

# ======================================================================

proc create-routing-agent { node id } {
global ns_ ragent_ tracefd opt

#
# Create the Routing Agent and attach it to port 255.
#
set ragent_($id) [new $opt(ragent) $id]
set ragent $ragent_($id)
$node attach $ragent 255

$ragent if-queue [$node set ifq_(0)] ;# ifq between LL and MAC
$ns_ at 0.$id "$ragent_($id) start" ;# start BEACON/HELLO Messages

#
# Drop Target (always on regardless of other tracing)
#
set drpT [cmu-trace Drop "RTR" $node]
$ragent drop-target $drpT

#
# Log Target
#
set T [new Trace/Generic]
$T target [$ns_ set nullAgent_]
$T attach $tracefd
$T set src_ $id
$ragent log-target $T
}


proc create-mobile-node { id } {
global ns_ chan prop topo tracefd opt node_
global chan prop tracefd topo opt

set node_($id) [new MobileNode]

set node $node_($id)
$node random-motion 0 ;# disable random motion
$node topography $topo

#
# This Trace Target is used to log changes in direction
# and velocity for the mobile node.
#
set T [new Trace/Generic]
$T target [$ns_ set nullAgent_]
$T attach $tracefd
$T set src_ $id
$node log-target $T

$node add-interface $chan $prop $opt(ll) $opt(mac) \
$opt(ifq) $opt(ifqlen) $opt(netif) $opt(ant)

#
# Create a Routing Agent for the Node
#
create-routing-agent $node $id

# ============================================================

if { $opt(pos) == "Box" } {

set spacing 200
set maxrow 3
set col [expr ($id - 1) % $maxrow]
set row [expr ($id - 1) / $maxrow]
$node set X_ [expr $col * $spacing]
$node set Y_ [expr $row * $spacing]
$node set Z_ 0.0
$node set speed_ 0.0

$ns_ at 0.0 "$node_($id) start"

} elseif { $opt(pos) == "Random" } {

$node random-motion 1

$ns_ at 0.0 "$node_($id) start"
}

}


than i tried for nam with "nam out.nam"


Cannot connect to existing nam instance. Starting a new one...
*** !!! ***
nam cannot recognize the trace file out.nam
Please make sure that the file is not empty and it is a nam trace
***********

i have tried this patch from net.where i am doing mistake?

please help me for solving this.
 
Old 06-28-2013, 12:12 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
http://www.linuxquestions.org/questi...-4175465910/#2
>>>
" The most versions of "blackholeaodv patch for ns2" do not implement a new "rtproto/..."."

> " Five examples "blackholeAODV*.tcl that works ..."
https://docs.google.com/file/d/0B7S2...it?usp=sharing

-
 
1 members found this post helpful.
  


Reply

Tags
blackholeaodv, ns2



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
after doing some modifications in aodv.cc file in ns2.34 i will get error breeze259 Linux - Newbie 1 01-05-2012 08:04 PM
error in ns2-while trying to print routing table in aodv indumit18 Linux - Software 1 09-24-2011 04:29 AM
Kernel AODV v2.2.2 - make error goforce Programming 2 06-26-2011 02:53 PM
Error installing aodv 0.9.5 with deb package autodimay Linux - Wireless Networking 1 04-17-2011 01:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration