[Olsr-dev] new callback API in the master branch (<- heads up plugin developers)

L. Aaron Kaplan (spam-protected)
Sat Feb 12 23:43:21 CET 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Hi!

Henning was working on a new callback API for use within OLSR (in the master branch!).
The idea behind it is, that often plugins and the core of olsrd have little way of informing each other about changes to central data structures. The same situation applies to plugins communicating between each other: up until now there was no formal way for that.


Here is an example (maybe it is a bit constructed, but I hope you get the idea):
let's assume a neighbor link disappeared, maybe there could be a plugin which counts how many neighbors are active and if the last one disappears, it will send out some ATA commands on the serial link which in turn send an SMS and puts the router into a sleep state for 5 minutes in order to save battery power. No point in running when you don't have any neighbors anymore. In this case, the nhdp neighbor discovery code (in OLSR core) informed this plugin (and all other callbacks listening on these types of events) about the deletion of a neighbor link.


I documented the API a little bit (it is a mere start).
Please take a look at README-callbacks in the master branch. Feedback welcome. In case something is not clear, post it here please and I will try to clarify the documentation.

Big cudos as always go to Henning for putting so much time and energy into coding such nice APIs.


http://olsr.org/git/?p=olsrd.git;a=blob;f=README-callbacks;h=849b65acae525e93d20a6785781b465c86d19d21;hb=78bffc205fdc58508372deadefb081009e9421f8




-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (Darwin)

iEYEARECAAYFAk1XDQwACgkQxEgyMttZ8YyfiQCePEu7LYDztNUfIAE4yaP6wTTU
R+0AnjViUk4P8tKew1zWPh+mFibamo5w
=N4j1
-----END PGP SIGNATURE-----




More information about the Olsr-dev mailing list