Calling the BATMAN: Free networks on FreeBSD

Project description

BATMAN (Better Approach to Mobile Ad-hoc Networking), as developed and used by the Freifunk project, is a routing protocol for (primarily wireless) multi-hop ad-hoc networks. Freifunk is a German initiative to build an open Wi-Fi network at city-scale, based on the principles of net-neutrality. BATMAN's motive is to be a completely decentralized protocol; no one node in the network knows or has to care about the topology of the whole network.

Support for this protocol is provided by the batman-adv kernel module on Linux, which has been ported to FreeBSD through the batman_adv(4) kernel module.


What works

What is there still to do

I plan to continue working on this after the final evaluation :)

What I've done

This is explained in more detail in the deliverables section.

The Code


This is the diff w.r.t. FreeBSD with the batman-adv sources already pulled into the tree. The diff with just the batman-adv sources are here:

The last GSoC-related commit was a06c5b5befe37df259d5e5e4af77723dd5815089 ("netlink: Only compile LinuxKPI-related code when COMPAT_LINUXKPI is set"),

Approach to solving the problem and deliverables

This project consisted of the following parts:

Getting the kernel module working (milestone 1)

The first step was getting batman-adv kernel module for Linux compiling & working on FreeBSD. This included a bunch of additions to the LinuxKPI and the relatively new Netlink API in FreeBSD.

BATMAN support for userland libraries/utilities (milestone 2)

Support for creating and managing BATMAN networks was added to ifconfig(8). Setting attributes other than the routing algorithm is currently not supported due to limited support for Netlink Generic.

batctl (milestone 3)

This ended up being a little more complicated than expected ;) batctl uses libnl on Linux, whereas FreeBSD has snl(3) for user programs. I'd like to port libnl to FreeBSD, backed by snl(3), such that future Linux programs which rely on Netlink may easily be ported.

Documentation (milestone 4)

The ifconfig(8), rtnetlink(4), and ifnet(9) manpages have been updated. There's also a batman_adv(4) manpage which describes the batman_adv kernel module at a high level, and shows a basic example of usage.

SummerOfCode2023Projects/CallingTheBatmanFreeNetworksOnFreeBSD (last edited 2023-08-28T17:45:16+0000 by AymericWibo)