[please don't contact me privately (without Cc'ing the mailing list) about
batman-adv - unless you have a good reason not to do so and state this in the
On Saturday, 28 December 2019 14:39:05 CET Moritz Warning wrote:
I've met somebody who wants to port batman-adv to FreeBSD (in
bigger task is to create a netlink glue layer that can be used for FreeBSD
and other OSes.
I would guess that you should then get in contact with the netlink developers.
batman-adv depends heavily on rtnetlink (only via the various hooks) and
generic netlink. And they work quite differently.
There is already a (non-upstream?) hack to get some parts working . But I
haven't checked what it actually does and whether it can be used for anything
But at the end we need a new new socket type (AF_NETLINK) and protocols on top
of it. And the data from these protocols must not only be written/read but
also the relevant infrastructure must be created to get the data to the
correct receivers via the correct interfaces. Getting a good working
AF_NETLINK with NETLINK_GENERIC already sounds like quite a big task for
something as short as the GSoC. Don't forget that it has a lot of non-obvious
features (multicast, [ext] ack, data type validation, subscriptions,
attribute/command families, module autoloading, ...). So I would recommend to
not even more on your plate for the first steps - maybe it is easier to avoid
implementing NETLINK_ROUTE and the code to get rtnl_link_ops working to avoid
a lot of wrapper code to reduce the implementation cost for the initial
Can he send you some specific netlink related questions? Or maybe you
know someone who would act as a mentor for is effort
I doubt that I can help a lot with the details about the inner workings of the
various netlink (AF_NETLINK) based protocols. And I doubt that it is
trivial to implement everything correctly in FreeBSD. You would have to:
1. implement AF_NETLINK
2. implement NETLINK_ROUTE for AF_NETLINK (maybe only minimal support for
3. implement NETLINK_GENERIC  for AF_NETLINK
4. port an userspace library like libnl3 (with the essential features) to
5. Get some applications working over both protocols
There are a lot more experienced people around. A good starting point would be
to get the list of contributors from the Linux git tree. I would (as starting
(maybe even in a GSoC context).
Maybe it is a good idea to get in contact with the freifunk project and
propose some (not overly complex) task for GSoC. But I would not know who is
skilled enough and willingly to directly mentor him - and the last mentors in
context were not eager to do it again.
He currently got stuck with netlink and his email to the batman-adv
list did not got far:
There were two mails (Simon  + elektra ). But there were no further
replies (or other mails) by him on the mailing list.
On Tuesday, 13 February 2018 16:22:51 CET Mahdi Mokhtari wrote:
P.S. sorry if I'm not really good at starting conversation from
but I hope by continuing the collaboration we can have better (more
enriched) FreeBSD and better (as in more portable) B.A.T.M.A.N
Keep in mind that the batman-adv is primarily an in-tree module of Linux. So
every change in our implementation has to be forwarded to the Linux networking
developers (netdev) and later merged by Linus. So all changes which are
implementing things in a non-Linux way will simply be rejected - either
directly by us or by the next layer(s) (David S. Miller, Linus Torvalds, ...).