Source code for rushing attack

1,749 views
Skip to first unread message

sankara narayanan

unread,
Aug 14, 2014, 5:09:03 AM8/14/14
to ns-u...@googlegroups.com
Can any one have the code for rushing attack in ns2? 

knudfl

unread,
Aug 14, 2014, 2:41:04 PM8/14/14
to ns-u...@googlegroups.com

Monika Verma

unread,
Sep 15, 2014, 2:31:54 PM9/15/14
to ns-u...@googlegroups.com
hi kundfl,


i have implemented rushing attack in aodv but how can i add this in dsr??

simran kaur

unread,
Nov 29, 2014, 1:35:31 PM11/29/14
to ns-u...@googlegroups.com


MONIKA VERMA. CAN U PLZ GIVE ME CODE FOR RUSHING ATTACK IN AODV

knudfl

unread,
Nov 29, 2014, 3:20:14 PM11/29/14
to ns-u...@googlegroups.com
@ simran kaur ,  Hi.

Everything "Rushing attacks" is linked in my above post  ``Aug 14  2014´´.
Rushing attacks : 
http://wirelessnetworksecurity11.blogspot.dk/2014/01/rushing-attacks-jellyfish-and-byzantine.html

The AODV Rushing attacks code is attached here below : 
{ aodv.cc, aodv.h },  rushingattacks-1.tcl

-
aodv.h
aodv.cc
rushingattacks-1.tcl

simran kaur

unread,
Dec 6, 2014, 2:02:45 AM12/6/14
to ns-u...@googlegroups.com
thnku sir, but this tcl file gives throughput=-0.0. How can i get appropriate throughput after attack

simran kaur

unread,
Dec 6, 2014, 2:53:58 AM12/6/14
to ns-u...@googlegroups.com
sir.i tried these attached files but in nam malicious node is not dropping packets and is still forwarding


On Sunday, November 30, 2014 1:50:14 AM UTC+5:30, knudfl wrote:

knudfl

unread,
Dec 6, 2014, 12:41:39 PM12/6/14
to ns-u...@googlegroups.com
@simran kaur ,  Hi.

""this tcl file gives throughput=-0.0"" :   May be you mean rushingattacks-1.tcl ? ?

I get this result,  the file out.tr from the simulation $ ns-rushing-attack rushingattacks-1.tcl :
*   $ perl throughput-8.pl out.tr cbr 27
*   Average Throughput was: 451.1111066

*   $ awk -f Throughput2007.awk out.tr
*   Average Throughput[kbps] = 993.01                StartTime=41.84        StopTime=100.00

"Throughput scripts,  awk and perl" :   awk-and-perl_scripts_12.2014.tar.gz
https://drive.google.com/file/d/0B7S255p3kFXNY0NROGhkZkIzWDQ/view?usp=sharing

-

knudfl

unread,
Dec 6, 2014, 12:49:08 PM12/6/14
to ns-u...@googlegroups.com
@simran kaur ,   Hi.

» not dropping packets «
$ ns-rushing-attack rushingattacks-1.tcl
$ awk -f droppackets.awk out.tr >> droppackets.txt
....  The result is attached :   droppackets.txt

"droppackets  scripts" :   awk-and-perl_scripts_12.2014.tar.gz  →
→ A collection of  ~140 scripts,  ns2  →
https://drive.google.com/file/d/0B7S255p3kFXNY0NROGhkZkIzWDQ/view?usp=sharing

-
droppackets.txt

simran kaur

unread,
Dec 7, 2014, 6:37:33 AM12/7/14
to ns-u...@googlegroups.com
thnku vry much sir. 
But i get same throughput with rushingattack-1.tcl(malicious tcl) and aodv.tcl(non malicious tcl). Can u plz give me tcl file when no malicious node is added in it, may be this may help
thanks again:)

simran kaur

unread,
Dec 7, 2014, 6:37:40 AM12/7/14
to ns-u...@googlegroups.com
thnku vry much sir. 
But i get same throughput with rushingattack-1.tcl(malicious tcl) and aodv.tcl(non malicious tcl). Can u plz give me tcl file when no malicious node is added in it, may be this may help
thanks again:)

On Saturday, December 6, 2014 11:11:39 PM UTC+5:30, knudfl wrote:

shravan upadhayay

