[olsr-dev] question about creating new plugin
Andreas Tønnesen
(spam-protected)
Wed Dec 29 18:24:44 CET 2004
Hi Daniel,
Your plugin is to receive data over a socket right? Then you should
register your socket with the socket parser as this is the simplest
way to go about things.
Now if you are to broadcast this data via OLSR you should check out
the net API in src/net.h for transmission of data and the packet
parser for reception of OLSR messages.
Most of the existing plugins mainly send data to clients - but they
still need to use the socket parser for listening for client
connections, so you should be able to find some usefull example code.
I suggest you take a simple plugin such as the powerstatus one, and
use that one as a starting point. This plugin also floods traffic
via OLSR, so if you are intending to do this, then much work is already
done for you :)
- Andreas
Daniel Jaskiewicz wrote:
> Hello everyone,
> Im trying to create a simple plugin where an application can connect to
> the plugin and stream information to it which the plugin will use to
> produce the message. Now Im new to this so all Im looking for is clear
> understanding of the tasks ahead of me.
> First, do I need to registar the socket streaming information with the
> socket parser in ipc_action function?
> Once the socket is registered with socket parser, do I need to registar
> the streamed information with the variables of the outgoing plugin message?
> Im not great at C so is there a sample plugin or code sample that
> includes this kind functionality which I may view?
>
> Thanks in advance
> 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