[Olsr-cvs] olsrd-current/lib/txtinfo version-script.txt,1.1,1.2

Bernd Petrovitsch (spam-protected)
Sun Jul 15 21:29:39 CEST 2007


Update of /cvsroot/olsrd/olsrd-current/lib/txtinfo
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv5004/lib/txtinfo

Modified Files:
	version-script.txt 
Log Message:

I started to clean up the plugin parameter handling:
* Up to now some used case-insensitive, some used case-sensitive (with
  differing cases BTW) parameter names.
* Most plugins silently ignored unknown parameters.
This makes it hard to find errors in the olsrd.conf file.
Instead of simply fixing all the various plugins (and the mostly - more
or less - copied code), I reduced the plugin special code to a minimum
and (more or less automatically) all plugins behave the same (with
respect to the parameter handling).

How does it look now?
Every plugins exports a table of { parameter-name, parse-function,
addr-of-storage } to allow to share more code, e.g. the parsing and
checking of a port number or IP addresses.
Every plugin will export a function
----  snip  ----
void olsrd_get_plugin_parameters(const struct olsrd_plugin_parameters **params, int *size);
----  snip  ----
which delivers the address of the table and it's size. So in theory the
plugin could generate the table at load time though ATM all current
ones export statically defined tables.

What else is different?
- I introduced SUPPORT_OLD_PLUGIN_VERSIONS to simplifiy the compile-time
  removal of legacy support. It is not that much but more of a start.
- Plugin interface version 4 is supported until all plugins are
  migrated.
- The plugin loader produces now much more output - on good and error
  cases. I had too often to look into the source to find that I mistyped
  some parameter .....

ToDo:
- Several plugins cannot handle IPv6 at all - only IPv4 is implemented.
  Some of these functions are locally now but fixed versions can (and
  should IMHO) be shared by all plugins.



Index: version-script.txt
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/lib/txtinfo/version-script.txt,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** version-script.txt	31 Jan 2007 12:38:26 -0000	1.1
--- version-script.txt	15 Jul 2007 19:29:37 -0000	1.2
***************
*** 3,8 ****
    global:
      olsrd_plugin_interface_version;
-     olsrd_plugin_register_param;
      olsrd_plugin_init;
  
    local:
--- 3,8 ----
    global:
      olsrd_plugin_interface_version;
      olsrd_plugin_init;
+     olsrd_get_plugin_parameters;
  
    local:





More information about the Olsr-cvs mailing list