unread,
Jan 31, 2015, 1:05:23 AM1/31/15
to ns-u...@googlegroups.com
Hi

I am looking attack prevention code for rushing attack in Aodv.
any one can help me???????????

Seema choudhary

unread,
May 6, 2017, 11:17:44 PM5/6/17
to Network Simulator 2 (NS2)
hi monika can u hep me in ns2 code for rushing attack in aodv its very urgent

knudfl

unread,
May 7, 2017, 5:12:05 AM5/7/17
to Network Simulator 2 (NS2)
@Seema choudhary ,  Hi.

The only changes for rushing-attacks are with aodv.cc, aodv.h .
The changes for rushing-attacks can be read in the patches.
I attached aodv.cc, aodv.h, rushing-attacks_ns229.patch, rushing-attacks_ns235.patch.
The older *_ns229.patch is simpler, easier to see the added code (malicious, rushingattack, etc.)

INFO,  rushing-attacks : The above posts.

Using :
tar xvf ns-allinone-2.35_gcc482.tar.gz
https
://drive.google.com/file/d/0B7S255p3kFXNSGJCZ2YzUGJDVk0/view?usp=sharing
cd ns
-allinone-2.35/
patch
-p0 < rushing-attacks_ns235.patch
./install
cd ns
-2.35/
cp ns ns
-rushing-attack
sudo cp ns
-rushing-attack /usr/local/bin/

Simulation, still in ns-2.35/ :
ns-rushing-attack rushingattacks-1.tcl
( Or : ./ns rushingattacks-1.tcl )
Dropped packets : awk -f droppackets.awk out.tr >> dropped-packets.xgr
xgraph dropped
-packets.xgr
rushing-attacks_ns229.patch
aodv.h
aodv.cc
rushing-attacks_ns235.patch

amanb...@gmail.com

unread,
May 9, 2017, 11:59:57 PM5/9/17
to Network Simulator 2 (NS2)
HI knudfi thanks your post ,for Rushing attack it is work....

pls help me detection and preventon code  Rushing attack  in ns2 
any one send me detection code by using THRESHOLD  fixed value
my email:     amanb...@gmail.com

urgent pls !!!!!!


amanb...@gmail.com

unread,
May 10, 2017, 12:04:01 AM5/10/17
to Network Simulator 2 (NS2)
thanks your post  rushing attack behaviors  and it work ... but how to detect and prevent this rushing attack by using threshold value  pls help me 
any one send detection code pls
my email: amanbotore@gmail,com

knudfl

unread,
May 10, 2017, 1:15:32 AM5/10/17
to Network Simulator 2 (NS2)
@ amanb...@gmail.com.

Please set up another ns-allinone-2.35~gcc482 in a new folder to try out idsAODV
https://www.google.com/webhp?hl=all&gws_rd=ssl#hl=en&q=idsaodv
( Key words: AODV, Anomaly detection, Black-hole attack, IDSAODV, MANET )
.... I guess idsAODV can be used. May be minor adjustments are required ?

cd ns-allinone-2.35/
patch
-p0 < rushing-attacks_ns235.
patch
patch
-p0 < idsAODV_ns235.patch
https
://drive.google.com/file/d/0B7S255p3kFXNTkc5N0RGVmJSSVk/view?usp=sharing
./install
cd ns
-2.35/
cp ns ns235
-r-attack_idsaodv
sudo cp ns235
-r-attack_idsaodv /usr/local/bin/

Simulation: ns235-r-attack_idsaodv rushingattacks-1.tcl

Everything is working ... good luck with the experiments.

------------------------------------------------
idsAODV_ns235.patch

amanb...@gmail.com

unread,
May 10, 2017, 4:27:30 AM5/10/17
to Network Simulator 2 (NS2)
WOW knudfi thanku very mauch, God Blesses ,for  your post...I wish 4 u all the best thnku


On Thursday, August 14, 2014 at 11:09:03 AM UTC+2, sankara narayanan wrote:

Waqas Junaid

unread,
Jun 22, 2017, 3:53:09 AM6/22/17
to Network Simulator 2 (NS2)
Dear Sir knudfi....

I am working on prevention of multiple rushing attack can you plz send me source code of prevention of rushing attack using the THRESHOLD value

Thanks.

knudfl

unread,
Jun 22, 2017, 9:07:24 AM6/22/17
to Network Simulator 2 (NS2)
@Waqas Junaid ,   Hi.

