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?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):