LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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


Reply
  Search this Thread
Old 05-19-2013, 02:38 PM   #16
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 CentOS7.9 + 50+ other Linux OS, for test only.
Posts: 17,486

Rep: Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635

Post #15, @rah12345 : Welcome to LQ.

Did you compile the changes in { aodv.cc aodv.h tcl/lib/files.tcl }
into the executable 'ns' ?

Your errors : Assuming that the above has been done successfully,
somebody may have a chance to answer, when you attach the tcl file,
you are trying to run with $ ns file.tcl .
Please attach as file.tcl.txt ( suffix .txt is a must ) :
The paper clip button in the 'Advanced Editor' is used for attachments.

And also explain which changes you made to ns-2.<version> :
A link to the modification instructions, please.

-
 
Old 05-19-2013, 04:45 PM   #17
rah12345
LQ Newbie
 
Registered: May 2013
Posts: 3

Rep: Reputation: Disabled
@knudfl

thank you for replying.
the tcl script is a normal 6 node wireless scenario... to make a node malicious i have added the following lines of code:$ns at 0.0 "[$n(4) set ragent_] malicious"

i am using ns2.35 installed correctly to my knowledge.
Attached Files
File Type: txt aodv .tcl.txt (6.2 KB, 154 views)
 
Old 05-19-2013, 10:44 PM   #18
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 CentOS7.9 + 50+ other Linux OS, for test only.
Posts: 17,486

Rep: Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635
#16 < #15.
Quote:
have made the appropriate changes to the aodv.cc .h and .tcl files.
Please answer all the questions from post #16 :
1) Did you compile the changes in {aodv.cc aodv.h tcl/lib/files.tcl} into the executable 'ns'?

2) .. explain which changes you made to ns-2.35,
and tell which line numbers are the changes.
2a) Provide a link to the modification instructions, please.

And attach the modified files as aodv.cc.txt, aodv.h.txt,
+ all modified tcl/lib/files.tcl : .txt

-

Last edited by knudfl; 05-20-2013 at 04:34 AM.
 
Old 05-20-2013, 07:00 AM   #19
saeed.m
LQ Newbie
 
Registered: Apr 2013
Posts: 17

Original Poster
Rep: Reputation: Disabled
hi
it may you send bad parameter from tcl file ("malicious")
 
Old 05-21-2013, 09:25 AM   #20
rah12345
LQ Newbie
 
Registered: May 2013
Posts: 3

Rep: Reputation: Disabled
I have compiled the codes into the ns.
i am getting errors:ns: _o110 malicious:
(_o110 cmd line 1)
invoked from within
"_o110 cmd malicious"
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 "_o110" line 2)
(SplitObject unknown line 2)
invoked from within
"_o110 malicious"
Attached Files
File Type: txt aodv.cc.txt (34.3 KB, 106 views)
File Type: txt aodv.h.txt (9.6 KB, 80 views)
File Type: txt installation part 2 complete translation.txt (2.7 KB, 100 views)
 
Old 05-22-2013, 06:14 AM   #21
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 CentOS7.9 + 50+ other Linux OS, for test only.
Posts: 17,486

Rep: Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635
# 20 . Please read aodv.cc, line 84 :
if(strcmp(argv[1], "hacker") == 0) {
malicious = true;


The tcl file, aodv-?.tcl :
Edit line 139 to :
$ns at 0.0 "[$n(4) set ragent_] hacker"
-
Attached Files
File Type: txt aodv-m.tcl.txt (6.2 KB, 110 views)
File Type: txt maodv_802_15_4.tcl.txt (4.1 KB, 97 views)

Last edited by knudfl; 05-22-2013 at 06:26 AM.
 
Old 06-03-2013, 02:42 PM   #22
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 CentOS7.9 + 50+ other Linux OS, for test only.
Posts: 17,486

Rep: Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635
@saeed.m :

So far I haven't got your files, "blackholeAODV version 2012" to work.

But I got some older files (2005) from @k_kimo, ref. this thread :
http://www.linuxquestions.org/questi...cl-4175460864/

I added your 'ns-lib.tcl', and a 'packet.h' with blackholeAODV entries.
Repacked to blackholeaodv2005-ns235-patch.tar.gz :
http://www.linuxquestions.org/questi...-4175460864/#4

-
 
Old 09-08-2013, 01:54 PM   #23
deepidua
LQ Newbie
 
Registered: Aug 2013
Posts: 1

Rep: Reputation: Disabled
m also getting the prob in adding malicious node in ns2.35 in aodv protocol....i compiled d changes made and getting d error _o171 hacker 99:
(_o171 cmd line 1)
invoked from within
"_o171 cmd hacker 99"
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 "_o171" line 2)
(SplitObject unknown line 2)
invoked from within
"_o171 hacker 99"


ny idea???
 
Old 09-08-2013, 05:09 PM   #24
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 CentOS7.9 + 50+ other Linux OS, for test only.
Posts: 17,486

Rep: Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635
Post # 23, @deepidua.

Have you read post #21 ?

If you want answers :
The minimum information is to tell which tcl file you are using.

