Simple Ant based Routing Algorithm(SARA) implementation on NS 2.34
Linux - Wireless NetworkingThis forum is for the discussion of wireless networking in Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Yes, I'm sure someone could help you. After all, it's big world.
But seriously, could you possibly ask a less open-ended question? How is anyone supposed to answer a question like the one you just asked? People can't read your mind; you have to supply some context and details.
What, exactly, is the nature of the problem? What, if anything, have you tried? If you got as far as installing NS, did you get any error messages?
Assume $ svn checkout svn://svn.code.sf.net/p/anthocnet/code/ anthocnet-code
→ →
$ cd anthocnet-code/ns-allinone-2.34/
$ patch -p0 < SARA-for__Anthocnet-patched-ns234.patch
$ patch -p0 < otcl_ns234_gcc-4.4.patch
$ export CC=gcc-4.4 CXX=g++-4.4 && ./install
$ cd ns-2.34/
$ sudo make install
$ cp ns ns234_anthocnet+sara
$ sudo cp ns234_anthocnet+sara /usr/local/bin/
.... I had no issues with the above.
Now please test all the default simulations with the new 'ns234_anthocnet+sara'.
Example : $ ns234_anthocnet+sara manet.sara.FTP.tcl -rs 18
→ OK. The files ftp.tr 19.4MB, ftp.nam 33.4MB are created.
$ nam ftp.nam : OK, lots of activity.
i applied patch of sara on ns2.34already integrated with anthocnet.
patching applied properly but while running ./install command it gives following error
common/packet.h:297: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:298: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:299: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:300: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:301: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:302: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:303: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:304: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:305: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:306: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:307: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:308: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:309: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:310: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:311: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:312: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:313: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:314: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:315: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:317: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:318: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:319: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:320: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:321: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:322: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:324: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:325: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:326: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:327: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:328: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:329: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:330: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:331: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:332: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:333: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:334: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:335: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:336: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:337: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:339: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:340: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:342: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:343: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:344: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:346: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:349: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:352: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:355: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:358: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:361: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:364: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:368: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:372: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:373: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:375: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:376: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:379: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:382: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:385: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:388: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:391: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:393: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:395: warning: deprecated conversion from string constant to ‘char*’
common/scheduler.cc: In member function ‘virtual int Scheduler::command(int, const char* const*)’:
common/scheduler.cc:216: warning: deprecated conversion from string constant to ‘char*’
make: *** [common/scheduler.o] Error 1
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
← ref. #7.
Please edit post #7 to use CODE tags.
... Or / and delete the warnings. Warnings are not errors.
If you want a solution for an error,
the one line where the error appears must be shown.
I.e. »» make: *** [common/scheduler.o] Error 1 «« is just the conclusion.
Editing : The 'Edit' button.
CODE tags : The ` # ´ button in the 'Advanced Editor' →
→ → Edit >>> Go Advanced.
-
Which Ubuntu 12.04 are you using ? 32bits (i686) or 64bits (x86_64) ?
→ This command will show <arch> : $ uname -m
Are you sure that no changes were made to "ns234 with Anthocnet",
before applying the patch "SARA-for__Anthocnet-patched-ns234.patch" ?
? And is your {ns-2.34 + anthocnet} downloaded with this command :
Implementation of SARA with AntHocNet done successfully, but running the sccenario (below) with ANTHOCNET successfully but with SARA it gives error "SEGMENTATION FAULT(CORE DUMP)". Can u please tell me whether there is any problem with scenario WITH RESPECT TO SARA MEANS SOME INCOMPLETE PARAMETER ??
PLS HELP ME TO UPDATE THIS SCENARIO FOR SARA EXECUTION OR SOMETHING ELSE SCENARIO SO I CAN GET IDEA ABOUT WRITING SCENARIO FOR SARA ROUTING PROTOCOL.BASICALLY I WANT TO COMPARE ANTHOCNET PERFORMANCE WITH SARA. ANTHOCNET COMPARISON WITH AODV AND DSR IS DONE.
AND THANK YOU SIR WITH HELP ONLY WE INTEGRATED SARA WITH NS2.34 SUCESSFULLY.
PLS GUIDE WITH SCRENARIO POINT OF VIEW.
THANKS AND REGARDS
AGKAGK
tcl scenario script
set val(chan) Channel/WirelessChannel ;#Channel Type /Typ kanalu
set val(prop) Propagation/TwoRayGround ;# radio-propagation model
set val(netif) Phy/WirelessPhy ;# network interface type
set val(mac) Mac/802_11 ;# MAC type
set val(ifq) CMUPriQueue; #Queue/DropTail/PriQueue ;# interface queue type
set val(ll) LL ;# link layer type
set val(ant) Antenna/OmniAntenna ;# antenna model
set val(ifqlen) 50 ;# max packet in ifq
set val(nn) 2 ;# number of mobilenodes
set val(rp) AntHocNet ;# routing protocol
set val(x) 1000
set val(y) 1000
# Initialize Global Variables /Inicjowanie zmiennych globalnych
set ns_ [new Simulator]
set tracefd [open low-ant.tr w]
$ns_ trace-all $tracefd
set namtrace [open low-ant-wrls.nam w]
$ns_ namtrace-all-wireless $namtrace $val(x) $val(y)
# set up topography object /Utworzenie obiektu topograficznego
set topo [new Topography]
$topo load_flatgrid $val(x) $val(y)
# Create God /Tworzenie GOD
create-god $val(nn)
# New API to config node: /Nowe API do konfiguracji węzła:
# 1. Create channel (or multiple-channels); /1. Tworzenie kanału (lub kilku kanałów);
# 2. Specify channel in node-config (instead of channelType); /2. Określ kanału w node-config (zamiast channelType);
# 3. Create nodes for simulations. /3. Tworzenie węzłów dla symulacji.
# Create channel #1 and #2 /Tworzenie kanału 1 i 2
set chan_1_ [new $val(chan)]
set chan_2_ [new $val(chan)]
# Create node(0) "attached" to channel #1 /Tworzenie wezla node(0) "dolaczonego" do kanalu 1
# configure node, please note the change below. /Konfiguracji węzła, należy zwrócić uwagę na zmiany poniżej
$ns_ node-config -adhocRouting $val(rp) \
-llType $val(ll) \
-macType $val(mac) \
-ifqType $val(ifq) \
-ifqLen $val(ifqlen) \
-antType $val(ant) \
-propType $val(prop) \
-phyType $val(netif) \
-topoInstance $topo \
-agentTrace ON \
-routerTrace ON \
-macTrace ON \
-movementTrace OFF \
-channel $chan_1_
# Ustawienie wartosci dla AntHocNet
#Agent/AntHocNet set num_nodes_ 2 # number of nodes in topology //liczba węzłów w topologii
#Agent/AntHocNet set num_nodes_x_ 2 # number of nodes in row (for regular mesh topology) //liczba węzłów w rzędzie (dla stałych topologii mesh)
#Agent/AntHocNet set num_nodes_y_ 2 # number of nodes in column (for regular mesh topology) //liczba węzłów w kolumnie (regularne topologii mesh)
#Agent/AntHocNet set r_factor_ 1 # reinforcement factor //czynnik wzmocnienia
#Agent/AntHocNet set timer_ant_ 1 # timer for generation of forward ants //timer do generowania mrówki do przodu
# node_(1) can also be created with the same configuration, or with a different / node_(1) moze byc takze tworzony z taka sama konfiguracja, lub z innym
# channel specified. / specyfikacja kanalu
# Uncomment below two lines will create node_(1) with a different channel. / Odkomentuj poniżej dwie linie stworza node_(1) z innegym kanałem.
# $ns_ node-config \
# -channel $chan_2_
for {set i 0} {$i < $val(nn)} {incr i} {
$ns_ initial_node_pos $node_($i) 20
}
#
# Provide initial (X,Y, for now Z=0) co-ordinates for mobilenodes /Poczatkowe (X, Y, teraz Z = 0) wspolrzedne dla mobilnych węzlow
#
$node_(0) set X_ 5.0
$node_(0) set Y_ 2.0
$node_(0) set Z_ 0.0
$node_(1) set X_ 8.0
$node_(1) set Y_ 5.0
$node_(1) set Z_ 0.0
#
# Now produce some simple node movements /Teraz wytwarzymy kilka prostych przemieszczeń węzla
# Node_(1) starts to move towards node_(0) /Node_(1) zacznie się poruszać w kierunku node_(0)
#
$ns_ at 3.0 "$node_(1) setdest 50.0 40.0 25.0"
$ns_ at 3.0 "$node_(0) setdest 48.0 38.0 5.0"
# Node_(1) then starts to move away from node_(0) /Node_(1) następnie zaczynie się oddalac od node_(0)
$ns_ at 20.0 "$node_(1) setdest 490.0 480.0 30.0"
# Setup traffic flow between nodes /Ustawienia ruchu między węzłami
# TCP connections between node_(0) and node_(1) /Polaczenie TCP pomiedzy wezlami node_(0) i node_(1)
set tcp [new Agent/TCP]
$tcp set class_ 2
set sink [new Agent/TCPSink]
$ns_ attach-agent $node_(0) $tcp
$ns_ attach-agent $node_(1) $sink
$ns_ connect $tcp $sink
set ftp [new Application/FTP]
$ftp attach-agent $tcp
$ns_ at 3.0 "$ftp start"
#
# Tell nodes when the simulation ends /Powiedz węzłom gdy symulacja sie kończy
#
for {set i 0} {$i < $val(nn) } {incr i} {
$ns_ at 30.0 "$node_($i) reset";
}
$ns_ at 30.0 "stop"
$ns_ at 30.01 "puts \"NS EXITING...\" ; $ns_ halt"
proc stop {} {
global ns_ tracefd
$ns_ flush-trace
close $tracefd
}
i want patch of sara for implementation on ns2.35 ubuntu 16.04. plz help
Read the LQ Rules and Question Guidelines. You re-opened an old thread, used text-speak, and are essentially just asking for a handout. We aren't going to write code for you, nor are we going to look up a place where you can get such things.
We're happy to help you, but you need to show effort of your own, such as what research you've done, what you've written, etc.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.