Commit Graph
61 Commits
Author SHA1 Message Date
Tobias Brunner 49d7a98f47 Refactored plugin-loader with improved dependency resolution
With the new implementation the plugins don't have to be listed in any
special order, dependencies are properly resolved.  The order only
matters if two plugins provide the same feature.
2013-06-11 11:18:19 +02:00
Tobias Brunner 8a6cc1e35f plugin-feature: Function added to exactly compare plugin features 2013-06-11 11:18:17 +02:00
Tobias Brunner f05b427265 Moved debug.[ch] to utils folder 2012-10-24 16:00:51 +02:00
Tobias Brunner 08944b68ac Moved integrity_checker_t to utils folder 2012-10-24 16:00:50 +02:00
Tobias Brunner 12642a6831 Moved data structures to new collections subfolder 2012-10-24 16:00:49 +02:00
Tobias Brunner a9f169f699 Don't require PLUGINDIR to be defined.
If it is not available, we just load monolithically built plugins.
2012-08-08 15:07:42 +02:00
Tobias Brunner 18d21a57df Added a method to plugin_loader_t to add 'static' plugin features
This allows daemons and other components to register plugin features
like those provided by plugins (following the same lifecycle).

The added features are internally handled like they were added by a
plugin.
2012-06-25 17:03:07 +02:00
Tobias Brunner e07122436c Make sure that all features of critical plugins are loaded 2012-06-25 17:03:07 +02:00
Tobias Brunner 79d5c4f06b Fixed return values of several functions (e.g. return FALSE for pointer types). 2012-05-31 17:39:04 +02:00
Tobias Brunner fda9f104b4 Fixed check for loaded plugins with feature types that are not compared exactly.
Previously e.g. RNGs with weaker strength would have overwritten stronger
ones.
2012-05-24 15:15:34 +02:00
Tobias Brunner 9eac6106d0 Use a hashtable to check for already loaded plugin features. 2012-05-23 17:50:05 +02:00
Martin Willi 40ca363a8b If we load new features from a plugin, restart loading from first plugin 2012-05-03 11:08:09 +02:00
Martin Willi f14bf6345f Don't depend on a feature that has a dependency to the same feauture during unload 2012-05-02 14:05:52 +02:00
Tobias Brunner f1ba06c1c6 Cache list of plugin names to further simplify its usage.
Also helpful for ipsec statusall to avoid having to enumerate plugins.
2012-01-19 12:37:42 +01:00
Tobias Brunner ad1aaf4be3 Function added to plugin_loader to get a list of the names of loaded plugins. 2012-01-19 11:51:51 +01:00
Martin Willi 8b8fcfd631 Be less verbose if plugin dependecy not satisfied 2011-12-07 13:42:10 +01:00
Martin Willi 58fcdc4f06 Don't enforce features with soft dependencies before all plugins are loaded 2011-10-14 10:05:49 +02:00
Martin Willi a07f2a4b9b Don't try to load a feature again after failure 2011-10-14 10:05:49 +02:00
Martin Willi 59c4e88b16 Reset registration function for each plugin during feature loading 2011-10-14 10:05:49 +02:00
Martin Willi 61c1dec8d4 Fixed memleak in plugin unloading 2011-10-14 10:05:47 +02:00
Martin Willi 2feed2f3fe Load features after each plugin loaded until all plugins have feature support 2011-10-14 10:05:47 +02:00
Martin Willi d965872d66 Implemented feature unloading, moved feature registration plugin_features.c 2011-10-14 10:05:47 +02:00
Tobias Brunner c293c87761 Don't use union members directly in plugin_feature_t. 2011-10-14 10:05:47 +02:00
Tobias Brunner ef80de6010 Unload plugins which we were not able to load any features from. 2011-10-14 10:05:46 +02:00
Tobias Brunner 076aa51fc9 Easier to understand test for soft dependencies in dependencies_satisfied. 2011-10-14 10:05:46 +02:00
Martin Willi 3cd28acce0 Add aead plugin features 2011-10-14 10:05:46 +02:00
Martin Willi f85a4310cb Added database and fetcher plugin features 2011-10-14 10:05:45 +02:00
Martin Willi fa7c8338ca Plugin enumerator enumerates over loaded features, too 2011-10-14 10:05:44 +02:00
Martin Willi 62b9e2f938 Added support for plugin features 2011-10-14 10:05:44 +02:00
Tobias Brunner 629fd2f4f6 Finally removed deprecated iterator_t. 2011-07-06 09:43:46 +02:00
Martin Willi ed49e9a303 Added plugin_loader method to reload plugin configurations 2011-04-15 10:07:13 +02:00
Martin Willi 787b5884aa Added a get_name() function to plugin_t, create_plugin_enumerator enumerates over plugin_t 2011-04-15 10:07:12 +02:00
Martin Willi 6e2791715b Migrated remaining plugin_t implementations to INIT/METHOD macros 2011-04-15 10:07:12 +02:00
Martin Willi 2b36342551 Migrated plugin_loader to INIT/METHOD macros 2011-04-15 10:07:12 +02:00
Andreas Steffen 1a9f2443a2 prevent multiple debug outputs in case of non-monolithic plugins 2011-02-20 15:18:36 +01:00
Tobias Brunner 6302f49754 Merged the monolithic and non-monolithic plugin loaders into one.
This allows to add additional plugins even when the original build was
monolithic. Also fixes the pluto/xauth bug with the monolithic build.
2011-02-10 16:49:42 +01:00
Martin Willi 1535913aed Load plugins only once, even if listed twice 2011-01-05 16:45:49 +01:00
Martin Willi cd251d9a21 Unload plugins in reverse order 2010-08-04 09:26:20 +02:00
Martin Willi c60b69e4bf Do not print filename twice if plugin loading fails, dlerror() contains the filename 2010-05-05 11:16:32 +02:00
Tobias Brunner 8b0e09103b Adding DBG_LIB to all calls of libstrongswan's version of DBG*. 2010-04-06 12:47:40 +02:00
Tobias Brunner d543d9cadf Adding a helper function that translates single characters in a string. 2010-03-08 15:34:38 +01:00
Tobias Brunner 3724668b3d Enabling the plugin loader to be able to load plugins without explicitly loading a shared object file first. 2010-03-02 09:10:32 +01:00
Tobias Brunner 9ce567f895 Changed plugin constructors from plugin_create to plugin_name_plugin_create. 2010-03-02 09:10:26 +01:00
Martin Willi 5b03a350fc use NULL to load plugins from default plugin directory 2009-09-10 18:52:42 +02:00
Martin Willi 7daf5226b7 removed trailing spaces ([[:space:]]+$) 2009-09-04 13:46:09 +02:00
Martin Willi d6a45127dc plugins marked with a '!' are handled as critical: cancel if loading fails 2009-09-01 16:08:28 +02:00
Andreas Steffen def1777eca streamlined integrity test output some more 2009-07-18 11:23:27 +02:00
Andreas Steffen 6b04ba288d streamlined debug output of integrity tests 2009-07-17 17:00:17 +02:00
Tobias Brunner 233a132634 Removed an unnecessary include of a header that is not available on Mac OS X. 2009-07-15 22:42:22 +02:00
Martin Willi 960e0c1040 check integrity of plugins before loading 2009-06-22 15:47:17 +02:00