[olsr-dev] Question plugin

Andreas Tønnesen (spam-protected)
Fri Jan 7 17:46:39 CET 2005


Hi Daniel,

If you want a function called when data is available on a socket you
should register your callback function and your socket with the socket
parser using the add_olsr_socket call.
To answer your second question, yes the callback function can loop
trough interfaces and generate a message(s) that are pushed onto
the olsrd net buffers.

So all in all you only need the socket parser callback function and
no scheduler registered function.

- Andreas

Daniel Jaskiewicz wrote:
> Hello everyone I got a question about registering a function with the 
> olsrd scheduler.  If I want an event to tigger based on information 
> recieved through a socket and not based on a time interval like the 
> function olsr_registar_scheduler_event() is provided, what is the best 
> way to implement this in a plugin.
> When I registar a socket to the socket parser and information is 
> recieved and triggers a corresponding function, in that function can I 
> have the nessecary code to:
> Loop through interfaces
> generate a message
> write message to buffer for interface
> 
> Will olsrd restrict this solution in anyway, will I have to registar 
> this kind of action with OLSRD, even if the function 
> olsr_registar_scheduler_event() is not needed?
> 
> Thanks again
> Daniel
> 
> 
> _______________________________________________
> olsr-dev mailing list
> (spam-protected)
> https://www.olsr.org/mailman/listinfo/olsr-dev

-- 
Andreas Tønnesen
http://www.olsr.org



More information about the Olsr-dev mailing list