2

I want to count the number of packets being sent from a node in NS2 at run time. That for I would like to make changes in AODV protocol using C++. Could someone help me how to proceed?

I Tried editing the recv() function to count the number of packets being received and forward() function in aodv.cc to count the number of packets being sent. I am not able to identify from which node the packet came and to which node the packet being forwarded. I want to know the count for calculating trust value on each node and find malicious one. Can you please help me how to get and proceed. What about using promiscuous mode in AODV. I am very new to all these. Thank you in advance.

Fidel Thachil
  • 81
  • 1
  • 5

1 Answers1

1

u can find the source and destination of every packet sent and being received. and can also easily find the number of packets sent and received.
for example in case of hello messages of aodv... source and destination address can be found in recvhello() using rp->rp_src() sorce or ih->saddr() and rp->rp_dst() destination and node at which is recieving cal also be found by simply its (Index)...........