LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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, 05: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, 12:15 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,152

Rep: Reputation: 2642Reputation: 2642Reputation: 2642Reputation: 2642Reputation: 2642Reputation: 2642Reputation: 2642Reputation: 2642Reputation: 2642Reputation: 2642Reputation: 2642
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 12:17 PM.
 
1 members found this post helpful.
Old 10-09-2011, 02: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, 04: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, 04:42 AM   #5
Thor_2.0
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,220
Blog Entries: 23

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

Last edited by Thor_2.0; 10-09-2011 at 10:02 AM.
 
Old 10-09-2011, 05:09 AM   #6
jdkaye
Senior Member
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 4,849

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, 06:12 AM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,152

Rep: Reputation: 2642Reputation: 2642Reputation: 2642Reputation: 2642Reputation: 2642Reputation: 2642Reputation: 2642Reputation: 2642Reputation: 2642Reputation: 2642Reputation: 2642
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 12:35 PM.
 
Old 10-09-2011, 11: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, 03:58 PM   #9
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,152

Rep: Reputation: 2642Reputation: 2642Reputation: 2642Reputation: 2642Reputation: 2642Reputation: 2642Reputation: 2642Reputation: 2642Reputation: 2642Reputation: 2642Reputation: 2642
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, 105 views)
 
1 members found this post helpful.
Old 10-09-2011, 04: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, 06:39 PM   #11
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,152

Rep: Reputation: 2642Reputation: 2642Reputation: 2642Reputation: 2642Reputation: 2642Reputation: 2642Reputation: 2642Reputation: 2642Reputation: 2642Reputation: 2642Reputation: 2642
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, 200 views)

Last edited by knudfl; 03-31-2012 at 06:48 AM.
 
Old 10-09-2011, 07:08 PM   #12
John VV
Guru
 
Registered: Aug 2005
Posts: 13,264

Rep: Reputation: 1774Reputation: 1774Reputation: 1774Reputation: 1774Reputation: 1774Reputation: 1774Reputation: 1774Reputation: 1774Reputation: 1774Reputation: 1774Reputation: 1774
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, 08: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, 06: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, 08:58 AM   #15
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,152

Rep: Reputation: 2642Reputation: 2642Reputation: 2642Reputation: 2642Reputation: 2642Reputation: 2642Reputation: 2642Reputation: 2642Reputation: 2642Reputation: 2642Reputation: 2642
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 12:09 PM.
 
  


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 06:53 PM
Leach on ns2.34 linux_ubuntu Linux - Newbie 2 10-04-2011 03:32 AM
LEACH on NS2 deepa_2111 Linux - Newbie 1 04-05-2011 08:53 PM
leach in ns2.33 hayet Linux - Newbie 2 03-18-2011 07:03 PM
i am using ubuntu as os. for NS2 to implement a routing protocol in ns2. sujovasu Programming 1 07-27-2010 02:44 AM


All times are GMT -5. The time now is 09:22 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration