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-21-2014, 07:12 AM   #1
saa-6611
LQ Newbie
 
Registered: May 2014
Posts: 8

Rep: Reputation: Disabled
Post 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"
Attached Files
File Type: txt aodv.tcl.txt (3.9 KB, 112 views)

Last edited by saa-6611; 05-21-2014 at 08:49 AM.
 
Old 05-21-2014, 08:39 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,518

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
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

-
 
Old 05-21-2014, 08:50 AM   #3
saa-6611
LQ Newbie
 
Registered: May 2014
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
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

-
My .tcl file is attached
Attached Files
File Type: txt aodv.tcl.txt (3.9 KB, 61 views)
 
Old 05-21-2014, 10:41 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,518

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 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/
-
Attached Files
File Type: txt m-aodv_saa-6611.tcl.txt (4.1 KB, 140 views)
File Type: txt aodv-malicious_ns235.patch.txt (1.2 KB, 138 views)

Last edited by knudfl; 05-21-2014 at 11:16 AM.
 
Old 05-21-2014, 11:52 AM   #5
saa-6611
LQ Newbie
 
Registered: May 2014
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
# 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"
 
Old 05-21-2014, 02:32 PM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,518

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 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/

-
 
Old 05-22-2014, 01:47 AM   #7
saa-6611
LQ Newbie
 
Registered: May 2014
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
# 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
 
Old 05-22-2014, 02:13 AM   #8
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,518

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 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.

-
 
Old 05-22-2014, 02:24 AM   #9
saa-6611
LQ Newbie
 
Registered: May 2014
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
# 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
Attached Files
File Type: txt aodv.cc.txt (36.4 KB, 87 views)
File Type: txt aodv.h.txt (10.3 KB, 64 views)
 
Old 05-22-2014, 04:23 AM   #10
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,518

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 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 ?

-
 
Old 05-22-2014, 04:38 AM   #11
saa-6611
LQ Newbie
 
Registered: May 2014
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
# 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
 
Old 05-22-2014, 05:24 AM   #12
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,518

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 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

-
 
Old 05-22-2014, 06:00 AM   #13
saa-6611
LQ Newbie
 
Registered: May 2014
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
# 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
 
  


Reply

Tags
malicious, 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
optimizing node energy AODV in NS2 must Linux - Wireless Networking 1 03-31-2014 04:55 AM
Error on Tcl when add misbehavior node in aodv ns2 D4SH_SI4 Linux - Networking 5 06-28-2013 12:57 AM
after aodv.tcl error chenil Linux - Newbie 1 06-02-2013 03:00 PM
NS-2: Malicious node in AODV Error amissan Linux - Software 1 05-05-2013 10:28 AM
tunnel formation between two malicious node by modifying aodv ns2 indumit18 Linux - Newbie 0 10-28-2011 05:38 AM

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

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