AODV CODE explanation NS2

1.8k Views Asked by At

Please I have to modify on the AODV protocol. But before that I read it and tried to understand the source code in the ns2 I have confused by these parameters:

1- REQ message : what are the req_src and req_des in this message? is it change during flooding the request from source until it reach the destination? and what are the addresses for this header (( hdr_ip *ih = HDR_IP(p) )) they change the ih->dadrr() AND the ih->saddr(). what is the relation between these addresses and the Request message addresses?

2- in the Request Message phase; the reverse table is built, so it contain for each entry << destination, #hop, next hop , seq>> So it built to be the destination = the original source, right? on the other hand, could I consider this reverse entry as rout entry?

also on the Reply phase, when node receive (REP) message, it will lookup in its routing table for the key destination which is (( rp->rp_dst )) . So the question here, is it the same of the reverse table? dose the (rp->rp_dst) represent the (( original destination)?

3- what are the differences between REQ & REP messages in terms of the SCR and DES in their messages and the ih->daddr && ih->saddr ? on other side, what about the reverse and forward routing table?

1

There are 1 best solutions below

0
On

question one:

  rq->rq_src :source node  rq->rq_dst:destination node

  ih->saddr() is the IP level message mean who send the package

  ih->daddr() equal rq->rq_dst for rt or rq->rq_src for rt0.