You are on page 1of 2

I want to modify AOMDV routing protocol (multipath routing) based on AODV routing protocol (single path routing).

To update route by RREQ or RREP, I want to use the following pseudo.

Therefore, I need to change in the following source code of aodv.cpp. Right? Refer to the following source codes: From aodv.cpp // The node always creates or updates a reverse route to the Source // IP Address in its routing table. If a route to the Source IP // Address already exists, it is updated only if either // (i) // // the Source Sequence Number in the RREQ is higher than the destination sequence number of the Source IP Addr in the route table, or

// (ii) the sequence numbers are equal, but the hop count as // specified by the RREQ, plus one, is now smaller than the // existing hop count in the routing table. // Sec: 8.5 rtToSrc = AodvCheckRouteExist( sourceAddress, &aodv->routeTable, &isValidSrc); if (!rtToSrc || (((signed)(rtToSrc->destSeqNum - sseqNum)) < 0)

|| ((rtToSrc->destSeqNum == sseqNum) && ((!isValidSrc) || rtToSrc->hopCount > (int) ((typeBitsHopCounts & AODV_HOP_COUNT_BITS) + 1)))) { // 1. the Source Sequence Number from the RREQ is copied to the // corresponding destination sequence number; // // 2. the next hop in the routing table becomes the node // transmitting the RREQ (it is obtained from the source IP // address in the IP header and is often not equal to the // Source IP Address field in the RREQ message); // // 3. the hop count is copied from the Hop Count in the RREQ // message and incremented by one; // Sec: 8.5 rtToSrc = AodvReplaceInsertRouteTable( node, sourceAddress, sseqNum, (typeBitsHopCounts & AODV_HOP_COUNT_BITS) + 1, srcAddr, getSimTime(node) + revRtLifetime, TRUE, interfaceIndex, &aodv->routeTable); To change multipath, I also need to modify AODV routing table structure in aodv.h file. Right? Refer to the following figure. In short, I would like to know which function do I need to modify according to the above pseudo and the following routing table in AODV routing protocol source code.

You might also like