I got some news.
I went the other way round and started out on an external program that
will act as an interface between batman and quagga. You can find it
It is more of a sketch-of-proof right now and _should not be used for
deployment purposes_. The program is completely based on the
libraries provided by quagga, in contrast to the current patch and
the olsrd plug-in, that re-implement the API.
Assuming you have quagga installed, you can compile it with:
gcc -o batquagga batquagga.c -lzebra
Some systems may also require "-lcap" linked in.
What batquagga does is read from standard input the ROUTE commands
issued by batmand (--policy-routing-script) and issue the corresponding
route add/del messages to zebra. Note that I read 11 variables form
which includes the "metric". So to use batquagga, you must have a batman
sources patched with the "...quagga.patch".
Moreover, batquagga can send redistribute requests to zebra, to
get routes by other protocols. For now, it just prints out the
as you said it should be easy to invoke batmand from within the program
to add/del HNAs.
Now to the problem:
When exiting, I tell zebra to give me back the routes marked as "batman"
through a redistribute request. The purpose is to clear all batman-
routes from the system. But zebra responds to a redistribute request
with the "selected" routes. So some entries are not echoed back.
After various hacks, I conclude that in order to properly implement
I will either have to implement route-flushing in zebra, or I will
somehow have to
change batmand so that it will clear all HNAs on shutdown. The first
is easier and I will be trying to do that for now, but I guess the
second is "better".
Which leads me to a question to developers:
Do you keep or plan to keep network HNA information in batmand?
I mean, is there any way that flush_routes_rules (in linux/route.c)
be implemented in batmand, without the need of the external routing
As a routing daemon, batman, should keep track of the network state
own structures, which in turn would ease porting to other platforms
As implemented, flush_routes_rules could be used for linux-specific
on startup. Another function, completely os-agnostic, could be
remove all batman-generated routes on shutdown. This is at least how all
quagga protocols are implemented.
Are there any plans on that?
(The batquagga name is credit of Acinonyx.)
On May 8, 2008, at 1:12 PM, Marek Lindner wrote:
Its a batman plugin like an olsr plugin. zebra
doesnt provide any
You provide a external switch to insert HNA by script. Unfortunately,
zebra cant call external script as i have to patch zebra then - or i
dont know how.
with the olsr-quagga-plugin i can redistribute zebra routes to olsr
internally. thats something i like to see with batman-zebra-plugin.
Batman does not provide any plugin interface as well. Simply
because it is a
routing daemon and should only do that. On the other hand we don't
rewriting of plugins over and over again.
As already explained in the other part of this thread batman offers an
external interface for adding/deleting routing information which
used for that. A little external application can talk to zebra, add/
routes and/or HNA and could be _reused_ by other routing applications.
B.A.T.M.A.N mailing list