Edit DSR routing protocol in ns2

时光总嘲笑我的痴心妄想 提交于 2019-12-11 14:42:22

问题


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?

来源:https://stackoverflow.com/questions/47370370/edit-dsr-routing-protocol-in-ns2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!