The only "prevent attack" I have code for is idsAODV.

And you can try adding the patch 'idsAODV-for-M-blackholeaodv_ns235.patch' to a new ns-2.35 :
(You can have as many ns-allinone-2.xx as you want, installed at the same time. But do never add any *PATH text to .bashrc. Not required : Keep all executable´s 'ns-any-name' in /usr/local/bin/.)


cd ns
-allinone-2.35/
patch
-p0 < rushing-attacks_ns235.
patch
patch
-p0 < idsAODV-for-M-blackholeaodv_ns235.patch
./install

My patch.log is attached.

Links for all patches, and the original idsAODV files, IDS.zip ... idsaodv.zip
https://drive.google.com/drive/folders/0B7S255p3kFXNZ2lWZDBRSW40Q00?usp=sharing

All simulations  https://drive.google.com/drive/folders/0B7S255p3kFXNSmRYb2lGcDRUdWs?usp=sharing
patch.log.txt

amanb...@gmail.com

unread,
Jul 27, 2017, 2:40:54 PM7/27/17
to Network Simulator 2 (NS2)
hi ,Waqas junaid

first, i thanks knudfi  more information for source of rushing attack.

if you want prevention rushing attack using threshold value, send your email .. by amanb...@gmail.com ,after that I send some threshold time value concept  c++ code in ns2
I wish all the best!!

On Thursday, August 14, 2014 at 11:09:03 AM UTC+2, sankara narayanan wrote:

Waqas Junaid

unread,
Aug 9, 2017, 1:18:34 PM8/9/17
to Network Simulator 2 (NS2)
Thanks Sir for your reply and for sending links, i will implement these things and will tell you the end results, if i have any problem then plz help me as well again.

Waqas Junaid

unread,
Aug 9, 2017, 1:19:25 PM8/9/17
to Network Simulator 2 (NS2)
thanks sir for your reply, i have mailed you so plz help me.

Waqas Junaid

unread,
Aug 10, 2017, 2:38:12 AM8/10/17
to Network Simulator 2 (NS2)
Dear Sir my email ID is waqasj...@gmail.com


On Thursday, July 27, 2017 at 11:40:54 PM UTC+5, amanb...@gmail.com wrote:

amanb...@gmail.com

unread,
Oct 3, 2017, 4:14:08 AM10/3/17
to Network Simulator 2 (NS2)


On Thursday, August 14, 2014 at 11:09:03 AM UTC+2, sankara narayanan wrote:
Can any one have the code for rushing attack in ns2? 
hi sir  kundfi ..for example blackhole attack edite destination Sequence number .But the Rushing attack edited which parte for send fack request to destination pls send some explanation by  amanb...@gmail.com
thanku for all

sadiqullah samsoor

unread,
Oct 16, 2017, 1:47:56 PM10/16/17
to Network Simulator 2 (NS2)
 Dear knudfl:

I want to implement rushing attack using DSR routing protocol in MANETs. kindly Sir if you have the code for the DSR, kindly upload it or mail me. because i need it.
for me it's so important.
My email address:  sadiqulla...@gmail.com

Sania Noor

unread,
Oct 23, 2017, 6:35:48 PM10/23/17
to Network Simulator 2 (NS2)
Hi knudfl
That's great u r helping with all.
Sir I know how lrushing attack is working, I want to implement rushing attack using dsr routing Protocol in manets. For aodv u uploaded the code but my research is not in aodv routing Protocol, I can't code for rushing attack using dsr.
Plzz help me for the dsr code.
U can mail me on this email" sanian...@gmail.com

knudfl

unread,
Oct 24, 2017, 5:59:03 AM10/24/17
to Network Simulator 2 (NS2)
@Sania Noor ,   Hi.

AFAIK there are no known attacks of any kind for ns2 DSR, sorry.
Blackhole no, malicious no, rushingattacks no, etc. : No.
.... So I guess you are quite on your own.

-------------------------

Sania Noor

unread,
Oct 26, 2017, 3:12:10 PM10/26/17
to Network Simulator 2 (NS2)
Ok...
Thank you Sir.

Sania Noor

