LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-07-2017, 01:57 AM   #1
kundilta
LQ Newbie
 
Registered: Jun 2017
Posts: 4

Rep: Reputation: Disabled
Get some errors using Greedy forwarding routing in ns2 (ns_2greedyfrd.tar.gz)


Hello
i started using Greedy Forwarding using ns 2.33. i have one problem while executing greedy forwarding routing protocol need help solve this error.

num_nodes is set 105

(_o15 cmd line 1)
invoked from within
"_o15 cmd addr"
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 "_o15" line 2)
(SplitObject unknown line 2)
invoked from within
"_o15 addr"
("eval" body line 1)
invoked from within
"eval $node addr $args"
("default" arm line 2)
invoked from within
"switch -exact $routingAgent_ {
DSDV {
set ragent [$self create-dsdv-agent $node]
}
DSR {
$self at 0.0 "$node start-dsr"
}
AODV {
set ragent [$self cre..."
(procedure "_o3" line 14)
(Simulator create-wireless-node line 14)
invoked from within
"_o3 create-wireless-node"
("eval" body line 1)
invoked from within
"eval $self create-wireless-node $args"
(procedure "_o3" line 23)
(Simulator node line 23)
invoked from within
"$ns_ node"
("for" body line 2)
invoked from within
"for {set i 0} {$i < $val(nn) } {incr i} {
set node_($i) [$ns_ node]
$node_($i) random-motion 0 ;
}"
(file "greedy.tcl" line 116)

thank for advance
 
Old 11-07-2017, 01:10 PM   #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
Welcome to LQ.

This thread is about Greedy / GPSR → →
https://groups.google.com/forum/?fro...rs/8aK3SIcGyys

Quote, from my answer 04 Nov 2017
Quote:
Greedy is equally easy to build, but I never got any of the examples to work :
greedy.tcl, greedy_test**.tcl .
 
2 members found this post helpful.
Old 11-08-2017, 08:19 AM   #3
kundilta
LQ Newbie
 
Registered: Jun 2017
Posts: 4

Original Poster
Rep: Reputation: Disabled
dear mr.knud
thank you for your answer.
i try to patch it. and i got this output. is it failed?,

In file included from greedy/greedy_pkt.h:28:0,
from greedy/greedy.h:30,
from greedy/greedy.cc:27:
./common/packet.h: In static member function ‘static void p_info::initName()’:
./common/packet.h:422:9: error: ‘PT_GREEDY’ was not declared in this scope
greedy/greedy.cc: In constructor ‘GreedyAgent::GreedyAgent()’:
greedy/greedy.cc:49:36: error: ‘PT_GREEDY’ was not declared in this scope
greedy/greedy.cc: In member function ‘virtual void GreedyAgent::recv(Packet*, Handler*)’:
greedy/greedy.cc:106:48: error: ‘PT_GREEDY’ was not declared in this scope
greedy/greedy.cc:130:21: error: ‘PT_GREEDY’ was not declared in this scope
make: *** [greedy/greedy.o] Error 1
Ns make failed!
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems
ta@VANET:~/Documents/ns-allinone-2.35$

Thank for advance
 
Old 11-08-2017, 10:05 AM   #4
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
HOWTO greedy :
Code:
sudo apt install g++-4.8 

tar xvf ns-allinone-2.35_gcc5.tar.gz
https://drive.google.com/file/d/0B7S...ZNRGVORjQ/view
cd ns-allinone-2.35/
patch -p0 < greedy_ns235.patch
export CC=gcc-4.8 CXX=g++-4.8 && ./install
cd ns-2.35/
cp ns ns-greedy
sudo cp ns-greedy /usr/local/bin/
Simulation : $ ns-greedy file.tcl

-
 
2 members found this post helpful.
Old 11-09-2017, 03:33 AM   #5
kundilta
LQ Newbie
 
Registered: Jun 2017
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thank you mr.knud
it work.
After that i simulate and get this error.

ta@VANET:~/Music/ns-allinone-2.35/ns-2.35/greedy/greedy$ ns-greedy greedy2.tcl
num_nodes is set 105
INITIALIZE THE LIST xListHead
Starting Simulation...
SORTING LISTS ...DONE!
Invalid flow flow (53, 3).
ta@VANET:~/Music/ns-allinone-2.35/ns-2.35/greedy/greedy$

simulation is successful, right?, but output file is empty.
can you help me, mr?
thank for advance.
 
Old 11-09-2017, 05:07 AM   #6
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
Re #5.
Quote:
Invalid flow flow (53, 3).
Invalid flow : Is a fatal error.

As I wrote in https://groups.google.com/forum/?fro...rs/8aK3SIcGyys
... I never got any Greedy simulation to work.

? Why don't you use the more advanced GPSR-hls or GPSR-KeLiu ?
See https://groups.google.com/forum/?fro...rs/8aK3SIcGyys

-
 
1 members found this post helpful.
Old 11-09-2017, 05:42 AM   #7
kundilta
LQ Newbie
 
Registered: Jun 2017
Posts: 4

Original Poster
Rep: Reputation: Disabled
thank you mr knud.
i use greedy, cause i want to simulate GyTAR. I have been looking for GyTAR patch, but i didn't get it.
do you have patch for GyTAR?.
 
Old 11-09-2017, 06:06 AM   #8
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
Re #7.

"greedy traffic aware routing (Gytar)"

No patch. I have searched for ``ns2 Gytar´´ sometimes over the years.
. https://www.linuxquestions.org/questions/tags/gytar/
. https://groups.google.com/forum/?fro...ar%7Csort:date

There is an example for ns3 ( gytar-example.cc )
https://10343742895474358856.googleg...aUJ01I7BjJ72Gc
... So I guess you can use ns3
https://groups.google.com/forum/?fro...rum/ns-3-users

-
 
  


Reply

Tags
greedy, 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
Get some errors using Greedy forwarding routing in ns2 (ns_2greedyfrd.tar.gz) rendipras Linux - Newbie 1 11-07-2017 12:39 PM
hi..sir. i am using ns2 simulator for my project . i am trying to write simple tcl program in ns2 ..i got the errors like. B.ravi LinuxQuestions.org Member Intro 2 01-09-2016 05:08 PM
I am getting following msg when running a modified greedy forwarding routing in ns-2 jaiswal.raaj Linux - Wireless Networking 1 07-17-2015 05:53 AM
Ask Greedy Traffic Aware Routing (GyTAR) Script irma_nd Ubuntu 4 08-13-2014 03:59 PM
i am using ubuntu as os. for NS2 to implement a routing protocol in ns2. sujovasu Programming 1 07-27-2010 01:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:09 PM.

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