LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices


Reply
  Search this Thread
Old 10-08-2011, 04:21 AM   #1
charanya
LQ Newbie
 
Registered: Oct 2011
Posts: 9

Rep: Reputation: Disabled
how to implement leach in ns2.34 in fedora13


hi

can u please guide me in implementing LEACH in ns2.34 (fedora-13)

please.....

Charanya.
 
Old 10-08-2011, 11:15 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Welcome to LQ.

# yum install \
gcc-c++ compat-gcc-34-c++ automake autoconf libtool libX11-devel \
libXext-devel libXau-devel libXmu-devel xorg-x11-proto-devel

cd ns-allinone-2.34/tk8.4.18/ &&
wget ftp://ftp.swin.edu.au/gentoo-portage...astevent.patch
&& patch -p0 < tk-8.4-lastevent.patch && cd ../ &&
export CC=gcc34 CXX=g++34 && ./install

And LEACH, post # 5 here
http://www.linuxquestions.org/questi...2-34-a-870368/

..

Last edited by knudfl; 10-08-2011 at 11:17 AM.
 
1 members found this post helpful.
Old 10-09-2011, 01:17 AM   #3
charanya
LQ Newbie
 
Registered: Oct 2011
Posts: 9

Original Poster
Rep: Reputation: Disabled
Path problem

Thank you for the reply mail..
In the procedure for installing of LEACH

/opt/ns-allinone-2.34/ns-2.34 but my path is cd usr/local/ns-allinone-2.34/ns-2.34/

while proceeding with the step - "leach-setup.sh"

i found some error in Location
 
Old 10-09-2011, 03:32 AM   #4
charanya
LQ Newbie
 
Registered: Oct 2011
Posts: 9

Original Poster
Rep: Reputation: Disabled
problem in Makefile

Sorry to disturbe u again

i have done all the steps.. But i was not able to change the makefile due to deny in the permission...

pl guide me in solving the problem..
 
Old 10-09-2011, 03:42 AM   #5
ButterflyMelissa
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,766
Blog Entries: 23

Rep: Reputation: 411Reputation: 411Reputation: 411Reputation: 411Reputation: 411
(answer deleted - oops, I was in the wrong thread...)

Last edited by ButterflyMelissa; 10-09-2011 at 09:02 AM.
 
Old 10-09-2011, 04:09 AM   #6
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

Rep: Reputation: Disabled
You left out the "/" at the beginning of "usr/local/ns-allinone-2.34/ns-2.34/" Is that what you mean?
ciao,
jdk
 
Old 10-09-2011, 05:12 AM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
The MayTamer instructions : Her path is /opt/.
http://www.linuxquestions.org/questi...34-a-870368/#5
If you use /opt/ , do 'su -', for editing the Makefile.



..

Last edited by knudfl; 10-09-2011 at 11:35 AM.
 
Old 10-09-2011, 10:05 AM   #8
charanya
LQ Newbie
 
Registered: Oct 2011
Posts: 9

Original Poster
Rep: Reputation: Disabled
NS crash

my ns get crashed after "make clean" while trying to implement the Leach on ns2.34(fedora13)

kindly help me..
 
Old 10-09-2011, 02:58 PM   #9
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Known issues: There is one: ns-allinone-2.34/ns-2.34/trace/cmu-trace.h

See posts # 29, # 47, # 49 in the "Instuction thread"
http://www.linuxquestions.org/questi...368/page2.html

The correct cmu-trace.h : post #49.
..
Attached Files
File Type: txt cmu-trace.h.txt (6.0 KB, 191 views)
 
1 members found this post helpful.
Old 10-09-2011, 03:33 PM   #10
charanya
LQ Newbie
 
Registered: Oct 2011
Posts: 9

Original Poster
Rep: Reputation: Disabled
Angry error after Make

trace/trace.cc: In static member function ‘static int Trace::get_seqno(Packet*)’:
trace/trace.cc:190: error: ‘access’ is not a member of ‘hdr_cmn’
trace/trace.cc:196: error: ‘packet_t’ was not declared in this scope
trace/trace.cc:196: error: expected ‘;’ before ‘t’
trace/trace.cc:200: error: ‘t’ was not declared in this scope
trace/trace.cc:200: error: ‘PT_UDP’ was not declared in this scope
trace/trace.cc:200: error: ‘PT_EXP’ was not declared in this scope
trace/trace.cc:201: error: ‘PT_PARETO’ was not declared in this scope
trace/trace.cc:203: error: ‘PT_RAP_DATA’ was not declared in this scope
trace/trace.cc:203: error: ‘PT_RAP_ACK’ was not declared in this scope
trace/trace.cc:205: error: ‘PT_HTTP’ was not declared in this scope
trace/trace.cc:205: error: ‘PT_FTP’ was not declared in this scope
trace/trace.cc:206: error: ‘PT_XCP’ was not declared in this scope
trace/trace.cc:208: error: ‘PT_TFRC’ was not declared in this scope
trace/trace.cc:210: error: ‘PT_TFRC_ACK’ was not declared in this scope
trace/trace.cc:190: warning: unused variable ‘th’
trace/trace.cc: In member function ‘virtual void Trace::format(int, int, int, Packet*)’:
trace/trace.cc:221: error: ‘access’ is not a member of ‘hdr_cmn’
trace/trace.cc:229: error: ‘packet_t’ was not declared in this scope
trace/trace.cc:229: error: expected ‘;’ before ‘t’
trace/trace.cc:230: error: ‘packet_info’ was not declared in this scope
trace/trace.cc:230: error: ‘t’ was not declared in this scope
trace/trace.cc:290: error: ‘PT_SCTP’ was not declared in this scope
trace/trace.cc: In member function ‘virtual void DequeTrace::recv(Packet*, Handler*)’:
trace/trace.cc:510: error: ‘access’ is not a member of ‘hdr_cmn’
trace/trace.cc:515: error: ‘packet_t’ was not declared in this scope
trace/trace.cc:515: error: expected ‘;’ before ‘t’
trace/trace.cc:516: error: ‘packet_info’ was not declared in this scope
trace/trace.cc:516: error: ‘t’ was not declared in this scope
make: *** [trace/trace.o] Error 1