And : Please read the blackholeaodv threads :
http://www.linuxquestions.org/questi...blackholeaodv/
Examples http://www.linuxquestions.org/questi...-4175460864/#4

-
 
Old 12-24-2013, 05:13 AM   #25
omarmakram
LQ Newbie
 
Registered: Dec 2013
Posts: 1

Rep: Reputation: Disabled
num_nodes is set 20
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
INITIALIZE THE LIST xListHead
Loading connection pattern...
Loading scenario file...
Starting Simulation..
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5, distCST_ = 550.0
SORTING LISTS ...DONE!
MAC_802_11: accessing MAC cache_ array out of range (src 21, dst 20, size 20)!
MAC_802_11: accessing MAC cache_ array out of range (src 20, dst 21, size 20)!
MAC_802_11: accessing MAC cache_ array out of range (src 21, dst 20, size 20)!
MAC_802_11: accessing MAC cache_ array out of range (src 20, dst 21, size 20)!
MAC_802_11: accessing MAC cache_ array out of range (src 21, dst 20, size 20)!
MAC_802_11: accessing MAC cache_ array out of range (src 20, dst 21, size 20)!
MAC_802_11: accessing MAC cache_ array out of range (src 21, dst 20, size 20)!
MAC_802_11: accessing MAC cache_ array out of range (src 20, dst 21, size 20)!
MAC_802_11: accessing MAC cache_ array out of range (src 20, dst 21, size 20)!
MAC_802_11: accessing MAC cache_ array out of range (src 21, dst 20, size 20)!
[suppressing additional MAC cache_ warnings]
node 18 is not defined... node 17 is not defined... node 16 is not defined... node 15 is not defined... node 14 is not defined... node 13 is not defined... node 12 is not defined... node 11 is not defined... node 10 is not defined... node 9 is not defined... node 8 is not defined... node 7 is not defined... node 6 is not defined... node 5 is not defined... node 4 is not defined... node 3 is not defined... node 2 is not defined... node 1 is not defined... node 0 is not defined... node 18 is not defined... node 17 is not defined... node 16 is not defined... node 15 is not defined... node 14 is not defined... node 13 is not defined... node 12 is not defined... node 11 is not defined... node 10 is not defined... node 9 is not defined... node 8 is not defined... node 7 is not defined... node 6 is not defined... node 5 is not defined... node 4 is not defined... node 3 is not defined... node 2 is not defined... node 1 is not defined... node 0 is not defined... NS EXITING...
 
Old 02-16-2015, 07:46 AM   #26
salwa
Member
 
Registered: Dec 2014
Posts: 36

Rep: Reputation: Disabled
Hi,

I add a malicious node to AODV protocol (modified AODV.cc and AODV.h ). But when I perform my tcl file I dont see any modification in the result. where is the problem please am I must to modify other file in ns2 rather than AODV.cc and AODV.h or what ? Thank you very much in advance I need your help please.
my tcl file is attached below:
Attached Files
File Type: txt article2-20noeuds.tcl.txt (11.8 KB, 52 views)
 
Old 02-16-2015, 08:25 AM   #27
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 CentOS7.9 + 50+ other Linux OS, for test only.
Posts: 17,486

Rep: Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635
← ref. #26.

Latest blackholeAODV info, post #2 here ...
http://www.linuxquestions.org/questi...-4175533469/#2

Your original "article2.tcl"
http://www.linuxquestions.org/questi...em-4175526329/
... works OK : $ ns235-blackholeaodv2013 article2.tcl


Quote:
... I must to modify other file in ns2 .... ?
Please see the Mohit Tahiliani "blackholeAODV"
http://mohittahiliani.blogspot.in/20...k-in-ns-2.html

-
 
Old 02-17-2015, 06:03 AM   #28
salwa
Member
 
Registered: Dec 2014
Posts: 36

Rep: Reputation: Disabled
Thank you for your response,
I add a blackhole but when I perform my tcl file I dont see any change in the result between the case with attack and without attack. Please I need your help
 
Old 02-17-2015, 11:21 AM   #29
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 CentOS7.9 + 50+ other Linux OS, for test only.
Posts: 17,486

Rep: Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635Reputation: 3635
← ref. #28.
Quote:
I add a blackhole
.
I dont see any change
Nothing is supposed to happen unless you add "blackhole" to :
ns-2.3x/tcl/lib/{ ns-<file(s)>.tcl },
... and compile the changes into the executable "ns-blackhole".


-
 
  


Reply

Tags
aodv-malicious, blackhole, blackholeaodv, 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
[SOLVED] Help me in implementing RTP protocol nikhilvs9999 Linux - Networking 11 09-06-2012 06:26 AM
implementing DSR in NS2 ritoban87 Linux - Networking 3 05-24-2012 05:15 AM
NS2 - Experts for Implementing attack krishnaceg Linux - Wireless Networking 2 10-30-2011 08:16 AM
i am using ubuntu as os. for NS2 to implement a routing protocol in ns2. sujovasu Programming 1 07-27-2010 01:44 AM
weight throwing protocol using ns2 code,diffusion based protocol using ns2 code rajrupa Linux - Networking 1 05-27-2010 03:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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