unread,
Oct 26, 2017, 3:54:54 PM10/26/17
to Network Simulator 2 (NS2)
Hi knudfl:
Sir, can you help me for tge implementation of grayhole attack using aodv routibg protocol in ns2 for manets.
Sir, if u have the code... plz mail me.

knudfl

unread,
Oct 26, 2017, 4:41:46 PM10/26/17
to Network Simulator 2 (NS2)
@Sania Noor ,  Hi.

Patches : grayholeaodv_ns229.patch,  grayholeaodv_ns235.patch
> ns235 > https://drive.google.com/file/d/0B7S255p3kFXNZEthbi1SSUxpeWs/view?usp=sharing

I guess you can edit "mastertclfile.tcl" to do greyhole : Is already included as an option.
Actually I think you should be able to add greyhole to any simulation.tcl .
My Greyhole archive :  Greyhole-all.tar.gz ( 29.1MB ), incl. mastertclfile.tcl ...
https://www.dropbox.com/s/ljfr3z36bgjhycl/Greyhole-all.tar.gz?dl=0

Manet examples : manet-examples-3.tar.gz
https://drive.google.com/file/d/0B7S255p3kFXNbTdyQjRrR1U5ZTA/view?usp=sharing

------------------------------

Sania Noor

unread,
Oct 27, 2017, 4:14:14 PM10/27/17
to Network Simulator 2 (NS2)
Thank you sir, for helping me.
Sir, I am using aodv protocol for grayhole attack in manets and the simulator is ns2.
Sir, I don't know how to make connection between aodv.cc, aodv.h and tcl_file.
Kindly Sir, help me for making this.

knudfl

unread,
Oct 27, 2017, 7:05:14 PM10/27/17
to Network Simulator 2 (NS2)
@Sania Noor,  Hi.

»» I don't know how to make connection between aodv.cc, aodv.h and tcl_file «« :
Files.cc are not used at run time. Actually you could delete the folder ns-2.35/.
These files only are used by the executable [ns-any-name] :
 ns-allinone-2.35/{ lib/{libtcl*, tclConfig.sh, tcl8*/}, bin/tcsh8* }.

All you have to do is to use a simulation with the protocol GREYHOLEAODV
set val(rp_grey)        GREYHOLEAODV

+ etc. etc. required lines ...

_dst) + $val(nn_grey) + $val(nn_mod) + $val(nn_trust)]
        puts
"   Of which are malicious nodes          : $val(nn_grey)"
    createNodesUsing $val
(nn_grey)          $val(rp_grey)            $chan_1
    colorMultipleNodes $val
(nn_grey)        grey
.... as suggested in mastertclfile.tcl : And leave out non grey expressions.

Tuhin Paul

unread,
Mar 19, 2018, 2:34:23 PM3/19/18
to Network Simulator 2 (NS2)
I am also working on a project to implement rushing attack and then check several parameters. to understand the difference in throughput, delay,pDR, PDr etc before and after attack in AODV or DSR protocol.

Patel Nilam

unread,
Mar 26, 2018, 7:14:07 AM3/26/18
to Network Simulator 2 (NS2)
Hello Sir,

I have perfectely patched 'idsAODV-for-M-blackholeaodv_
ns235.patch' to a new ns-2.35 ,but when I change rp= idsAODV in TCL file , i found   INITIALIZE THE LIST xListHead
ns: _o127 rushingattack:
    (_o127 cmd line 1)
    invoked from within
"_o127 cmd rushingattack"
    invoked from within
this type of error , i use make clean , make, sudo make install and ./configure command all work fine , but at run time I found above error.

thanking you

pls sir help me

nilam

knudfl

unread,
Mar 26, 2018, 8:11:53 AM3/26/18
to Network Simulator 2 (NS2)
@Patel Nilam ,   Hi.

"idsAODV-for-M-blackholeaodv" means an idsAODV patch for a "MohitTahiliani blackholeAODV" patched ns-2.35(4). I.e. the "blackholeAODV" patch must be applied before "idsAODV-for-M-blackholeaodv".

Note : The preferred patches should be  blackholeaodv2013-ns235_1.patch + idsAODV-2-for-blackhole2013-patched_ns235.patch
https://drive.google.com/drive/folders/0B7S255p3kFXNZ2lWZDBRSW40Q00?usp=sharing
------
Your errors :
Looks like you are trying to use the patch in a "rushing-attacks" patched ns2 ?
Please supply the missing information : Current patching, and ns2 version.

