summaryrefslogtreecommitdiff
path: root/src/libstrongswan/library.h
diff options
context:
space:
mode:
authorYves-Alexis Perez <corsac@debian.org>2014-03-11 20:48:48 +0100
committerYves-Alexis Perez <corsac@debian.org>2014-03-11 20:48:48 +0100
commit15fb7904f4431a6e7c305fd08732458f7f885e7e (patch)
treec93b60ee813af70509f00f34e29ebec311762427 /src/libstrongswan/library.h
parent5313d2d78ca150515f7f5eb39801c100690b6b29 (diff)
downloadvyos-strongswan-15fb7904f4431a6e7c305fd08732458f7f885e7e.tar.gz
vyos-strongswan-15fb7904f4431a6e7c305fd08732458f7f885e7e.zip
Imported Upstream version 5.1.2
Diffstat (limited to 'src/libstrongswan/library.h')
-rw-r--r--src/libstrongswan/library.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/libstrongswan/library.h b/src/libstrongswan/library.h
index e53cf09e2..4125328b7 100644
--- a/src/libstrongswan/library.h
+++ b/src/libstrongswan/library.h
@@ -1,4 +1,5 @@
/*
+ * Copyright (C) 2010-2014 Tobias Brunner
* Copyright (C) 2008 Martin Willi
* Hochschule fuer Technik Rapperswil
*
@@ -140,6 +141,12 @@ struct library_t {
bool (*set)(library_t *this, char *name, void *object);
/**
+ * Namespace used for settings etc. (i.e. the name of the binary that uses
+ * the library)
+ */
+ const char *ns;
+
+ /**
* Printf hook registering facility
*/
printf_hook_t *printf_hook;
@@ -239,12 +246,17 @@ struct library_t {
* Initialize library, creates "lib" instance.
*
* library_init() may be called multiple times in a single process, but each
- * caller should call library_deinit() for each call to library_init().
+ * caller must call library_deinit() for each call to library_init().
+ *
+ * The settings and namespace arguments are only used on the first call.
*
* @param settings file to read settings from, may be NULL for default
+ * @param namespace name of the binary that uses the library, determines
+ * the first section name when reading config options.
+ * Defaults to libstrongswan if NULL.
* @return FALSE if integrity check failed
*/
-bool library_init(char *settings);
+bool library_init(char *settings, const char *namespace);
/**
* Deinitialize library, destroys "lib" instance.