I made one privacy algorithm, I just want to simulate it with the wireless networks, for that I am using AODV. I want to know how can I integrate my program with NS2.
I made one privacy algorithm, it is basically for source node identification. Only immediate node and destination node will have the information about source node.
As I am implementing this algorithm in wireless network(using AODV), so I just want to know where can I put my code in NS2 so that it can work similar to the existing algorithms.
It depends on your algorithm. What your algorithm does, also matters. You designed your algorithm so I think you have go through whole code of aodv and find a proper place to add your code.
There is a source file in NS2 named aodv.cc ,you will have to make a copy of that file and make changes in that copy and add that in your make file as a new protocol.See the steps on how to add new routing protocol in ns2 , and in aodv.cc file ,add your code in appropriate place from where it can be called by your awk script or tcl file.