移动自组网路由与密钥管理优化方案
1. AODV 协议优化方案
在 Ad hoc 按需路由协议(AODV)中,当需要同时建立多个连接时,由于控制开销较大,数据分组的传输效率会受到严重影响。为了解决这个问题,提出了一种最小化路由开销的方案,即 M - AODV。
1.1 M - AODV 伪代码实现
下面是 M - AODV 的伪代码,涵盖了数据发送、路由请求和回复处理等关键过程:
/* Source sends data to destination */ Procedure send - data (S, D) //S: Source node, D: Destination node { if ( rt == 0) //rt is a routing table entry for D and rt = 0 means no entry for D Send - RREQ (D); else S sends data to D using the routing table entry rt; } Procedure Send - RREQ (D) //S broadcast the RREQ packet to find route to D { Broadcast (P); //P is a RREQ packet that contains the fields:hop_count, RREQ_id, //dst_address, dst_seqno, src_address,