Edit DSR routing protocol in ns2

2019-08-22 05:31发布

I have a simulation of a DSR routing protocol. I have 100 nodes (from 0 to 99) and the node 0 sends packets to node 99.But in this simulation I want to modify one of the nodes, for example node 50, the node at the center of topography.
Basically this node has to cheat: every time it receives a route request to node 99, it has to say that it knows the direct route to node 99, without passing through other nodes. In this way, node 0 will usually choose node 50 to send a packet to node 99: this is the scope of the simulation.
After cheating, node 50 has to send a packet to node 99, even if it doesn't really know the route.
How can I do this? I know that I have to edit some files (dsragent.cc for example), in particular some functions. Would anyone be able to help me out?

0条回答
登录 后发表回答