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

Ian Rose (spam-protected)
Wed Jun 4 21:18:14 CEST 2008


Henning & Hannes -

Thank you for the pointers.  Now that I understand a bit more about olsr 
works internally (and how routing tables are maintained in the kernel), 
I think I will end up just opening a PF_ROUTE socket and receiving route 
changes that way.

Cheers,
Ian


Hannes Gredler wrote:
> ian,
> 
> 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.
> 
> /hannes
> 
> 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