Subject: my personal challenge ...
To: None <tech-kern@netbsd.org>
From: Stefan Sonnenberg-Carstens <ssc@coolspot.de>
List: tech-kern
Date: 05/18/2004 14:15:59
I spend the last few weeks in defining how to implement
a kernel-based ip load-balancer like the more than famous
f5 BigIP's.
I read through some NetBSD/FreeBSD/OpenBSD kernel
sources and in particular the  ip_input.c file, which I think
is the most appropriate place to start writing such a beast.
One thing which did not became clear to me is that :
if I want to send modified packets onwards, which function
do I need ? ip_forward ? Do I need to create my own packets
in a mbuf manner ?

For example:
the load-balancer is setup to process requests to
12.34.56.78 and tcp port 80.
The external ethernet interface is configured to that ip (
or an alias). The balancing software "sees" that particular
packet and extracts all required data (src,dst etc) from the 
mbuf and after some magic creates a new one with a
new dst ip from, for example 172.16.0.80 to make
it working. And then ?
Which function must I call with that newly created packet ?

thx in advance,


Stefan Sonnenberg-Carstens