[ns] changing header info after rqueue.deque in aodv

Cenker Demir cdemir at stevens.edu
Thu Apr 13 12:33:08 PDT 2006


Dear ns users,

I am using ns-allinone-2.28 for cygwin on XP-SP2. I am working on a new 
routing approach with an additional metric for AODV. My routing 
decision is based on another metric which I can get only after 
receiving a route reply. When a packet is put into queue in 
rt_resolve(.), I do not have my metric information to send to the queue 
with the packet. When I get my route reply with recvReply(.), the 
recvReply function "deque"s any packet for that destination as soon as 
there is a route reply to that specific destination. At that point I 
have my metric info for the routing decision, and I try to change my 
specific header's info. For the sender node, I can see that the metric 
info is there, but when an intermediate node receives that packet, the 
metric info is lost and it is 0.

What I think is, the change you make after rqueue.deque can not be read 
by the forwarding node, when I put a metric info (actually, a constant 
value just to test it) before enque'ing packet, the forwarding node is 
able to read the header. I tried to change the destination info in 
ip_header after the rqueue.deque function just to see if any change 
which is done at that time (after deque'in the packet) can be received 
by the recevier/forwarding node, ns just cut off the simulation at that 
point. I was not able to change the ip header after rqueue.deque(.). 

I even tried to call rt_resolve(.) in recvReply(.), for all buffered 
packets for that specific destination (instead of calling forward 
function immediately, which is what is done by recvReply(.) in the 
original code), just to handle the package with a routing reply in 
rt_resolve(.), but it does not work out either.

I could not figure out the reason, and any way to change the metric 
after deuque'ing the packet in the end of "recvReply(.)" function. Does 
anybody have an idea? I will really appreciate...

best,
Cenker 



More information about the Ns-users mailing list