how to integrate the "Resource/Energy" leach class into NS-2.34?
Linux - SoftwareThis 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
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.
In NS2.35 with leach protocal undefined reference to `agentFactory(Tmix*, char*, char*)' error
Hi,
we installed ns2.35 and after ./configure and when we do "make" for the leach protocal ,we are facing a problem saying
/lib -ltk8.5 -L/home/aruna/aruna/ns-allinone-2.35/lib -ltcl8.5 -lXext -lX11 -lnsl -ldl -lm -lm
tmix/tmix.o: In function `Tmix::picktcp()':
tmix.cc:(.text+0xc87): undefined reference to `agentFactory(Tmix*, char*, char*)'
tmix/tmix.o: In function `Tmix::setup_connection()':
tmix.cc:(.text+0x18ea): undefined reference to `typeinfo for TmixOneWayAgent'
tmix.cc:(.text+0x18f2): undefined reference to `typeinfo for TmixAgent'
tmix.cc:(.text+0x1999): undefined reference to `typeinfo for TmixOneWayAgent'
tmix.cc:(.text+0x19a1): undefined reference to `typeinfo for TmixAgent'
tmix.cc:(.text+0x1e86): undefined reference to `typeinfo for TmixOneWayAgent'
tmix.cc:(.text+0x1e8e): undefined reference to `typeinfo for TmixAgent'
collect2: ld returned 1 exit status
make: *** [ns] Error 1
please help me to sought out the problem.Mailid:krishnaveni.mona@gmail.com
hi
please deepa_2111 or anyone help me in this:i need to make nodes in leach to be mobile,there are mobilenode.cc and mobilenode.h that are installed automatically when we install leach (mit project) but nodes are not mobile!! shall i change something in mobilenode.cc or what to do ?? i do really need your help as soon as possible.for example i uncommented this '/* <mobilenode> setdest <X> <Y> <speed> */' in mobilenode.cc but when i run make i got error like this:
common/mobilenode.cc:276: error: expected primary-expression before ‘<’ token
In NS2.35 with leach protocal undefined reference to `agentFactory(Tmix*, char*, char*)' error
Hi,
Please help me.Its needed to proceed further.
Hi,
we installed ns2.35 and after ./configure and when we do "make" for the leach protocal ,we are facing a problem saying
/lib -ltk8.5 -L/home/aruna/aruna/ns-allinone-2.35/lib -ltcl8.5 -lXext -lX11 -lnsl -ldl -lm -lm
tmix/tmix.o: In function `Tmix::picktcp()':
tmix.cc:(.text+0xc87): undefined reference to `agentFactory(Tmix*, char*, char*)'
tmix/tmix.o: In function `Tmix::setup_connection()':
tmix.cc:(.text+0x18ea): undefined reference to `typeinfo for TmixOneWayAgent'
tmix.cc:(.text+0x18f2): undefined reference to `typeinfo for TmixAgent'
tmix.cc:(.text+0x1999): undefined reference to `typeinfo for TmixOneWayAgent'
tmix.cc:(.text+0x19a1): undefined reference to `typeinfo for TmixAgent'
tmix.cc:(.text+0x1e86): undefined reference to `typeinfo for TmixOneWayAgent'
tmix.cc:(.text+0x1e8e): undefined reference to `typeinfo for TmixAgent'
collect2: ld returned 1 exit status
make: *** [ns] Error 1
please help me to sought out the problem.Mailid:krishnaveni.mona@gmail.com
P.S. : Better delete your email address, to avoid spam.
We already have "Send email to krishnaveni" : http://www.linuxquestions.org/questi...ember&u=717369
And : LQ is a knowledge base.
All technical discussion should take palace in the Forums.
I'm looking for an example code or source. It's about implementing security in LEACH WSN protocol (something like S-LEACH, R-LEACH, MS-LEACH would be helpful). It can be any simulator/language, ex. ns2, OMNeT, MATLAB.
Can anyone share any resources or point me in the right direction?
mr knudfl, i have downloaded your package exidus-pegasis-leach-ns234.patch.tar.gz, can you teach me how to make it works? step by step?
i've installed ns-allinone-2.34 on ubuntu 10.04 already...how i can run the pegasis simulation? thank you so much..
i've installed ns 2.34 in directory :kevin@kevin-laptop:~/ns-allinone-2.34 and i've extracted "exidus-pegasis-leach-ns234.patch.tar.gz" in directory :kevin@kevin-laptop:~/ns-allinone-2.34/ns-2.34, so how can i run the pegasis simulation?
Last edited by littleroot; 04-14-2013 at 10:27 AM.
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
Post # 441, @littleroot : Welcome to LQ.
There is an example in post # 425.
The Exidus-pegasis posts start with post #289.
Install instructions, post # 17 here .. http://www.linuxquestions.org/questi...219/page2.html
For Ubuntu 10.04 the install command is :
export CC=gcc-4.1 CXX=g++-4.1 && ./install
There is an example in post # 425.
The Exidus-pegasis posts start with post #289.
Install instructions, post # 17 here .. http://www.linuxquestions.org/questi...219/page2.html
For Ubuntu 10.04 the install command is :
export CC=gcc-4.1 CXX=g++-4.1 && ./install
thanks sir, the instruction in pos #17 : http://www.linuxquestions.org/questi...219/page2.html , so i need to reinstall the ns-allinone-2.34 by using comand sudo rm -r ns-allinone-2.34/ ?
so we install ns-allinone-2.34 & exidus-pegasis-leach-ns234.patch on the same time?
do i have to change the directory ns-allinone-2.34/otcl-1.13/configure again? so that it reads
SHLIB_LD="gcc -shared"
instead of
SHLIB_LD="ld -shared"
and Change ns-allinone-2.34/otcl-1.13/Makefile.in.
CC= @CC@ ,change it to CC= gcc-4.3
export CC=gcc41 CXX=g++41, can you teach me what's the meaning in this command "export CC=gcc41 CXX=g++41"
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
# 443.
You can do a 'make clean' in an existing ns-allinone-2.34/ns-2.34/.
Then either reconfigure with :
export CC=gcc-4.1 CXX=g++-4.1 && ./configure && make
.. or run './install' in the top directory.
Prerequisites : sudo apt-get install g++-4.1
Then the "export CC=gcc-4.1 CXX=g++-4.1" command will work.
You can have as many versions of gcc as you want installed at the same time.
The export simply selects the right compiler.
And : You can also have as many versions of ns-allinone-2.xx as you want,
installed at the same time. But do not add any path text to .bashrc/.bash_profile.
Example, multi install : /home/littleroot/a/ns-allinone-2.34
/home/littleroot/b/ns-allinone-2.34, /home/littleroot/c/ns-allinone-2.34
/home/littleroot/a/ns-allinone-2.33
The changes that you made, are meant for gcc versions 4.4, 4.5, 4.6.
And may do no harm when you use the recommend compilers = gcc/g++ 4.1.
Hello.....
i want to apply variable traffic load on leach......
but i think leach uses pareto traffic......
i wanna change it.....
thn how should i have to make changes in which file to do it......
please help me....
hello.......
in mit leach code......
what kind of traffic it uses.......
if it is using cbr
then is it means at every time slot there will be data to send...
is there any case of not sending data at their own time slot??
sir knudfl, when i run the leach_test, why my pegasis.err said this :
couldn't read file "/home/tomas/ns-allinone-2.34/ns-2.34/mit/uAMPS/ns-pegasis.tcl": no such file or directory
while executing
"source.orig /home/tomas/ns-allinone-2.34/ns-2.34/mit/uAMPS/ns-pegasis.tcl"
("uplevel" body line 1)
invoked from within
"uplevel source.orig[list $fileName]"
invoked from within
"if [$instance_ is_http_url $fileName] {
set buffer [$instance_ read_url $fileName]
uplevel eval $buffer
} else {...
the problem is my home dir is littleroot, why it becomes tomas? how can i change it? thx a lot sir
Last edited by littleroot; 04-15-2013 at 11:00 AM.
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
# 448 .
$ cd ns-allinone-2.34/ns-2.34/
$ grep -R tomas mit/
$ grep -R tomas tcl/
.. and then edit the files to your location.
The author simply used his/her actual location in 21 files.
thx a lot sir knudfl, after i run ./test at dir /ns-allinone-2.34/ns-2.34, the pegasis.err said that :
mac/chanel.cc: INITIALIZE THE LIST xListHead
couldn't read file "mit/uAMPS/sims/nodescen.tcl": no such file or directory
while executing
"source.orig mit/uAMPS/sims/nodescen.tcl"
("uplevel" body line 1)
invoked from within
"uplevel source.orig[list $fileName]"
invoked from within
"if [$instance_ is_http_url $fileName] {
set buffer [$instance_ read_url $fileName]
uplevel eval $buffer
} else {
uplevel source.orig[list $fileName]
..."
(procedure "source" line 8)
invoked from within
"source $opt(sc)"
invoked from within
"if { $opt(sc) == "" } {
puts "*** NOTE: no scenario file specified. - wireless.tcl"
set opt(sc) "none"
} else {
puts "Loading scenario file...."
(file "tcl/ex/wireless.tcl" line 323)
but i check in that dir, there is only have file nodescen...not nodescen.tcl ? then i try ns wireless tcl-x 20 -y 20 in terminal lines, and it says that :
couldn't read file "tcl/lib/ns-mobilenode.tcl": no such file or directory
while executing
"source.orig tcl/lib/ns-mobilenode.tcl"
("uplevel" body line 1)
invoked from within
"uplevel source.orig[list $fileName]"
invoked from within
"if [$instance_ is_http_url $fileName] {
set buffer [$instance_ read_url $fileName]
uplevel eval $buffer
} else {
uplevel source.orig[list $fileName]
..."
(procedure "source" line 8)
invoked from within
"source tcl/lib/ns-mobilenode.tcl"
(file "wireless.tcl" line 184)
what is that meaning sir?? sir knudfl, do you have any link about learning ns2 for beginers?
i think i really need that...thx a lot sir...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.