[Olsr-dev] events/notifications for route changes?

Hannes Gredler (spam-protected)
Fri May 23 09:50:04 CEST 2008


pls see olsr_update_kernel_routes() in process_route.c

the post-SPF processing code figures out if there are

-any new routes (add), or
- routes have changed their next-hops (change) or
- routes are unreachable (delete)

and puts the rt_entry into on of the three queues.
all you have to do, is to add callbacks
at the fron of each queue processing fucntion.


On Thu, May 22, 2008 at 06:05:22PM -0400, Ian Rose wrote:
| Greetings all,
| I'm just getting started with OLSR hacking and I'm interested in 
| developing a plugin that would receive some kind of notification from 
| the OLSR core code whenever a network route is updated (added, deleted, 
| changed).  From digging through the code (v0.5.5) I see that there seems 
| to be a mechanism by which plugins can register callbacks for when 
| network interfaces are added/removed (add_ifchgf and del_ifchgf in 
| src/interfaces.h).  But I am unable to find analogous functions to 
| registering callbacks for when routes change.  Does such a thing exist?
| Obviously I could hack around this by scanning the whole routing table 
| every X seconds and looking for differences from the last time I looked, 
| but this is rather less appealing to me than a nice simple callback 
| mechanism.
| thanks very much for any pointers,
| Ian Rose
| Harvard University
| -- 
| Olsr-dev mailing list
| (spam-protected)
| http://lists.olsr.org/mailman/listinfo/olsr-dev

More information about the Olsr-dev mailing list