LinuxQuestions.org
Review your favorite Linux distribution.
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 04-01-2013, 01:17 AM   #1
saeed.m
LQ Newbie
 
Registered: Apr 2013
Posts: 17

Rep: Reputation: Disabled
implementing new protocol in ns2.35


hi all
i am trying to implement new AODV protocol in ns2.35 simulator to simulate black hole attack .i have changed the following files
ns-agent.tcl and Makefile and after all make command issued to rebuild NS but when i trying to use new agent(blackholeAODV) the system giving the notify that the agent have been not created.
please help me to solve this problem .
thanks.
 
Old 04-01-2013, 01:42 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

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

Please show the line that you edited or added in the Makefile.
And also show the line number for that line.
 
Old 04-01-2013, 01:55 AM   #3
saeed.m
LQ Newbie
 
Registered: Apr 2013
Posts: 17

Original Poster
Rep: Reputation: Disabled
my makefile changes is below

blackholeaodv/blackholeaodv_logs.o blackholeaodv/blackholeaodv.o \
blackholeaodv/blackholeaodv_rtable.o blackholeaodv/blackholeaodv_rqueue.o \
i have been add these lines at 278 of my makefile
 
Old 04-01-2013, 02:07 AM   #4
saeed.m
LQ Newbie
 
Registered: Apr 2013
Posts: 17

Original Poster
Rep: Reputation: Disabled
the output that system show me is below
Click image for larger version

Name:	1.png
Views:	165
Size:	57.2 KB
ID:	12179

Click image for larger version

Name:	2.png
Views:	111
Size:	72.2 KB
ID:	12180
 
Old 04-01-2013, 03:43 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
#4
Quote:
invalid command name "Agent/blackholeAODV"
Means that no blackholeAODV was compiled into the 'ns' executable.

? Should something be added to ns-lib.tcl ?
http://imraan-prrec.blogspot.dk/2012...k-in-aodv.html

Could you possibly upload the "blackholeAODV" code to Google Docs ?
blackholeAODV.zip ?

And please also tell which OS you are using :
Like Ubuntu 12.04-amd64, Fedora 17-32bit, etc.

Also : Please show a link to the file 'bhAODV.tcl'.
? http://www.btechnos.com/2012/05/tcl-...blackhole.html
> blackholeaodv.tcl ?

-

Last edited by knudfl; 04-01-2013 at 03:46 AM.
 
Old 04-01-2013, 05:14 AM   #6
saeed.m
LQ Newbie
 
Registered: Apr 2013
Posts: 17

Original Poster
Rep: Reputation: Disabled
i am using fedora 2.6.23.1-42. fc8 32bit
the link below contain all files that you maybe need
http://rapidshare.com/files/26674483...20question.zip

also i was in mistake at first post, i have changed the ns-lib file that i did say you ns-agent
the changes that i am making in the file ns-lib are below

blackholeAODV {
set ragent [$self create-blackholeaodv-agent $node]
}
Simulator instproc create-blackholeaodv-agent { node } {
set ragent [new Agent/blackholeAODV [$node node-addr]]
$self at 0.0 "$ragent start" # start BEACON/HELLO Messages
$node set ragent_ $ragent
return $ragent
}
 
Old 04-01-2013, 08:15 AM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 6 : OK, where did you get the files in the "blackholeaodv/" folder ?
A link and a package name please.
Quote:
I have changed the ns-lib file that I did say you ns-agent
the changes that I am making in the file ns-lib are below
Not quite clear. Please use the real file names like
tcl/lib/ns-lib.tcl and tcl/lib/ns-agent.tcl

And : Please attach the edited file as ns-lib.tcl.txt
Attachments : The 'paper clip tool' in the Advanced Editor.
Or upload the file.
( This file is missing in the package "with all files".)

About the Makefile.in : All "blackhole*" text is missing. Should be like:
<TAB>blackholeaodv/blackholeaodv_logs.o blackholeaodv/blackholeaodv.o \
<TAB>blackholeaodv/blackholeaodv_rtable.o blackholeaodv/blackholeaodv_rqueue.o \

-
 
Old 04-01-2013, 03:34 PM   #8
saeed.m
LQ Newbie
 
Registered: Apr 2013
Posts: 17

Original Poster
Rep: Reputation: Disabled
i have created a folder with the name of blackholeaodv at the below directory
ns-allinone-2.35\ns-2.35\

Quote:
I have changed the ns-lib file that I did say you ns-agent
the changes that I am making in the file ns-lib are below
my purpose about top sentence is that: i changed only the file tcl/lib/ns-lib.tcl .

you can download the tcl/lib/ns-lib.tcl that i have apply some change from the below link.
http://rapidshare.com/files/3107167795/ns-lib.tcl

i note you that i have not any problem during the build. that is when i have clear the object files(*.obj) from ns-allinone-2.35\ns-2.35\blackholeaodv and reusing the make command the system created them again.

ns-2.35 have three makefile(makefile, makefile.in, makefile.vc) should i change all these three files our if not witch must be changed?
 
Old 04-01-2013, 05:21 PM   #9
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 8.
Quote:
ns-2.35 have three makefile(makefile, makefile.in, ...
The file names are Makefile, Makefile.in : Upper case M.
( "makefile.vc" : visual c++ only.)
Default is : Edit the Makefile.in, and then : ./configure && make.


Quote:
ns-allinone-2.35\ns-2.35\blackholeaodv
Windows© ? You said Fedora : Then it is ns-allinone-2.35/ns-2.35/blackholeaodv.
I.e. no back slashes can be used this way in Fedora.


→ → Not a valid link.
Says : Download not available. Download permission denied by uploader.

-
 
Old 04-02-2013, 11:35 AM   #10
saeed.m
LQ Newbie
 
Registered: Apr 2013
Posts: 17

Original Poster
Rep: Reputation: Disabled
sorry i haven't apply required permissions to download but no i changed download required permission.
now you can download the file from below link

https://rapidshare.com/files/3107167795/ns-lib.tcl
 
Old 04-03-2013, 12:34 AM   #11
saeed.m
LQ Newbie
 
Registered: Apr 2013
Posts: 17

Original Poster
Rep: Reputation: Disabled
i have not use before the ./configure command , so when i issue this command the result of last lines is in below,

Click image for larger version

Name:	r1.png
Views:	95
Size:	64.1 KB
ID:	12199

Last edited by saeed.m; 04-03-2013 at 12:35 AM.
 
Old 04-03-2013, 02:42 AM   #12
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 11.

No errors. You can then run 'make'.
 
Old 04-03-2013, 06:22 AM   #13
saeed.m
LQ Newbie
 
Registered: Apr 2013
Posts: 17

Original Poster
Rep: Reputation: Disabled
#12

i have run the make command. but now when i try to use my new agent the invalid command name "Agent/blackholeAODV" error now exist.
 
Old 04-03-2013, 08:11 AM   #14
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 13 .
Quote:
invalid command name "Agent/blackholeAODV"
That's the result I get too. And so far no solution.
 
Old 05-19-2013, 01:39 PM   #15
rah12345
LQ Newbie
 
Registered: May 2013
Posts: 3

Rep: Reputation: Disabled
aodv modification

hi
i have added a malicious node to my AODV network. have made the appropriate changes to the aodv.cc .h and .tcl files.on running following error is produced:
ns: _o66 malicious:
(_o66 cmd line 1)
invoked from within
"_o66 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 "_o66" line 2)
(SplitObject unknown line 2)
invoked from within
"_o66 malicious"


wat went wrong?

Last edited by rah12345; 05-19-2013 at 01:40 PM.
 
  


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 10:22 PM.

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