[ns] DSR: addRoute(), called in returnSrcRouteToRequestor(), dsragent.cc

TAING Nguon romdoul2002 at yahoo.com
Thu Jun 2 02:53:23 PDT 2005


Hi Mr. Bryan Hogan,

yes the request packet has reached the destination and
the destination node caches this route for future use
by calling addRoute() method which needs three
options.

1. this route (p_copy.route reverse route of rrq
packet)
2. time
3. Source node that generates route request

Look at the 3rd option. It is net_id that means it is
the destination node address, not the source node
address. the third option should be p.src. Am i right?
pls help me with it.

Thanks,

Nguon

--- Bryan Hogan <bryan at csn.ul.ie> wrote:

> Hi Nguon,
> 
> In the scenario you describe the route request
> packet has reached the
> destination of the route request.
> 
> This destination node responds to the requesting
> node with a valid route.
> 
> The destination node caches this route for future
> use.
> the call to addroute takes, 1.the route, 2.the time,
> and 3.the net_id of
> the source as arguments.
> 
> Bryan
> Bryan's NS-2 DSR FAQ
> http://www.geocities.com/b_j_hogan
> 
> On Sun, 29 May 2005, TAING Nguon wrote:
> 
> >
> > Dear all,
> >
> > addRoute is declard in mobicache.cc as below:
> >
> > void MobiCache::addRoute(const Path& route, Time
> t,
> > const ID& who_from).
> >
> > this method requires three fields,
> >
> > 1. route to be added
> > 2. time of added route
> > 3. source node that generates this route.
> >
> > I am not sure why this method is called in
> > returnSrcRouteToRequestor(). According to the
> caller,
> > it seems that the reverse route(p_copy) and
> > net_id(destination) are used to add to the
> destination
> > node's cache. what purpose of adding this route to
> > destincation? please clarify me.
> >
> > void DSRAgent::returnSrcRouteToRequestor(SRPacket
> &p)
> > {
> > .....
> > p_copy.route.reverseInPlace();
> >   route_cache->addRoute(p_copy.route,
> > Scheduler::instance().clock(), net_id);
> >
> >   p_copy.route.resetIterator();
> >   p_copy.route.fillSR(new_srh);
> > .....
> > }
> >
> > thanks for any help
> >
> > Nguon
> >
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > Read only the mail you want - Yahoo! Mail
> SpamGuard.
> > http://promotions.yahoo.com/new_mail
> >
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the Ns-users mailing list