Number of hops along a route using AODV protocol in ns2.35
In aodv.cc I put this below printf to show the number of hops from a particular source to destination node.
AODV::recvRequest(Packet *p) { printf("Hop_Count_ %d | from %d to %d \n \n",rq->rq_hop_count,ih->saddr(),ih->daddr());//Additional It is showing me output like this which is not correct I guess.Can anyone suggest me where I am wrong. num_nodes is set 30 INITIALIZE THE LIST xListHead Starting Simulation........ channel.cc:sendUp - Calc highestAntennaZ_ and distCST_ highestAntennaZ_ = 1.5, distCST_ = 1856.3 SORTING LISTS ...DONE! Hop_Count_ 1 | from 0 to -1 Hop_Count_ 1 | from 0 to -1 Hop_Count_ 1 | from 21 to -1 Hop_Count_ 1 | from 0 to -1 Hop_Count_ 1 | from 0 to -1 Hop_Count_ 1 | from 15 to -1 Hop_Count_ 1 | from 9 to -1 Hop_Count_ 1 | from 4 to -1 Hop_Count_ 1 | from 15 to -1 Hop_Count_ 2 | from 16 to -1 Hop_Count_ 1 | from 4 to -1 Hop_Count_ 1 | from 14 to -1 Hop_Count_ 1 | from 9 to -1 |
Quote:
And again, as you've been asked before, POST YOUR CODE...seeing two lines doesn't tell us much at all. And you say you 'guess' the output is incorrect....why? What were you expecting? |
All times are GMT -5. The time now is 07:41 AM. |