LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   implement blackhole attack in wireless adhoc networks (https://www.linuxquestions.org/questions/linux-software-2/implement-blackhole-attack-in-wireless-adhoc-networks-941126/)

afsha2719 04-22-2012 09:30 AM

implement blackhole attack in wireless adhoc networks
 
i am trying to implement a new routing protocol in NS2.29 /ns-2.33 to simulate black hole behavoir.for that purpose i have to duplicate AODV protocol in ns durectory & change the name blackholeaodv.and besides this i have to change the name of the all files blackholeaodv except the "aodv_acket.h" .
i have also to make changes in 2 files
1)first in "\tcl|lib|ns-lib.tcl"
2)the second change i have to make in "\make file"
then i have to compile ns2 again by commands make clean,make, make install.my first query is where i have to use these commands i.e make clean,make ,make install.

3)the third file in which change is to be made is blackholeaodv.cc file .the changes that i have to make are
if ( (u_int32_t) ih->saddr() == index)
forward ((blackholeaodv_rt_entry*) 0,p,NO_DELAY);
else
drop(p, DROP_RTR_ROUTE_LOOP);
my second query is do i have to make changes in the blackholeaodv.cc file or do i simply need to add these commands in blackholeaodv.cc file.

regards

jschiwal 04-23-2012 07:11 PM

You cd to the directory were the Makefile exists. The targets like "clean" and "install" are read from the Makefile file.

You will need to read the README or other instructions. Code will need to exist in the correct location. I don't know if you need insert the code, or edit existing lines. Usually you are given patch files containing "diff" output, and use "patch" to make the changes.


All times are GMT -5. The time now is 07:05 PM.