diff options
author | Yves-Alexis Perez <corsac@corsac.net> | 2012-06-28 21:16:07 +0200 |
---|---|---|
committer | Yves-Alexis Perez <corsac@corsac.net> | 2012-06-28 21:16:07 +0200 |
commit | b34738ed08c2227300d554b139e2495ca5da97d6 (patch) | |
tree | 62f33b52820f2e49f0e53c0f8c636312037c8054 /src/libstrongswan/library.h | |
parent | 0a9d51a49042a68daa15b0c74a2b7f152f52606b (diff) | |
download | vyos-strongswan-b34738ed08c2227300d554b139e2495ca5da97d6.tar.gz vyos-strongswan-b34738ed08c2227300d554b139e2495ca5da97d6.zip |
Imported Upstream version 4.6.4
Diffstat (limited to 'src/libstrongswan/library.h')
-rw-r--r-- | src/libstrongswan/library.h | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/src/libstrongswan/library.h b/src/libstrongswan/library.h index 034ff10c5..7e76e1927 100644 --- a/src/libstrongswan/library.h +++ b/src/libstrongswan/library.h @@ -19,6 +19,9 @@ * @defgroup asn1 asn1 * @ingroup libstrongswan * + * @defgroup bio bio + * @ingroup libstrongswan + * * @defgroup credentials credentials * @ingroup libstrongswan * @@ -69,7 +72,6 @@ #include "chunk.h" #include "settings.h" #include "integrity_checker.h" -#include "plugins/plugin_loader.h" #include "processing/processor.h" #include "processing/scheduler.h" #include "crypto/crypto_factory.h" @@ -78,6 +80,8 @@ #include "credentials/credential_factory.h" #include "credentials/credential_manager.h" #include "credentials/cred_encoding.h" +#include "utils/leak_detective.h" +#include "plugins/plugin_loader.h" typedef struct library_t library_t; @@ -87,6 +91,23 @@ typedef struct library_t library_t; struct library_t { /** + * Get an arbitrary object registered by name. + * + * @param name name of the object to get + * @return object, NULL if none found + */ + void* (*get)(library_t *this, char *name); + + /** + * (Un-)Register an arbitrary object using the given name. + * + * @param name name to register object under + * @param object object to register, NULL to unregister + * @return TRUE if registered, FALSE if name already taken + */ + bool (*set)(library_t *this, char *name, void *object); + + /** * Printf hook registering facility */ printf_hook_t *printf_hook; @@ -147,15 +168,15 @@ struct library_t { integrity_checker_t *integrity; /** - * is leak detective running? + * Leak detective, if built and enabled */ - bool leak_detective; + leak_detective_t *leak_detective; }; /** * Initialize library, creates "lib" instance. * - * @param settings file to read settings from, may be NULL for none + * @param settings file to read settings from, may be NULL for default * @return FALSE if integrity check failed */ bool library_init(char *settings); @@ -166,7 +187,7 @@ bool library_init(char *settings); void library_deinit(); /** - * Library instance, set after between library_init() and library_deinit() calls. + * Library instance, set after library_init() and before library_deinit() calls. */ extern library_t *lib; |