[Babel-users] Babel and BSD Unix

Juliusz Chroboczek Juliusz.Chroboczek at pps.jussieu.fr
Mon Mar 16 19:54:49 UTC 2009


I've recently received a query about porting Babel to BSD Unix, so here's
a summary of what I know on the subject.

Most of Babel is portable to any system that implements RFC 2553, or,
equivalently, the POSIX.2001 sockets interface.  The part that is not
portable is entirely contained in kernel.c.

The interface between babel and kernel.c was carefully designed to be
suitable for both Linux and BSD Unix; in fact, some interfaces (notably
ROUTE_MODIFY) are useless under Linux, and were added solely to make BSD
happy.

Kernel.c has two implementations.  The version in kernel_netlink.c is for
Linux, was written by Grégoire Henry and Julien Cristau and later modified
by myself, and is complete.  The code in kernel_socket.c, written by
Grégoire Henry, is for BSD Unix, and used to mostly work under Darwin;
however, it has suffered bit rot, and while I try to make sure it still
compiles, it no longer works in recent Babel versions.

Porting Babel to a variant of BSD Unix should be a simple exercise.  You'll
first need to fix any code that I broke when modifying the interface; that
should be pretty simple.  You should then generalise a bunch of functions
(notably kernel_route and kernel_routes) to work for both IPv6 and IPv4
(Henry's code is for IPv6 only, if memory serves).  Finally, there's
a bunch of optional functions (such as interface_wireless) that you should
implement for your particular variant of BSD.

Good luck,

                                        Juliusz



More information about the Babel-users mailing list