[Olsr-dev] Loading plugin fails, undefined symbol for olsrd functions

Henning Rogge (spam-protected)
Tue Mar 23 22:14:49 CET 2010


Am Dienstag 23 März 2010 22:03:16 schrieb Jonathan P. Chapman:
> Hi everyone!
> 
> I am working on a link quality plugin with a challenge-response
> mechanism. The HELLO packet format will be incompatible with the regular
> (LQ-)HELLO, so I had to write my own packet parsers etc., but I tried to
> use the existing functions where it seemed appropriate.
> 
> However, I am a little stuck now. I will describe my problem with the
> create_lq_hello function below, but it appears with some other functions
> exactly the same way:
> 
> Since create_lq_hello is declared and defined in the lq_packet.c file
> only, I declared it as an extern in my lq_challenge_plugin.c file:
> extern void create_lq_hello(struct lq_hello_message *lq_hello, struct
> interface *outif);
Maybe you should look into the plugin loader (src/plugin_loader.c, line 
196++). It's not that easy to call a function of a plugin (the other way 
around is easier). The easiest way would be to use the pointer to your 
function as a parameter to set a callback.

If you want to call a function of a plugin you need the dl_handle and use the 
function dlsym() I think. But I don't know if the dl_handle is even available 
in outside the plugin loader. OLSRd is not designed to call up a function of a 
plugin except through a callback mechanism.

Henning Rogge
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.olsr.org/pipermail/olsr-dev/attachments/20100323/09e972ab/attachment.sig>


More information about the Olsr-dev mailing list