Linux - Software This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
05-21-2014, 07:12 AM
|
#1
|
LQ Newbie
Registered: May 2014
Posts: 8
Rep: 
|
getting error in .tcl while creating malicious node in aodv in ns2.35
getting error while creating malicious node
num_nodes is set 6
INITIALIZE THE LIST xListHead
using backward compatible Agent/CBR; use Application/Traffic/CBR instead
Start of simulation..
ns: _o44 hacker:
(_o44 cmd line 1)
invoked from within
"_o44 cmd hacker"
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 "_o44" line 2)
(SplitObject unknown line 2)
invoked from within
"_o44 hacker"
Last edited by saa-6611; 05-21-2014 at 08:49 AM.
|
|
|
05-21-2014, 08:39 AM
|
#2
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520
|
Please attach the tcl file you are using for the above simulation :
As <name>.tcl.txt .
Attachments : That's the paper clip button in the 'Advanced Editor'.
And also tell which "malcious" code you added to ns-2.35. A link, please.
`Malicious info´ http://www.linuxquestions.org/questions/tags/malicious/
* About `hacker', see post #21 here ...
http://www.linuxquestions.org/questi...332/page2.html
-
|
|
|
05-21-2014, 08:50 AM
|
#3
|
LQ Newbie
Registered: May 2014
Posts: 8
Original Poster
Rep: 
|
Quote:
Originally Posted by knudfl
|
My .tcl file is attached
|
|
|
05-21-2014, 10:41 AM
|
#4
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520
|
# 3 .
OK, first thing to do : Edit your "aodv malicious tcl" file to work.
The edited version = m-aodv_saa-6611.tcl .
The edited lines are from the file maodv_802_15_4.tcl (The post #21 link.)
The simulation works perfect : $ ns235-malicious m-aodv_saa-6611.tcl
A test with an 'ns' with no "aodv-malicious" :
You will get errors identical to post #1.
Conclusion : You are probably using a wrong executable 'ns'.
Solution : Make a copy of the right 'ns' to 'ns235-malicious', and :
$ sudo cp ns235-malicious /usr/local/bin/
-
Last edited by knudfl; 05-21-2014 at 11:16 AM.
|
|
|
05-21-2014, 11:52 AM
|
#5
|
LQ Newbie
Registered: May 2014
Posts: 8
Original Poster
Rep: 
|
Quote:
Originally Posted by knudfl
# 3 .
OK, first thing to do : Edit your "aodv malicious tcl" file to work.
The edited version = m-aodv_saa-6611.tcl .
The edited lines are from the file maodv_802_15_4.tcl (The post #21 link.)
The simulation works perfect : $ ns235-malicious m-aodv_saa-6611.tcl
A test with an 'ns' with no "aodv-malicious" :
You will get errors identical to post #1.
Conclusion : You are probably using a wrong executable 'ns'.
Solution : Make a copy of the right 'ns' to 'ns235-malicious', and :
$ sudo cp ns235-malicious /usr/local/bin/
-
|
hi knudfl
thanks for reply but i m still getting this error with the m-aodv_saa-6611.tcl
num_nodes is set 500
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
INITIALIZE THE LIST xListHead
ns: _o457 hacker:
(_o457 cmd line 1)
invoked from within
"_o457 cmd hacker"
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 "_o457" line 2)
(SplitObject unknown line 2)
invoked from within
"_o457 hacker"
|
|
|
05-21-2014, 02:32 PM
|
#6
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520
|
# 5 .
To do a simulation with "aodv.malicious / hacker" ,
you will have to compile ``aodv-malicious´´ into a new executable 'ns'
That's why you were asked in #2 : "which 'malcious' code you added".
Ubuntu 11.04 ... 14.04 example :
$ cd ns-allinone-2.35/
$ patch -p0 < aodv-malicious_ns235.patch
https://drive.google.com/file/d/0B7S...it?usp=sharing
$ export CC=gcc-4.4 CXX=g++-4.4 && ./install
$ cd ns-2.35/
$ cp ns ns235-malicious
$ sudo cp ns235-malicious /usr/local/bin/
-
|
|
|
05-22-2014, 01:47 AM
|
#7
|
LQ Newbie
Registered: May 2014
Posts: 8
Original Poster
Rep: 
|
Quote:
Originally Posted by knudfl
# 5 .
To do a simulation with "aodv.malicious / hacker" ,
you will have to compile ``aodv-malicious´´ into a new executable 'ns'
That's why you were asked in #2 : "which 'malcious' code you added".
Ubuntu 11.04 ... 14.04 example :
$ cd ns-allinone-2.35/
$ patch -p0 < aodv-malicious_ns235.patch
https://drive.google.com/file/d/0B7S...it?usp=sharing
$ export CC=gcc-4.4 CXX=g++-4.4 && ./install
$ cd ns-2.35/
$ cp ns ns235-malicious
$ sudo cp ns235-malicious /usr/local/bin/
-
|
when I am installing the patch getting following error
patching file ns-2.35/aodv/aodv.cc
Hunk #1 FAILED at 81.
Hunk #2 FAILED at 143.
Hunk #3 succeeded at 479 with fuzz 2 (offset 40 lines).
2 out of 3 hunks FAILED -- saving rejects to file ns-2.35/aodv/aodv.cc.rej
patching file ns-2.35/aodv/aodv.h
Hunk #1 FAILED at 273.
1 out of 1 hunk FAILED -- saving rejects to file ns-2.35/aodv/aodv.h.rej
|
|
|
05-22-2014, 02:13 AM
|
#8
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520
|
# 7 .
! You still haven't told which changes you added to ns-2.35 !
If aodv-malicious only, then please do :
$ tar xvf ns-allinone-2.35.tar.gz
$ cd ns-allinone-2.35/
$ patch -p0 < aodv-malicious_ns235.patch
... etc. etc., ref. post #6.
-
|
|
|
05-22-2014, 02:24 AM
|
#9
|
LQ Newbie
Registered: May 2014
Posts: 8
Original Poster
Rep: 
|
Quote:
Originally Posted by knudfl
# 7 .
! You still haven't told which changes you added to ns-2.35 !
If aodv-malicious only, then please do :
$ tar xvf ns-allinone-2.35.tar.gz
$ cd ns-allinone-2.35/
$ patch -p0 < aodv-malicious_ns235.patch
... etc. etc., ref. post #6.
-
|
I have made changes in aodv.cc and aodv.h as per your earlier post
|
|
|
05-22-2014, 04:23 AM
|
#10
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520
|
# 9 .
Please read post #2 : ""A link, please.""
... means that you are supposed to show a link address for the code.
I.e. { aodv.cc.txt (36.4 kB), aodv.h.txt (10.3 kB) }.
""your earlier post"" : Which post ?
-
|
|
|
05-22-2014, 04:38 AM
|
#11
|
LQ Newbie
Registered: May 2014
Posts: 8
Original Poster
Rep: 
|
Quote:
Originally Posted by knudfl
# 9 .
Please read post #2 : ""A link, please.""
... means that you are supposed to show a link address for the code.
I.e. { aodv.cc.txt (36.4 kB), aodv.h.txt (10.3 kB) }.
""your earlier post"" : Which post ?
-
|
I have made changes as per instructions on these posts
`Malicious info´ http://www.linuxquestions.org/questions/tags/malicious/
* About `hacker', see post #21 here ...
http://www.linuxquestions.org/questi...332/page2.html
|
|
|
05-22-2014, 05:24 AM
|
#12
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520
|
# 11 .
Your files in post #9, { aodv.cc.txt (36.4 kB), aodv.h.txt (10.3 kB) } ,
don't seem to be found anywhere else. And : They are not working.
Please start from scratch, in a new directory:
$ tar xvf ns-allinone-2.35.tar.gz
$ cd ns-allinone-2.35/
$ patch -p0 < aodv-malicious_ns235.patch
... etc. etc., ref. post #6.
Then you can do : $ ns235-malicious m-aodv_saa-6611.tcl
-
|
|
|
05-22-2014, 06:00 AM
|
#13
|
LQ Newbie
Registered: May 2014
Posts: 8
Original Poster
Rep: 
|
Quote:
Originally Posted by knudfl
# 11 .
Your files in post #9, { aodv.cc.txt (36.4 kB), aodv.h.txt (10.3 kB) } ,
don't seem to be found anywhere else. And : They are not working.
Please start from scratch, in a new directory:
$ tar xvf ns-allinone-2.35.tar.gz
$ cd ns-allinone-2.35/
$ patch -p0 < aodv-malicious_ns235.patch
... etc. etc., ref. post #6.
Then you can do : $ ns235-malicious m-aodv_saa-6611.tcl
-
|
ok will do that thanks kundfl
|
|
|
All times are GMT -5. The time now is 05:17 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|