[olsr-dev] A suggestion...
Mon Nov 22 17:36:05 CET 2004
Are you talking about a net-wide broadcast using olsrs forwarding
mechanism? If so - this will have to go by the olsr socket and be parsed
by the olsrd-parser.
If you are just going to broadcast a regular UDP packet then you can do
all socket handling within the plugin if you want. It's just that
listening for incoming data is _much_ easier if registering with the
olsrd-socketparser. If you want to listen for traffic within the plugin
instead of registering with the olsrd-socketparser, you will have to
make sure that the socket is non-blocking or you are using a small
timeout on the select(or whatever) calls. It is important to understand
that the plugin is part of olsrd program flow - so blocking within the
plugin(without makeing a new thread) blocks olsrd(which is NOT a smart
thing to do).
Hope this answers your question :)
Andrea Sini wrote:
> I'd need a little suggestion...
> Let's say I have to write a plugin and sometimes I need to broadcast
> immediately a message to the network.
> I was wondering if it's enough clean or not to write the packet directly
> without passing from the socket parser of the daemon OLSR (that is, I
> don't want to add another socket and send the message to this one,
> forcing the call of a parsing function that has only to send the message).
> I'm not talking about a periodic message... It's a sporadic one...
> What do you think ?
> Thanks (really thanks) for the patience...
> olsr-dev mailing list
More information about the Olsr-dev