[olsr-dev] question about creating new plugin

Andreas T√łnnesen (spam-protected)
Thu Dec 30 13:57:10 CET 2004

Hi Daniel,

> In order to listen to a new socket passing gps data(lat, long) I must
> register a new socket
> with the socket parser in the ipc_init function and then listen for data
> in the ipc_action function(is that reasonable).

Very reasonable indeed.

> Then I must retrieve the gps info and fill my msg struct with that data
> just like in the get_powerstatus function in the powerinfo plugin example
> or should this be done directly in the ipc_action function?

If you want to send GPS data on a regular interval then you should
register a scheduled event eith the olsr scheduler. If not, you can just
pass the data along immedeatly as you receive it.

> This powerinfo example floods(broadcasts) the messages so I do not have a
> modify anything if I re-use
> the code, is that right?

Quick answer: Yes. (but that is only in theory ;) )

> Also how do I allow for the message which originated from the local node
> to
> be parsed and forwarded?

All to parse OLSR messages you must register with the packet parser to
receive a certain type of messages. Forwarding of messages is done by
olsrd according to the default forwarding algorithm.

Parsing and forwarding messages origination from ourself will lead to
loops! Is there any particular reason you want to do this?

> Again thanks and happy new year!

And a happy new year to you to :)

- Andreas

Andreas T√łnnesen

More information about the Olsr-dev mailing list