about blackhole attack in ns2.34

408 views
Skip to first unread message

Deepak Mehta

unread,
May 21, 2014, 10:48:07 AM5/21/14
to ns-u...@googlegroups.com
hello sir
myself Deepak Mehta doing black hole experiment in ns2.34
on making changes according to patch blackhole2013-ns234-patchblackhole2013-ns234-patch but after make these error i am facing again and again by making changes manually by said instruction and by patch
one-2.34/lib -ltk8.4 -L/usr/opt/ns-allinone-2.34/lib -ltcl8.4 -lXext -lX11 -lnsl -ldl -lm -lm
blackholeaodv/blackholeaodv.o: In function `blackholeAODV::sendReply(int, unsigned int, int, unsigned int, unsigned int, double)':
blackholeaodv.cc:(.text+0xae5): undefined reference to `blackholeaodv_rtable::rt_lookup(int)'
blackholeaodv/blackholeaodv.o: In function `BlackHoleLocalRepairTimer::handle(Event*)':
blackholeaodv.cc:(.text+0xc98): undefined reference to `blackholeaodv_rtable::rt_lookup(int)'
blackholeaodv/blackholeaodv.o: In function `blackholeAODV::sendRequest(int)':
blackholeaodv.cc:(.text+0xd1f): undefined reference to `blackholeaodv_rtable::rt_lookup(int)'
blackholeaodv.cc:(.text+0xddb): undefined reference to `blackholeaodv_rqueue::deque(int)'
blackholeaodv/blackholeaodv.o: In function `blackholeAODV::recvError(Packet*)':
blackholeaodv.cc:(.text+0x1133): undefined reference to `blackholeaodv_rtable::rt_lookup(int)'
blackholeaodv.cc:(.text+0x1212): undefined reference to `blackholeaodv_rt_entry::pc_empty()'
blackholeaodv.cc:(.text+0x1265): undefined reference to `blackholeaodv_rt_entry::pc_delete()'
blackholeaodv/blackholeaodv.o: In function `blackholeAODV::recvReply(Packet*)':
blackholeaodv.cc:(.text+0x1303): undefined reference to `blackholeaodv_rtable::rt_lookup(int)'
blackholeaodv.cc:(.text+0x1327): undefined reference to `blackholeaodv_rtable::rt_add(int)'
blackholeaodv.cc:(.text+0x14ce): undefined reference to `blackholeaodv_rqueue::deque(int)'
blackholeaodv.cc:(.text+0x1543): undefined reference to `blackholeaodv_rtable::rt_lookup(int)'
blackholeaodv.cc:(.text+0x15ad): undefined reference to `blackholeaodv_rt_entry::pc_insert(int)'
blackholeaodv/blackholeaodv.o: In function `blackholeAODV::recvRequest(Packet*)':
blackholeaodv.cc:(.text+0x1688): undefined reference to `blackholeaodv_rtable::rt_lookup(int)'
blackholeaodv.cc:(.text+0x16ac): undefined reference to `blackholeaodv_rtable::rt_add(int)'
blackholeaodv.cc:(.text+0x1870): undefined reference to `blackholeaodv_rqueue::deque(int)'
blackholeaodv.cc:(.text+0x1899): undefined reference to `blackholeaodv_rtable::rt_lookup(int)'
blackholeaodv.cc:(.text+0x1a0e): undefined reference to `blackholeaodv_rt_entry::pc_insert(int)'
blackholeaodv.cc:(.text+0x1a23): undefined reference to `blackholeaodv_rt_entry::pc_insert(int)'
blackholeaodv/blackholeaodv.o: In function `blackholeAODV::rt_purge()':
blackholeaodv.cc:(.text+0x1ca9): undefined reference to `blackholeaodv_rqueue::deque(int)'
blackholeaodv.cc:(.text+0x1d33): undefined reference to `blackholeaodv_rqueue::deque(int)'
blackholeaodv.cc:(.text+0x1d5e): undefined reference to `blackholeaodv_rqueue::find(int)'
blackholeaodv/blackholeaodv.o: In function `blackholeAODV::rt_resolve(Packet*)':
blackholeaodv.cc:(.text+0x1e2b): undefined reference to `blackholeaodv_rtable::rt_lookup(int)'
blackholeaodv.cc:(.text+0x1e56): undefined reference to `blackholeaodv_rtable::rt_add(int)'
blackholeaodv.cc:(.text+0x1ec0): undefined reference to `blackholeaodv_rqueue::enque(Packet*)'
blackholeaodv.cc:(.text+0x1efd): undefined reference to `blackholeaodv_rqueue::enque(Packet*)'
blackholeaodv/blackholeaodv.o: In function `blackholeAODV::local_rt_repair(blackholeaodv_rt_entry*, Packet*)':
blackholeaodv.cc:(.text+0x1fbe): undefined reference to `blackholeaodv_rqueue::enque(Packet*)'
blackholeaodv/blackholeaodv.o: In function `blackholeAODV::handle_link_failure(int)':
blackholeaodv.cc:(.text+0x20ec): undefined reference to `blackholeaodv_rt_entry::pc_delete(int)'
blackholeaodv/blackholeaodv.o: In function `blackholeAODV::nb_delete(int)':
blackholeaodv.cc:(.text+0x2151): undefined reference to `blackholeAODV::log_link_del(int)'
blackholeaodv/blackholeaodv.o: In function `blackholeAODV::rt_ll_failed(Packet*)':
blackholeaodv.cc:(.text+0x2376): undefined reference to `blackholeAODV::log_link_broke(Packet*)'
blackholeaodv.cc:(.text+0x2398): undefined reference to `blackholeaodv_rtable::rt_lookup(int)'
blackholeaodv.cc:(.text+0x23e1): undefined reference to `blackholeAODV::log_link_del(int)'
blackholeaodv/blackholeaodv.o: In function `blackholeAODV::blackholeAODV(int)':
blackholeaodv.cc:(.text+0x2586): undefined reference to `blackholeaodv_rqueue::blackholeaodv_rqueue()'
blackholeaodv/blackholeaodv.o: In function `blackholeAODV::blackholeAODV(int)':
blackholeaodv.cc:(.text+0x273a): undefined reference to `blackholeaodv_rqueue::blackholeaodv_rqueue()'
 
plz do favour in this regard where i m making mistake
plz plz
from
Deepak Mehta
contact_...@yahoo.co.in

knudfl

unread,
May 21, 2014, 12:54:09 PM5/21/14
to ns-u...@googlegroups.com
Hi.

Which OS are you using ? 
a) Please show the output from the command  $ uname -m
b) OS name and version.

* New patches ( same files as you are using ) :
blackholeaodv2013-ns234_4.patch,  blackholeaodv2013-ns235_1.patch
-
blackholeaodv2013-ns234_4.patch
blackholeaodv2013-ns235_1.patch

Mohit Tahiliani

unread,
May 22, 2014, 8:48:47 AM5/22/14
to ns-u...@googlegroups.com
Hi,

You may try the Blackhole patch provided on the following link: 

Note that it works with ns-2.35, however!


Hope it helps.

Regards,
Mohit P. Tahiliani


--
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.
To post to this group, send email to ns-u...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-users.
For more options, visit https://groups.google.com/d/optout.

knudfl

unread,
May 23, 2014, 7:43:20 AM5/23/14
to ns-u...@googlegroups.com
@ Mohit P. Tahiliani ,  Hi.

But your patch don't work with the examples.tcl made for the classic 2005 blackholeaodv(.zip)
The patches blackholeaodv2013-ns234_4.patch, blackholeaodv2013-ns235_1.patch,
blackholeaodv2005-ns235-patch.tar.gz do.

The reason that the {ns235 + blackholeaodv} fails for the OP, @Deepak Mehta :
A too late g++? Version "g++ -4.4.x" will do the job.


Your code : You are asking for comments here ... 
http://network-simulator-ns-2.7690.n7.nabble.com/Patch-for-Blackhole-Attack-in-ns-2-developed-Link-went-missing-in-previous-mail-td28769.html
→ I will send you a "Bug" report.

-
blackhole2013-ns234-files.tar.gz
evignan4u-adding_blackhole.html
blackholeaodv2005-ns235-patch.tar.gz
blackholeaodv2005-examples-1.tar.gz

Mohit Tahiliani

unread,
May 23, 2014, 10:09:11 AM5/23/14
to ns-u...@googlegroups.com
@knudfl - 

The sole purpose of designing this patch was to eliminate the need for creating a whole new protocol - just for launching an attack.

The patch which I provided yesterday does not create a new routing protocol like blackholeaodv.zip does.

I agree to your point that "example.tcl" may not work with my patch (because it is designed for blackholeaodv.zip) - that's why I have provided a sample TCL along with my patch!

I will be very glad if you could send me the bug report which you mentioned. I will try solving the errors you have found.

Thanks for your help! Appreciate it.

Regards,
Mohit P. Tahiliani

knudfl

unread,
May 23, 2014, 10:40:45 AM5/23/14
to ns-u...@googlegroups.com
@Mohit .  Hi


""The sole purpose of designing this patch was to eliminate the need for creating a whole new protocol
 - just for launching an attack."" :   Excellent , Thank you.

Report : Actually there should already be two messages in your mail.

Kind Regards , knudfl.

-

ssbb...@gmail.com

unread,
Mar 31, 2016, 3:35:03 AM3/31/16
to Network Simulator 2 (NS2)
Hello
we r using OS: ubuntu 14.04...and i686 and we r having same error as Deepak's, We r using NS-2.35.
We hav applied the blackhole.patch given in followng link.


Please help us.thanku.


ssbb...@gmail.com

unread,
Mar 31, 2016, 5:43:45 AM3/31/16
to Network Simulator 2 (NS2)
we figured out this problem;)
Reply all
Reply to author
Forward
0 new messages