I get this error while i give "make"

pl help me in clearing this error..

please..
 
Old 10-09-2011, 05:39 PM   #11
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Fedora 13 :
gcc --version : 4.4.5 ; g++ --version : 4.4.5 20101112 (Red Hat 4.4.5-2)
Be absolutely sure, that you are using this version.

Suggest : Start from scratch in /home/<name>/ns-allinone-2.34/ .
And use the script "leach-HOME-setup234.sh" : Then all "file changes"
will work automatically. No manual changing Makefile etc. etc.
( Except cmu-trace.h : Use the file from post #9 ).

./configure && make clean && make ; su ; make install && exit && ./test : LEACH works.
..
Attached Files
File Type: txt leach-HOME-setup234.sh.txt (1.1 KB, 322 views)

Last edited by knudfl; 03-31-2012 at 05:48 AM.
 
Old 10-09-2011, 06:08 PM   #12
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,636

Rep: Reputation: 2652Reputation: 2652Reputation: 2652Reputation: 2652Reputation: 2652Reputation: 2652Reputation: 2652Reputation: 2652Reputation: 2652Reputation: 2652Reputation: 2652
charanya also be aware that fedora 13 IS PAST it's End Of Life - it is no longer supported
Fedora 13 has NOT had a update in 5 months and NEVER will !

fedora 15 is the current and in a few weeks fedora 16 will be current

it is strongly advised that if you are going to use fedora then you STAY current

fedora releases a new version every 6 months .
 
Old 10-10-2011, 07:25 AM   #13
charanya
LQ Newbie
 
Registered: Oct 2011
Posts: 9

Original Poster
Rep: Reputation: Disabled
Thumbs up

thanks a lot knudfl...

ur guidance was soo helpful for me to complete the implementation of leach...

thanks for sparing time for my queries..

 
Old 12-20-2011, 05:53 AM   #14
ayaan
LQ Newbie
 
Registered: Dec 2011
Posts: 15

Rep: Reputation: Disabled
hi
i am using fedora-9 and i want to implement leach protocol in ns2.34 can u plz help me in providing the code and for generating tcl scripts
 
Old 12-20-2011, 07:58 AM   #15
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Post # 14, @ ayaan : Welcome to LQ.

Code and instructions, as mentioned above in post #7
http://www.linuxquestions.org/questi...34-a-870368/#5 by @MayTamer

And please read all the above posts carefully.
Especially posts #9, #11 : Except the Fedora 13 stuff.


Fedora requirements : # yum install \
libX11-devel libXext-devel libXau-devel libXmu-devel xorg-x11-proto-devel \
gcc-c++ compat-gcc-34-c++ make automake autoconf libtool

Good luck.


P.S. : Tcl code is not something, that you generate.
It is plain text : Use and read some examples,
then you will hopefully find out how to write your own example.tcl .
NS2 tcl template http://www.linuxquestions.org/questi...33-a-731678/#2
> http://www.linuxquestions.org/questi...blem-726993/#4
And / or read the tcl documentation : http://www.tcl.tk/doc/
+ http://www.tcl.tk/man/tcl8.4/TclCmd/contents.htm

.

Last edited by knudfl; 12-20-2011 at 11:09 AM.
 
  


Reply

Tags
leach, leach-f13, leach-ns234, ns2


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Differences between LEACH results on ns2.1b5 and ns2.35 deepa_2111 Linux - Software 15 05-16-2013 05:53 PM
Leach on ns2.34 linux_ubuntu Linux - Newbie 2 10-04-2011 02:32 AM
LEACH on NS2 deepa_2111 Linux - Newbie 1 04-05-2011 07:53 PM
leach in ns2.33 hayet Linux - Newbie 2 03-18-2011 06:03 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 - Networking > Linux - Wireless Networking

All times are GMT -5. The time now is 08:44 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