Patel Nilam

unread,
Mar 26, 2018, 1:46:49 PM3/26/18
to ns-u...@googlegroups.com

Yes sir I implement rushing attack, as per our ns2 group for rushing attack prevention this idsaodv patch is given so I applied idsaodv patch for prevention, version is ns2.35 if any new patch for prevention of black hole,wormhole and rushing attack pls sir provide me for my research work
Thank you

Pls do needful for me

--
You received this message because you are subscribed to a topic in the Google Groups "Network Simulator 2 (NS2)" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-users/kggr0oIJmtE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-users+unsubscribe@googlegroups.com.
To post to this group, send email to ns-u...@googlegroups.com.
Visit this group at https://groups.google.com/group/ns-users.
For more options, visit https://groups.google.com/d/optout.

Patel Nilam

unread,
Mar 27, 2018, 3:41:07 AM3/27/18
to Network Simulator 2 (NS2)
Respected Sir ,
I have used below code for rushing attack , all things are working good but when I run the rushingattacks-1.tcl using idsAODV in place of AODV , I found INITIALIZE THE LIST xListHead

ns: _o127 rushingattack:
    (_o127 cmd line 1)
    invoked from within
"_o127 cmd rushingattack"
    invoked from within
"catch "$self cmd $args" ret"
    invoked from within
"if [catch "$self cmd $args" ret] {
set cls [$self info class]
global errorInfo
this type of error. I did makeclean, make, sudo make install and ./cofigure command still I found the same error.

what i can do sir pls help me as early as possible.

thanking you sir

nilam 
cd ns-allinone-2.35/
patch
-p0 < rushing-attacks_ns235.
./install
cd ns
-2.35/

cp ns ns235
-r-attack_idsaodv
sudo cp ns235
-r-attack_idsaodv /usr/local/bin/

Simulation: ns235-r-attack_idsaodv rushingattacks-1.tcl

walid zizo

unread,
Mar 27, 2018, 10:27:11 AM3/27/18
to Network Simulator 2 (NS2)
Hello everyone
how to make a node wait for all the RREPs for the analyzes
And thank you in advance

knudfl

unread,
Mar 27, 2018, 10:36:52 AM3/27/18
to Network Simulator 2 (NS2)
@Patel Nilam

Sorry, there seems to be conflicts :  May be impossible to use idsAODV with rushing attacks.

Patel Nilam

unread,
Mar 27, 2018, 1:50:45 PM3/27/18
to ns-u...@googlegroups.com
Thanking you sir

I want to grayhole.tcl  file for ns2.35.

or wormhole.tcl file for ns2.35

--

knudfl

unread,
Mar 27, 2018, 3:16:01 PM3/27/18
to Network Simulator 2 (NS2)
@Patel Nilam ,   Hi.

Wormhole simulation examples : wormhole-ex.tar.gz
https://drive.google.com/file/d/1P9o4lpyJviyDQfVnFQA52zMKvDtThNiP/view?usp=sharing
... Some of the examples are meant for a 'Byzantine Attacks' patched ns-2.29.3 .

You can install the executable 'ns229-ByzantineAttacs-el6' :
byzantine-attacks-ns_2.29-ubuntu16_amd64.deb
https://drive.google.com/drive/folders/0B7S255p3kFXNcEpiMmRyNTVndFE?usp=sharing

All patches  https://drive.google.com/drive/folders/0B7S255p3kFXNZ2lWZDBRSW40Q00?usp=sharing
All examples https://drive.google.com/drive/folders/0B7S255p3kFXNSmRYb2lGcDRUdWs?usp=sharing
To unsubscribe from this group and all its topics, send an email to ns-users+u...@googlegroups.com.

Patel Nilam

unread,
Mar 29, 2018, 3:54:23 AM3/29/18
to Network Simulator 2 (NS2)
Thank you very much sir,


but I can not find the idsaodv patch for rushing attack.

knudfl

unread,
Mar 29, 2018, 11:52:04 AM3/29/18
to Network Simulator 2 (NS2)
Patel Nilam, Hi.

Available is :  idsAODV ... to prevent blackhole.   Nothing else.

Patel Nilam

unread,
Mar 30, 2018, 1:18:42 AM3/30/18
to ns-u...@googlegroups.com
thank you sir.


