[olsr-dev] Re: Socket parser and HNA routes' update [QUESTIONS]

Gianni Costanzi (spam-protected)
Wed May 16 10:09:16 CEST 2007


On 5/15/07, Andreas Tønnesen <(spam-protected)> wrote:
> You can not(and you could not with the old interface either) replace any
> functions per se. The only way to "override" functions is if a callback
> registration scheme is not used(such as in the scheduler) where functions
> are registered/deregistrerd runtime.

Uh, quite bad for me.. So, if I'd like olsrd not to update the routing
table with the routes toward the "external networks" learned from the
HNA messages, what should I do? Should I directly modify
olsrd-HNA-related code, or should I do the following:
1) de-register from the packet parser the function that is invoked
when HNA messages arrive (it is possible to do that, right?
2) register my plugin's function to the packet parser in order to be
invoked when HNA messages arrive
3) do in my function all the steps that were done in the de-registered
function, apart from updating the routing table (in this way, internal
data structures are updated with HNA information, which I can use for
my own purposes, while the routing table is not modified)

Is it possible to do these three steps above?

Thank you for your answers
Gianni




>
> - Andreas
>
> > Can someone at least tell me where the implementation of
> > olsr_plugin_io has been moved to? plugin.c is disappeared from 0.5.0
> > sources (in 0.4.9 there are plugin.c and olsr_plugin_io.h where all
> > the constants that are used to specify which function we want to
> > replace are defined)..
> > I noticed that in the changelog here [1], about 0.4.10, it is said
> > "Plugin interface changes. Olsrd now exports all symbols mening that
> > plugins can access all olsrd functions easily."
> >
> > Does this "only" mean that plugins can access all the functions of
> > olsrd or does it mean also that they can replace whatever function
> > they want? If the last one, how?
> >
> > Gianni
> >
> > On 5/14/07, Gianni Costanzi <(spam-protected)> wrote:
> >> Hi,
> >> I have the following questions for you:
> >> 1) Can a plugin obtain a file descriptor on a character device and
> >> then register to the socket parser a function to be called when there
> >> is available data on it? I think it is possible, even if the socket
> >> parser is meant to call functions when there is some data on one of
> >> the sockets it's controlling, since the socket parser simply invokes
> >> the select syscall on a set of file descriptors..
> >>
> >> 2) Is it possible for a plugin to replace those functions that update
> >> the routing table with the entries related to "out-of-the-mesh"
> >> networks and that are propagated through HNA messages? I was reading
> >> the Andreas' thesis on OLSRd and I saw that a plugin can invoke
> >> "olsr_plugin_io" (for which I find the prototype in
> >> src/plugin_loader.h but I can not find the implementation...) and
> >> specify the olsrd function for which it wants to set or get a pointer
> >> through some constants like GETF__GET_MSG_SEQNO (example shown in the
> >> thesis).. where are this constants defined? Where is the
> >> implementation of olsr_plugin_io? I'm looking at the 0.5.0 sources.
> >>
> >> Thank you in advance for any suggestion. :)
> >>
> >> Gianni
> >>
> >> --
> >> --------------------------------------------------------------------------------------------------------------
> >> |  Gianni Costanzi ((spam-protected))
> >> |       (http://utenti.lycos.it/giannicostanzi/)
> >> |
> >> |  Gentoo Documentation Project (GDP) Member - Italian Translator
> >> |       (http://www.gentoo.org/proj/en/gdp/)
> >> |
> >> |  Free Software Foundation Member #3844 (www.fsf.org)
> >> |       "Free Software is a matter of Liberty not price"
> >> |
> >> |  Sun Valley in Rock Staff Member (www.sunvalleyinrock.net/forum)
> >> --------------------------------------------------------------------------------------------------------------
> >>
> >
> >
> > --
> > --------------------------------------------------------------------------------------------------------------
> > |  Gianni Costanzi ((spam-protected))
> > |       (http://utenti.lycos.it/giannicostanzi/)
> > |
> > |  Gentoo Documentation Project (GDP) Member - Italian Translator
> > |       (http://www.gentoo.org/proj/en/gdp/)
> > |
> > |  Free Software Foundation Member #3844 (www.fsf.org)
> > |       "Free Software is a matter of Liberty not price"
> > |
> > |  Sun Valley in Rock Staff Member (www.sunvalleyinrock.net/forum)
> > --------------------------------------------------------------------------------------------------------------
> >
> > _______________________________________________
> > olsr-dev mailing list
> > (spam-protected)
> > https://www.olsr.org/mailman/listinfo/olsr-dev
> >
>
>
>
> _______________________________________________
> olsr-dev mailing list
> (spam-protected)
> https://www.olsr.org/mailman/listinfo/olsr-dev
>


More information about the Olsr-dev mailing list