babeld: send events via ubus (#633)
authorPolynomdivision <vincent@systemli.org>
Mon, 1 Feb 2021 14:26:44 +0000 (15:26 +0100)
committerGitHub <noreply@github.com>
Mon, 1 Feb 2021 14:26:44 +0000 (15:26 +0100)
commit519c1ff73168eb57a1b06fd2222710802f441a2a
tree81cad79804c642df00679ae0e02522327e687a97
parent2e602f7b33c04a60ee7f8a3c08da8ebb76b5f53b
babeld: send events via ubus (#633)

* babeld: send events via ubus

Send a notification via the ubus bus if we experience any changes in
neighbours, routes or xroutes.

The format looks like this:
  {route,xroute,neighbour}.add: Object was added
  {route,xroute,neighbour}.change: Object was changed
  {route,xroute,neighbour}.flush: Object was flushed

If ubus_bindings is turned off, it will minimally effect performance,
since only an if-statement has to be evaluated.
If no subscriber is available, it will minimally change the performance,
since only an if-statmenet that checks for subscribers has to be
evaluated.

Signed-off-by: Nick Hainke <vincent@systemli.org>
babeld/Makefile
babeld/patches/600-add-ubus.patch
babeld/src/ubus.c
babeld/src/ubus.h