To unsubscribe from this group and all its topics, send an email to ns-users+unsubscribe@googlegroups.com.

priyami...@gmail.com

unread,
Dec 8, 2018, 2:22:38 AM12/8/18
to Network Simulator 2 (NS2)

Can any one have the code for rushing attack in ns3/

priyami...@gmail.com

unread,
Dec 8, 2018, 2:23:05 AM12/8/18
to Network Simulator 2 (NS2)
Can any one have the code for rushing attack in ns3

knudfl

unread,
Dec 12, 2018, 3:17:08 PM12/12/18
to Network Simulator 2 (NS2)

Aditya Bambang

unread,
Jan 15, 2019, 2:39:37 AM1/15/19
to Network Simulator 2 (NS2)
Hi sir i want to ask..
is there a rushing attack on the lar routing?

testi...@gmail.com

unread,
Apr 23, 2019, 9:46:47 PM4/23/19
to Network Simulator 2 (NS2)
Hi sir, i  want to ask for the eror rushing attack.... plis help me.. thankss

num_nodes is set 25
INITIALIZE THE LIST xListHead
ns: _o127 rushingattack: 
    (_o127 cmd line 1)
    invoked from within
"_o127 cmd rushingattack"
    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 "_o127" line 2)
    (SplitObject unknown line 2)
    invoked from within
"_o127 rushingattack"

----------------------------------------------------------------------------------------------------------------------

Hamid Khan

unread,
Apr 24, 2019, 1:19:37 AM4/24/19
to ns-u...@googlegroups.com
uninstall ns 2 and then do code step by step.....

--
You received this message because you are subscribed to the Google Groups "Network Simulator 2 (NS2)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-users+u...@googlegroups.com.

tester 1231

unread,
Apr 24, 2019, 1:51:46 AM4/24/19
to ns-u...@googlegroups.com
Seriously? You have rushing attack.tcl sir? Do you have file rushing attack.tcl, i think my code eror in aomdv.cc. thanks

knudfl

unread,
Apr 24, 2019, 7:28:36 AM4/24/19
to Network Simulator 2 (NS2)

Your command is missing.  An error output without the used command really tells nothing.
But anyway, it looks like you are using a wrong copy of the executable 'ns'.  ( ns-orig ? with no rushing-a...)

My test :
$ ns235-rushing-attack rushingattacks-1.tcl
num_nodes
is set 25
INITIALIZE THE LIST xListHead
channel
.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_
= 1.5,  distCST_ = 550.0
SORTING LISTS
...DONE!
$ awk
-f droppackets.awk out.tr > dropped-packets.xgr
$ xgraph dropped
-packets.xgr &

Build example, ns-2.35 + rushing attacks  https://groups.google.com/forum/?fromgroups#!topic/ns-users/-BX-ialx8mw → 3/14/18.
droppackets.awk
rushingattacks-1.tcl

ccapt...@gmail.com

unread,
Apr 24, 2019, 7:48:32 AM4/24/19
to Network Simulator 2 (NS2)




Good afternoon .  scholars  Are you fine?  

My Thesis title Sybil attack detection in VANET using AODV routing protocol

1.      How to create Vehicular Ad hoc Network

ü  I would like to implement   45 nodes (40 are vehicles and 5 are road Side Unite ( RSU) in the AODV protocol   in VANET for normal communication .

2.      How to Create Sybil Attack in VANET in AODV protocol in ns2….. VANET )

ü  I would like to implement an  45 nodes (35  are vehicles  and 5 are Road Side Unite (RSU) and 5 Sybil attack )in the AODV protocol   in VANET  communication  ~~~~~~~~~~~~I use Ubuntu 16.04 lts , NS 2.35.

Message has been deleted

testi...@gmail.com

unread,
Apr 25, 2019, 8:33:53 PM4/25/19
to Network Simulator 2 (NS2)
hi sir knudfl, i want to ask for you, i have eror aomdv.cc after make and do you have aomdv.cc file for rushing attacks sir... thanks

