Subject: [manet] Linux Routing Table

From: Jeff Muntel <[email-masked]>
Date: Thu, 8 Aug 2002 12:39:44 -0400

This is more of a general linux networking question, but it is applicable to
implementation of manet protocols.  

I'm trying to make modifications to the AODV-UU implementation so that RREQ
processing also checks the Linux IP routing table to determine if a RREP
should be sent back.  This would allow AODV to find routes that are not
actually part of the AODV network (routes on other interfaces).  Is there
any function like this in the linux networking code?  I've looked throughout
the routing code in the kernel (2.4.x) and cant find anything that is
actually exposed for programming.  I came across fib_lookup, but it isn't
exposed.  My other thought was to just cat /proc/net/route and parse the
routing table manually, but that seems horribly inefficient and prone to
preemption problems.  Is there any good way to just give a destination
address and have the networking code find the best route in its table?  

Example:  trying to find route for 10.1.1.19
	    AODV net is 10.10.10.0

Route Table:
10.2.1.0     mask FFFFFF00   gw 10.2.1.1
10.1.1.0     mask FFFFFF00   gw 10.1.1.1
	...

Returns: routing entry for 10.1.1.0

Any advice would be greatly appreciated.

Thanks,
Jeff

---

From: Lawrence MacIntyre <[email-masked]>
Date: 09 Aug 2002 08:49:02 -0400

Jeff:

I've never met you, but we worked with Nova a few years back on a
wireless router project.  Check out rtnetlink, the IPV4 routing socket
interface.  It will let you do anything you wish with the routing table.

man rtnetlink

>This is more of a general linux networking question, but it is
>applicable to implementation of manet protocols. 
>
>I'm trying to make modifications to the AODV-UU implementation so that
>RREQ processing also checks the Linux IP routing table to determine if
>a RREP should be sent back.  This would allow AODV to find routes that
>are not actually part of the AODV network (routes on other
>interfaces).  Is there any function like this in the linux networking
>code?  I've looked throughout the routing code in the kernel (2.4.x)
>and cant find anything that is actually exposed for programming.  I
>came across fib_lookup, but it isn't exposed.  My other thought was to
>just cat /proc/net/route and parse the routing table manually, but that
>seems horribly inefficient and prone to preemption problems.  Is there
>any good way to just give a destination address and have the networking
>code find the best route in its table? 
>
-- 
     Lawrence MacIntyre     865.574.8696     [email-masked]
                Oak Ridge National Laboratory
Center for High Performance Information Infrastructure Technology

---

From: Lawrence MacIntyre <[email-masked]>
Date: 09 Aug 2002 08:49:02 -0400

Jeff:

man rtnetlink