On Thu, Jul 27, 2000 at 10:49:04PM +0530, A S Arun wrote:
> I am trying to change the forwarding algorithm in the linux
> kernel. i am using kernel version 2.2.12. i could find the place where the
> route cache is searched, but i am unable to find where the search in the
> fib table is taking place. can you please help me out.
If you look in ip_route_input_slow() (packet bing routed from one interface to
another) or ip_route_output_slow() (packets originating at this box)
you will see a fib_lookup() which tries to match this packet's info to a
entry in the FIB. Once an entry is found, a route cache entry is created
and stored in to the route cache (rt_intern_hash()). All future
ip_route_input() or ip_route_output() will try to use the info from the
route cache for packets with similar characteristics.
James R. Leu