NS2-协议修改-AODV
我想计算运行时从 NS2 中的节点发送的数据包数量。因为我想使用 C++ 更改 AODV 协议。有人可以帮助我如何继续吗?
我尝试编辑 aodv.cc 中的 receive() 函数来计算接收的数据包数量,并编辑forward() 函数来计算发送的数据包数量。我无法识别数据包来自哪个节点以及数据包转发到哪个节点。我想知道每个节点上计算信任值的计数并找到恶意节点。您能帮助我如何获取并继续吗?在 AODV 中使用混杂模式怎么样?我对所有这些都很陌生。先感谢您。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以找到发送和接收的每个数据包的源和目的地。并且还可以轻松找到发送和接收的数据包数量。
例如,如果 aodv 的问候消息...
源地址和目标地址可以在recvhello()中找到
使用 rp->rp_src() sorce 或 ih->saddr()
并且 rp->rp_dst() 接收 cal 的目的地和节点也可以通过其(索引)找到..............
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)...........