Re: Route caching ?



Ivo Vachkov wrote:
Does FreeBSD rtalloc*() (or any other) functions implement route
caching and how ? I looked at the code but it's not exactly easiest
thing to read / understand :)
Not really, at least, not in the way one would think. rtalloc() is a legacy function.

ip_output() will still call rtalloc() if you pass it a filled out 'struct route', a structure which is not a route, but an internal request to look up a route.

This is a wrapper for rtalloc_ign(), which in turn is a wrapper for rtalloc1(), the function which does the actual lookup.

rtalloc_ign() is pretty straightforward. Note however that this approach only checks the RTF_UP flag and ifp, nothing more. This makes it suitable for implementing floating statics, but nothing more dynamic than that.

regards,
BMS
_______________________________________________
freebsd-net@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: Route caching ?
    ... Is it reasonable to believe that route caches can improve networking ... 'struct route', a structure which is not a route, but an internal ... This is a wrapper for rtalloc_ign, which in turn is a wrapper for ...
    (freebsd-net)
  • Re: Routing
    ... but struct route is null. ... keep the pointer to struct route in tcpcb.And not to search route every time, ... routes changed we had to scan all tcpcb's to nuke old references. ...
    (freebsd-hackers)
  • Route caching ?
    ... Does FreeBSD rtalloc*() functions implement route ... caching and how? ... I looked at the code but it's not exactly easiest ...
    (freebsd-net)
  • Re: Dynamic array with strong types?
    ... >wrapper at: ... You went the route of deriving from CollectionBase to make it fully ... I think I'll go the quick route of simply deriving from ArrayList to ...
    (microsoft.public.dotnet.languages.csharp)