aboutsummaryrefslogtreecommitdiffstats
path: root/src/charon/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/charon/plugins')
-rw-r--r--src/charon/plugins/attr/attr_plugin.c4
-rw-r--r--src/charon/plugins/attr/attr_provider.h2
-rw-r--r--src/charon/plugins/nm/nm_handler.c6
-rw-r--r--src/charon/plugins/nm/nm_handler.h2
-rw-r--r--src/charon/plugins/nm/nm_plugin.c4
-rw-r--r--src/charon/plugins/resolve/resolve_handler.c12
-rw-r--r--src/charon/plugins/resolve/resolve_handler.h2
-rw-r--r--src/charon/plugins/resolve/resolve_plugin.c5
-rw-r--r--src/charon/plugins/sql/sql_attribute.h3
-rw-r--r--src/charon/plugins/sql/sql_plugin.c4
-rw-r--r--src/charon/plugins/stroke/stroke_attribute.h2
-rw-r--r--src/charon/plugins/stroke/stroke_socket.c4
12 files changed, 25 insertions, 25 deletions
diff --git a/src/charon/plugins/attr/attr_plugin.c b/src/charon/plugins/attr/attr_plugin.c
index a3e83fe61..6dfb10271 100644
--- a/src/charon/plugins/attr/attr_plugin.c
+++ b/src/charon/plugins/attr/attr_plugin.c
@@ -41,7 +41,7 @@ struct private_attr_plugin_t {
*/
static void destroy(private_attr_plugin_t *this)
{
- charon->attributes->remove_provider(charon->attributes, &this->provider->provider);
+ lib->attributes->remove_provider(lib->attributes, &this->provider->provider);
this->provider->destroy(this->provider);
free(this);
}
@@ -56,7 +56,7 @@ plugin_t *plugin_create()
this->public.plugin.destroy = (void(*)(plugin_t*))destroy;
this->provider = attr_provider_create();
- charon->attributes->add_provider(charon->attributes, &this->provider->provider);
+ lib->attributes->add_provider(lib->attributes, &this->provider->provider);
return &this->public.plugin;
}
diff --git a/src/charon/plugins/attr/attr_provider.h b/src/charon/plugins/attr/attr_provider.h
index e867f2b20..a41466718 100644
--- a/src/charon/plugins/attr/attr_provider.h
+++ b/src/charon/plugins/attr/attr_provider.h
@@ -21,7 +21,7 @@
#ifndef ATTR_PROVIDER_H_
#define ATTR_PROVIDER_H_
-#include <config/attributes/attribute_provider.h>
+#include <attributes/attribute_provider.h>
typedef struct attr_provider_t attr_provider_t;
diff --git a/src/charon/plugins/nm/nm_handler.c b/src/charon/plugins/nm/nm_handler.c
index 7b9c10b65..7756b8e7a 100644
--- a/src/charon/plugins/nm/nm_handler.c
+++ b/src/charon/plugins/nm/nm_handler.c
@@ -43,7 +43,7 @@ struct private_nm_handler_t {
/**
* Implementation of attribute_handler_t.handle
*/
-static bool handle(private_nm_handler_t *this, ike_sa_t *ike_sa,
+static bool handle(private_nm_handler_t *this, identification_t *server,
configuration_attribute_type_t type, chunk_t data)
{
linked_list_t *list;
@@ -134,8 +134,8 @@ nm_handler_t *nm_handler_create()
{
private_nm_handler_t *this = malloc_thing(private_nm_handler_t);
- this->public.handler.handle = (bool(*)(attribute_handler_t*, ike_sa_t*, configuration_attribute_type_t, chunk_t))handle;
- this->public.handler.release = (void(*)(attribute_handler_t*, ike_sa_t*, configuration_attribute_type_t, chunk_t))nop;
+ this->public.handler.handle = (bool(*)(attribute_handler_t*, identification_t*, configuration_attribute_type_t, chunk_t))handle;
+ this->public.handler.release = (void(*)(attribute_handler_t*, identification_t*, configuration_attribute_type_t, chunk_t))nop;
this->public.create_enumerator = (enumerator_t*(*)(nm_handler_t*, configuration_attribute_type_t type))create_enumerator;
this->public.reset = (void(*)(nm_handler_t*))reset;
this->public.destroy = (void(*)(nm_handler_t*))destroy;
diff --git a/src/charon/plugins/nm/nm_handler.h b/src/charon/plugins/nm/nm_handler.h
index 3904ce1f0..6c15ae6de 100644
--- a/src/charon/plugins/nm/nm_handler.h
+++ b/src/charon/plugins/nm/nm_handler.h
@@ -21,7 +21,7 @@
#ifndef NM_HANDLER_H_
#define NM_HANDLER_H_
-#include <config/attributes/attribute_handler.h>
+#include <attributes/attribute_handler.h>
typedef struct nm_handler_t nm_handler_t;
diff --git a/src/charon/plugins/nm/nm_plugin.c b/src/charon/plugins/nm/nm_plugin.c
index 46cc9c39e..daf2cc660 100644
--- a/src/charon/plugins/nm/nm_plugin.c
+++ b/src/charon/plugins/nm/nm_plugin.c
@@ -84,8 +84,8 @@ static void destroy(private_nm_plugin_t *this)
g_object_unref(this->plugin);
}
charon->credentials->remove_set(charon->credentials, &this->creds->set);
+ lib->attributes->remove_handler(lib->attributes, &this->handler->handler);
this->creds->destroy(this->creds);
- charon->attributes->remove_handler(charon->attributes, &this->handler->handler);
this->handler->destroy(this->handler);
free(this);
}
@@ -108,8 +108,8 @@ plugin_t *plugin_create()
this->creds = nm_creds_create();
this->handler = nm_handler_create();
+ lib->attributes->add_handler(lib->attributes, &this->handler->handler);
charon->credentials->add_set(charon->credentials, &this->creds->set);
- charon->attributes->add_handler(charon->attributes, &this->handler->handler);
this->plugin = nm_strongswan_plugin_new(this->creds, this->handler);
if (!this->plugin)
{
diff --git a/src/charon/plugins/resolve/resolve_handler.c b/src/charon/plugins/resolve/resolve_handler.c
index 86057ddbb..6f72546dd 100644
--- a/src/charon/plugins/resolve/resolve_handler.c
+++ b/src/charon/plugins/resolve/resolve_handler.c
@@ -46,7 +46,7 @@ struct private_resolve_handler_t {
/**
* Implementation of attribute_handler_t.handle
*/
-static bool handle(private_resolve_handler_t *this, ike_sa_t *ike_sa,
+static bool handle(private_resolve_handler_t *this, identification_t *server,
configuration_attribute_type_t type, chunk_t data)
{
FILE *in, *out;
@@ -78,7 +78,7 @@ static bool handle(private_resolve_handler_t *this, ike_sa_t *ike_sa,
{
addr = host_create_from_chunk(family, data, 0);
fprintf(out, "nameserver %H # by strongSwan, from %Y\n",
- addr, ike_sa->get_other_id(ike_sa));
+ addr, server);
DBG1(DBG_IKE, "installing DNS server %H to %s", addr, this->file);
addr->destroy(addr);
handled = TRUE;
@@ -106,7 +106,7 @@ static bool handle(private_resolve_handler_t *this, ike_sa_t *ike_sa,
/**
* Implementation of attribute_handler_t.release
*/
-static void release(private_resolve_handler_t *this, ike_sa_t *ike_sa,
+static void release(private_resolve_handler_t *this, identification_t *server,
configuration_attribute_type_t type, chunk_t data)
{
FILE *in, *out;
@@ -139,7 +139,7 @@ static void release(private_resolve_handler_t *this, ike_sa_t *ike_sa,
addr = host_create_from_chunk(family, data, 0);
snprintf(matcher, sizeof(matcher),
"nameserver %H # by strongSwan, from %Y\n",
- addr, ike_sa->get_other_id(ike_sa));
+ addr, server);
/* copy all, but matching line */
while ((pos = fgets(line, sizeof(line), in)))
@@ -179,8 +179,8 @@ resolve_handler_t *resolve_handler_create()
{
private_resolve_handler_t *this = malloc_thing(private_resolve_handler_t);
- this->public.handler.handle = (bool(*)(attribute_handler_t*, ike_sa_t*, configuration_attribute_type_t, chunk_t))handle;
- this->public.handler.release = (void(*)(attribute_handler_t*, ike_sa_t*, configuration_attribute_type_t, chunk_t))release;
+ this->public.handler.handle = (bool(*)(attribute_handler_t*, identification_t*, configuration_attribute_type_t, chunk_t))handle;
+ this->public.handler.release = (void(*)(attribute_handler_t*, identification_t*, configuration_attribute_type_t, chunk_t))release;
this->public.destroy = (void(*)(resolve_handler_t*))destroy;
this->mutex = mutex_create(MUTEX_TYPE_DEFAULT);
diff --git a/src/charon/plugins/resolve/resolve_handler.h b/src/charon/plugins/resolve/resolve_handler.h
index d56d06863..8a2c77f53 100644
--- a/src/charon/plugins/resolve/resolve_handler.h
+++ b/src/charon/plugins/resolve/resolve_handler.h
@@ -21,7 +21,7 @@
#ifndef RESOLVE_HANDLER_H_
#define RESOLVE_HANDLER_H_
-#include <config/attributes/attribute_handler.h>
+#include <attributes/attribute_handler.h>
typedef struct resolve_handler_t resolve_handler_t;
diff --git a/src/charon/plugins/resolve/resolve_plugin.c b/src/charon/plugins/resolve/resolve_plugin.c
index 63cd9af6d..c564981ef 100644
--- a/src/charon/plugins/resolve/resolve_plugin.c
+++ b/src/charon/plugins/resolve/resolve_plugin.c
@@ -41,8 +41,7 @@ struct private_resolve_plugin_t {
*/
static void destroy(private_resolve_plugin_t *this)
{
- charon->attributes->remove_handler(charon->attributes,
- &this->handler->handler);
+ lib->attributes->remove_handler(lib->attributes, &this->handler->handler);
this->handler->destroy(this->handler);
free(this);
}
@@ -56,7 +55,7 @@ plugin_t *plugin_create()
this->public.plugin.destroy = (void(*)(plugin_t*))destroy;
this->handler = resolve_handler_create();
- charon->attributes->add_handler(charon->attributes, &this->handler->handler);
+ lib->attributes->add_handler(lib->attributes, &this->handler->handler);
return &this->public.plugin;
}
diff --git a/src/charon/plugins/sql/sql_attribute.h b/src/charon/plugins/sql/sql_attribute.h
index 358ab92af..27a39651b 100644
--- a/src/charon/plugins/sql/sql_attribute.h
+++ b/src/charon/plugins/sql/sql_attribute.h
@@ -21,7 +21,8 @@
#ifndef SQL_ATTRIBUTE_H_
#define SQL_ATTRIBUTE_H_
-#include <config/attributes/attribute_provider.h>
+#include <attributes/attribute_provider.h>
+#include <database/database.h>
typedef struct sql_attribute_t sql_attribute_t;
diff --git a/src/charon/plugins/sql/sql_plugin.c b/src/charon/plugins/sql/sql_plugin.c
index 65691cc00..05cdad559 100644
--- a/src/charon/plugins/sql/sql_plugin.c
+++ b/src/charon/plugins/sql/sql_plugin.c
@@ -66,8 +66,8 @@ static void destroy(private_sql_plugin_t *this)
{
charon->backends->remove_backend(charon->backends, &this->config->backend);
charon->credentials->remove_set(charon->credentials, &this->cred->set);
- charon->attributes->remove_provider(charon->attributes, &this->attribute->provider);
charon->bus->remove_listener(charon->bus, &this->logger->listener);
+ lib->attributes->remove_provider(lib->attributes, &this->attribute->provider);
this->config->destroy(this->config);
this->cred->destroy(this->cred);
this->attribute->destroy(this->attribute);
@@ -107,9 +107,9 @@ plugin_t *plugin_create()
this->attribute = sql_attribute_create(this->db);
this->logger = sql_logger_create(this->db);
+ lib->attributes->add_provider(lib->attributes, &this->attribute->provider);
charon->backends->add_backend(charon->backends, &this->config->backend);
charon->credentials->add_set(charon->credentials, &this->cred->set);
- charon->attributes->add_provider(charon->attributes, &this->attribute->provider);
charon->bus->add_listener(charon->bus, &this->logger->listener);
return &this->public.plugin;
diff --git a/src/charon/plugins/stroke/stroke_attribute.h b/src/charon/plugins/stroke/stroke_attribute.h
index 0bb8ae4bf..cf6c950a6 100644
--- a/src/charon/plugins/stroke/stroke_attribute.h
+++ b/src/charon/plugins/stroke/stroke_attribute.h
@@ -22,7 +22,7 @@
#define STROKE_ATTRIBUTE_H_
#include <stroke_msg.h>
-#include <config/attributes/attribute_provider.h>
+#include <attributes/attribute_provider.h>
typedef struct stroke_attribute_t stroke_attribute_t;
diff --git a/src/charon/plugins/stroke/stroke_socket.c b/src/charon/plugins/stroke/stroke_socket.c
index 7ae00d118..2faa2353b 100644
--- a/src/charon/plugins/stroke/stroke_socket.c
+++ b/src/charon/plugins/stroke/stroke_socket.c
@@ -625,7 +625,7 @@ static void destroy(private_stroke_socket_t *this)
charon->credentials->remove_set(charon->credentials, &this->ca->set);
charon->credentials->remove_set(charon->credentials, &this->cred->set);
charon->backends->remove_backend(charon->backends, &this->config->backend);
- charon->attributes->remove_provider(charon->attributes, &this->attribute->provider);
+ lib->attributes->remove_provider(lib->attributes, &this->attribute->provider);
this->cred->destroy(this->cred);
this->ca->destroy(this->ca);
this->config->destroy(this->config);
@@ -660,7 +660,7 @@ stroke_socket_t *stroke_socket_create()
charon->credentials->add_set(charon->credentials, &this->ca->set);
charon->credentials->add_set(charon->credentials, &this->cred->set);
charon->backends->add_backend(charon->backends, &this->config->backend);
- charon->attributes->add_provider(charon->attributes, &this->attribute->provider);
+ lib->attributes->add_provider(lib->attributes, &this->attribute->provider);
this->job = callback_job_create((callback_job_cb_t)receive,
this, NULL, NULL);