From 44e149b17fa2f748e8a27b130587c9ce0f5987c5 Mon Sep 17 00:00:00 2001 From: Borovkova Elena Date: Tue, 18 Aug 2009 12:17:49 +0400 Subject: [PATCH] RecvReplyAck added --- src/routing/aodv/aodv-routing-protocol.cc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/routing/aodv/aodv-routing-protocol.cc b/src/routing/aodv/aodv-routing-protocol.cc index 59285c217..8424a1fee 100644 --- a/src/routing/aodv/aodv-routing-protocol.cc +++ b/src/routing/aodv/aodv-routing-protocol.cc @@ -854,7 +854,7 @@ RoutingProtocol::SendReplyByIntermediateNode (RoutingTableEntry & toDst, Routing void RoutingProtocol::SendReplyAck (Ipv4Address neighbor ) { - NS_LOG_FUNCTION(this); + NS_LOG_FUNCTION (this << " to " << neighbor); RrepAckHeader h; TypeHeader typeHeader (AODVTYPE_RREP_ACK); Ptr packet = Create (); @@ -995,8 +995,14 @@ RoutingProtocol::RecvReply (Ptr p, Ipv4Address receiver, Ipv4Address sen void RoutingProtocol::RecvReplyAck (Ipv4Address neighbor) { - NS_LOG_LOGIC(this); - // TODO + NS_LOG_FUNCTION (this); + RoutingTableEntry rt; + if(m_routingTable.LookupRoute(neighbor, rt)) + { + rt.m_ackTimer.Cancel (); + rt.SetFlag (VALID); + m_routingTable.Update(rt); + } } void