ns-allinone-2.35/ns-2.35$ make
aomdv/aomdv.cc: In member function ‘virtual int AOMDV::command(int, const char* const*)’: aomdv/aomdv.cc:190:6: error: ‘malicious1’ was not declared in this scope malicious1= 1000; ^ aomdv/aomdv.cc:197:4: error: ‘malicious1’ was not declared in this scope malicious1=index; ^ aomdv/aomdv.cc: In constructor ‘AOMDV::AOMDV(nsaddr_t)’: aomdv/aomdv.cc:272:2: error: ‘malicious1’ was not declared in this scope malicious1=999; ^ aomdv/aomdv.cc: In member function ‘void AOMDV::rt_resolve(Packet*)’: aomdv/aomdv.cc:654:41: error: ‘malicious1’ was not declared in this scope if((ch->ptype()!=PT_AOMDV) && (index==malicious1)) ^ aomdv/aomdv.cc:704:13: error: ‘malicious1’ was not declared in this scope if(index==malicious1); ^ aomdv/aomdv.cc: In member function ‘virtual void AOMDV::recv(Packet*, Handler*)’: aomdv/aomdv.cc:820:35: error: ‘DELAY’ was not declared in this scope forward((aomdv_rt_entry*) 0, p, DELAY); ^ aomdv/aomdv.cc: In member function ‘void AOMDV::recvRequest(Packet*)’: aomdv/aomdv.cc:1142:7: error: ‘malicious1’ was not declared in this scope if(malicious1== 1000) ^ aomdv/aomdv.cc:1151:5: error: ‘malicious1’ was not declared in this scope if(malicious1== 1000) ^ aomdv/aomdv.cc:1154:33: error: ‘DELAY’ was not declared in this scope forward((aomdv_rt_entry*) 0, p, DELAY); ^ aomdv/aomdv.cc:1158:14: error: ‘malicious1’ was not declared in this scope if(index==malicious1) ^ aomdv/aomdv.cc:1170:36: error: ‘DELAY’ was not declared in this scope forward((aomdv_rt_entry*) 0, p, DELAY); ^ aomdv/aomdv.cc: In member function ‘void AOMDV::forward(aomdv_rt_entry*, Packet*, double)’: aomdv/aomdv.cc:1522:34: error: ‘malicious1’ was not declared in this scope if((ch->ptype()==PT_AOMDV) && (malicious1!=1000)){ ^ aomdv/aomdv.cc: In member function ‘void AOMDV::sendRequest(nsaddr_t)’: aomdv/aomdv.cc:1549:13: warning: unused variable ‘count_req’ [-Wunused-variable] static int count_req=0; ^ aomdv/aomdv.cc: In member function ‘void AOMDV::forwardReply(aomdv_rt_entry*, Packet*, double)’: aomdv/aomdv.cc:2000:35: error: ‘malicious1’ was not declared in this scope if ((ch->ptype()==PT_AOMDV) && (malicious1!=1000)) { ^ aomdv/aomdv.cc: At global scope: aomdv/aomdv.cc:2018:1: error: expected declaration before ‘}’ token } ^ make: *** [aomdv/aomdv.o] Error 1


aomdv.cc

knudfl

unread,
Apr 26, 2019, 6:17:29 AM4/26/19
to Network Simulator 2 (NS2)
@testi...@gmail.com ,    Hi.

This
tar xvf ns-allinone-2.35_gcc5.tar.gz
https
://drive.google.com/file/d/0B7S255p3kFXNVVlxR0ZNRGVORjQ/view?usp=sharing
cd ns
-allinone-2.35/
patch
-p0 < rushing-attacks_ns235.patch
https
://drive.google.com/file/d/0B7S255p3kFXNVXZ0RUpRVTZSVDg/view?usp=sharing
./install
cd ns
-2.35/
cp ns ns235
-rushingattacks
sudo cp ns235
-rushingattacks /usr/local/bin/

------------------ Simulation -----------------
ns235
-rushingattacks rushingattacks-1.tcl

awk
-f droppackets.awk out.tr > dropped-packets.
xgr
xgraph dropped
-packets.xgr &
.... will of course patch ns-2.35 ... to have the right rushing-attacks files.


testi...@gmail.com

unread,
May 4, 2019, 8:18:30 AM5/4/19
to Network Simulator 2 (NS2)
Hi Sir, do you know how to implement rushing attack in DSR? Which should be 
changed? 

knudfl

unread,
May 4, 2019, 11:43:35 AM5/4/19
to Network Simulator 2 (NS2)

There are no examples of any kind of attacks to DSR that I know of.
Reply all
Reply to author
Forward
0 new messages