rrouted project is a Linux 2.2 replacement for request-route.
Version:rrouted project is a Linux 2.2 replacement for request-route.
License: Public Domain
Operating System: Linux
This daemon transparently replaces the request-route functionality that was removed from Linux 2.1. I.e. run this and on every IP packet with unreachable destination a script is called with the destination address as argument.
Works as follows: a default route is installed via a SLIP device on which this daemon listens, and a packet sent over this device is queued and request-route invoked. After request-route has finished, the daemon tries to resend the packet. The program called from request-route has to establish its own default route (unlike diald).
Needs SLIP support in the kernel (or as a module).
Compile this with
gcc -O3 -Wall -s -o rrouted rrouted.c -lpthread
If you dont have pthreads,
gcc -O3 -Wall -DNO_THREADS -s -o rrouted rrouted.c
(Note that even with threads, only one request-route is invoked for each destination at once.)
Usage: rrouted [-h host | -n net -m mask] [-d dummynet] [-s script]
sets a route to the target "host" rsp. "net/mask" and invokes "script" when packets are routed via it.
The default is "-n 0.0.0.0 -m 0.0.0.0 -s /sbin/request-route" which means that without any arguments, 2.0 kerneld behaviour is matched.
"dummynet" is a netmask of unused addresses from which rrouted picks one for its SLIP device, default 10.255.255.0.
Device and route are taken down when the daemon is killed.