aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libcharon/bus/bus.c3
-rw-r--r--src/libcharon/daemon.c5
-rw-r--r--src/libcharon/kernel/kernel_handler.c10
-rw-r--r--src/libcharon/network/receiver.c9
-rw-r--r--src/libcharon/network/sender.c3
-rw-r--r--src/libcharon/plugins/android/android_service.c5
-rw-r--r--src/libcharon/plugins/dhcp/dhcp_socket.c2
-rw-r--r--src/libcharon/plugins/farp/farp_spoofer.c3
-rw-r--r--src/libcharon/plugins/ha/ha_ctl.c3
-rw-r--r--src/libcharon/plugins/ha/ha_dispatcher.c3
-rw-r--r--src/libcharon/plugins/ha/ha_segments.c5
-rw-r--r--src/libcharon/plugins/ha/ha_socket.c3
-rw-r--r--src/libcharon/plugins/load_tester/load_tester_listener.c3
-rw-r--r--src/libcharon/plugins/load_tester/load_tester_plugin.c2
-rw-r--r--src/libcharon/plugins/medcli/medcli_config.c3
-rw-r--r--src/libcharon/plugins/nm/nm_plugin.c2
-rw-r--r--src/libcharon/plugins/smp/smp.c5
-rw-r--r--src/libcharon/plugins/stroke/stroke_control.c3
-rw-r--r--src/libcharon/plugins/stroke/stroke_list.c8
-rw-r--r--src/libcharon/plugins/stroke/stroke_socket.c4
-rw-r--r--src/libcharon/plugins/uci/uci_control.c3
-rw-r--r--src/libcharon/processing/jobs/inactivity_job.c3
-rw-r--r--src/libcharon/sa/connect_manager.c11
-rw-r--r--src/libcharon/sa/ike_sa.c30
-rw-r--r--src/libcharon/sa/mediation_manager.c3
-rw-r--r--src/libcharon/sa/task_manager.c3
-rw-r--r--src/libcharon/sa/tasks/child_create.c5
-rw-r--r--src/libcharon/sa/tasks/child_rekey.c5
-rw-r--r--src/libcharon/sa/tasks/ike_me.c2
-rw-r--r--src/libcharon/sa/tasks/ike_rekey.c7
-rw-r--r--src/libhydra/plugins/kernel_klips/kernel_klips_ipsec.c4
-rw-r--r--src/libhydra/plugins/kernel_netlink/kernel_netlink_ipsec.c2
-rw-r--r--src/libhydra/plugins/kernel_netlink/kernel_netlink_net.c4
-rw-r--r--src/libhydra/plugins/kernel_pfkey/kernel_pfkey_ipsec.c2
-rw-r--r--src/libhydra/plugins/kernel_pfroute/kernel_pfroute_net.c4
-rw-r--r--src/libstrongswan/processing/jobs/callback_job.c5
-rw-r--r--src/libstrongswan/processing/scheduler.c5
37 files changed, 79 insertions, 103 deletions
diff --git a/src/libcharon/bus/bus.c b/src/libcharon/bus/bus.c
index d017c2a97..ab8d0fc48 100644
--- a/src/libcharon/bus/bus.c
+++ b/src/libcharon/bus/bus.c
@@ -17,7 +17,6 @@
#include <stdint.h>
-#include <hydra.h>
#include <threading/thread.h>
#include <threading/thread_value.h>
#include <threading/condvar.h>
@@ -163,7 +162,7 @@ METHOD(bus_t, listen_, void,
this->mutex->lock(this->mutex);
this->listeners->insert_last(this->listeners, data.entry);
- hydra->processor->queue_job(hydra->processor, job);
+ lib->processor->queue_job(lib->processor, job);
thread_cleanup_push((thread_cleanup_t)this->mutex->unlock, this->mutex);
thread_cleanup_push((thread_cleanup_t)listener_cleanup, &data);
old = thread_cancelability(TRUE);
diff --git a/src/libcharon/daemon.c b/src/libcharon/daemon.c
index f05870d61..13ed33469 100644
--- a/src/libcharon/daemon.c
+++ b/src/libcharon/daemon.c
@@ -32,7 +32,6 @@
#include "daemon.h"
#include <library.h>
-#include <hydra.h>
#include <config/proposal.h>
#include <kernel/kernel_handler.h>
@@ -101,7 +100,7 @@ static void dbg_bus(debug_t group, level_t level, char *fmt, ...)
static void destroy(private_daemon_t *this)
{
/* terminate all idle threads */
- hydra->processor->set_threads(hydra->processor, 0);
+ lib->processor->set_threads(lib->processor, 0);
/* close all IKE_SAs */
if (this->public.ike_sa_manager)
@@ -178,7 +177,7 @@ METHOD(daemon_t, start, void,
private_daemon_t *this)
{
/* start the engine, go multithreaded */
- hydra->processor->set_threads(hydra->processor,
+ lib->processor->set_threads(lib->processor,
lib->settings->get_int(lib->settings, "charon.threads",
DEFAULT_THREADS));
}
diff --git a/src/libcharon/kernel/kernel_handler.c b/src/libcharon/kernel/kernel_handler.c
index ef700436d..d9e39fe43 100644
--- a/src/libcharon/kernel/kernel_handler.c
+++ b/src/libcharon/kernel/kernel_handler.c
@@ -69,7 +69,7 @@ METHOD(kernel_listener_t, acquire, bool,
DBG1(DBG_KNL, "creating acquire job for policy with reqid {%u}", reqid);
}
job = (job_t*)acquire_job_create(reqid, src_ts, dst_ts);
- hydra->processor->queue_job(hydra->processor, job);
+ lib->processor->queue_job(lib->processor, job);
return TRUE;
}
@@ -90,7 +90,7 @@ METHOD(kernel_listener_t, expire, bool,
{
job = (job_t*)rekey_child_sa_job_create(reqid, proto, spi);
}
- hydra->processor->queue_job(hydra->processor, job);
+ lib->processor->queue_job(lib->processor, job);
return TRUE;
}
@@ -102,7 +102,7 @@ METHOD(kernel_listener_t, mapping, bool,
DBG1(DBG_KNL, "NAT mappings of ESP CHILD_SA with SPI %.8x and "
"reqid {%u} changed, queuing update job", ntohl(spi), reqid);
job = (job_t*)update_sa_job_create(reqid, remote);
- hydra->processor->queue_job(hydra->processor, job);
+ lib->processor->queue_job(lib->processor, job);
return TRUE;
}
@@ -117,7 +117,7 @@ METHOD(kernel_listener_t, migrate, bool,
reqid, local);
job = (job_t*)migrate_job_create(reqid, src_ts, dst_ts, direction, local,
remote);
- hydra->processor->queue_job(hydra->processor, job);
+ lib->processor->queue_job(lib->processor, job);
return TRUE;
}
@@ -126,7 +126,7 @@ METHOD(kernel_listener_t, roam, bool,
{
job_t *job;
job = (job_t*)roam_job_create(address);
- hydra->processor->queue_job(hydra->processor, job);
+ lib->processor->queue_job(lib->processor, job);
return TRUE;
}
diff --git a/src/libcharon/network/receiver.c b/src/libcharon/network/receiver.c
index f43919217..a7eb4246e 100644
--- a/src/libcharon/network/receiver.c
+++ b/src/libcharon/network/receiver.c
@@ -20,7 +20,6 @@
#include "receiver.h"
-#include <hydra.h>
#include <daemon.h>
#include <network/socket.h>
#include <network/packet.h>
@@ -354,15 +353,15 @@ static job_requeue_t receive_packets(private_receiver_t *this)
{
DBG1(DBG_NET, "using receive delay: %dms",
this->receive_delay);
- hydra->scheduler->schedule_job_ms(hydra->scheduler,
+ lib->scheduler->schedule_job_ms(lib->scheduler,
(job_t*)process_message_job_create(message),
this->receive_delay);
return JOB_REQUEUE_DIRECT;
}
}
}
- hydra->processor->queue_job(hydra->processor,
- (job_t*)process_message_job_create(message));
+ lib->processor->queue_job(lib->processor,
+ (job_t*)process_message_job_create(message));
return JOB_REQUEUE_DIRECT;
}
@@ -427,7 +426,7 @@ receiver_t *receiver_create()
this->job = callback_job_create((callback_job_cb_t)receive_packets,
this, NULL, NULL);
- hydra->processor->queue_job(hydra->processor, (job_t*)this->job);
+ lib->processor->queue_job(lib->processor, (job_t*)this->job);
return &this->public;
}
diff --git a/src/libcharon/network/sender.c b/src/libcharon/network/sender.c
index 541384270..4177fb3e1 100644
--- a/src/libcharon/network/sender.c
+++ b/src/libcharon/network/sender.c
@@ -19,7 +19,6 @@
#include "sender.h"
-#include <hydra.h>
#include <daemon.h>
#include <network/socket.h>
#include <processing/jobs/callback_job.h>
@@ -196,7 +195,7 @@ sender_t * sender_create()
"charon.send_delay_response", TRUE),
);
- hydra->processor->queue_job(hydra->processor, (job_t*)this->job);
+ lib->processor->queue_job(lib->processor, (job_t*)this->job);
return &this->public;
}
diff --git a/src/libcharon/plugins/android/android_service.c b/src/libcharon/plugins/android/android_service.c
index 16603a694..f9a8e1ea1 100644
--- a/src/libcharon/plugins/android/android_service.c
+++ b/src/libcharon/plugins/android/android_service.c
@@ -20,7 +20,6 @@
#include "android_service.h"
-#include <hydra.h>
#include <daemon.h>
#include <threading/thread.h>
#include <processing/jobs/callback_job.h>
@@ -142,7 +141,7 @@ METHOD(listener_t, child_updown, bool,
* callback, but from a different thread. we also delay it to avoid
* a race condition during a regular shutdown */
job = callback_job_create(shutdown_callback, NULL, NULL, NULL);
- hydra->scheduler->schedule_job(hydra->scheduler, (job_t*)job, 1);
+ lib->scheduler->schedule_job(lib->scheduler, (job_t*)job, 1);
return FALSE;
}
}
@@ -379,7 +378,7 @@ android_service_t *android_service_create(android_creds_t *creds)
charon->bus->add_listener(charon->bus, &this->public.listener);
this->job = callback_job_create((callback_job_cb_t)initiate, this,
NULL, NULL);
- hydra->processor->queue_job(hydra->processor, (job_t*)this->job);
+ lib->processor->queue_job(lib->processor, (job_t*)this->job);
return &this->public;
}
diff --git a/src/libcharon/plugins/dhcp/dhcp_socket.c b/src/libcharon/plugins/dhcp/dhcp_socket.c
index 5bca514af..36678f0fc 100644
--- a/src/libcharon/plugins/dhcp/dhcp_socket.c
+++ b/src/libcharon/plugins/dhcp/dhcp_socket.c
@@ -752,7 +752,7 @@ dhcp_socket_t *dhcp_socket_create()
this->job = callback_job_create((callback_job_cb_t)receive_dhcp,
this, NULL, NULL);
- hydra->processor->queue_job(hydra->processor, (job_t*)this->job);
+ lib->processor->queue_job(lib->processor, (job_t*)this->job);
return &this->public;
}
diff --git a/src/libcharon/plugins/farp/farp_spoofer.c b/src/libcharon/plugins/farp/farp_spoofer.c
index 031f47687..a904a6538 100644
--- a/src/libcharon/plugins/farp/farp_spoofer.c
+++ b/src/libcharon/plugins/farp/farp_spoofer.c
@@ -23,7 +23,6 @@
#include <linux/filter.h>
#include <sys/ioctl.h>
-#include <hydra.h>
#include <daemon.h>
#include <threading/thread.h>
#include <processing/jobs/callback_job.h>
@@ -192,7 +191,7 @@ farp_spoofer_t *farp_spoofer_create(farp_listener_t *listener)
this->job = callback_job_create((callback_job_cb_t)receive_arp,
this, NULL, NULL);
- hydra->processor->queue_job(hydra->processor, (job_t*)this->job);
+ lib->processor->queue_job(lib->processor, (job_t*)this->job);
return &this->public;
}
diff --git a/src/libcharon/plugins/ha/ha_ctl.c b/src/libcharon/plugins/ha/ha_ctl.c
index 781918c0a..1e9a5fd0e 100644
--- a/src/libcharon/plugins/ha/ha_ctl.c
+++ b/src/libcharon/plugins/ha/ha_ctl.c
@@ -23,7 +23,6 @@
#include <errno.h>
#include <pthread.h>
-#include <hydra.h>
#include <processing/jobs/callback_job.h>
#define HA_FIFO IPSEC_PIDDIR "/charon.ha"
@@ -135,7 +134,7 @@ ha_ctl_t *ha_ctl_create(ha_segments_t *segments, ha_cache_t *cache)
this->job = callback_job_create((callback_job_cb_t)dispatch_fifo,
this, NULL, NULL);
- hydra->processor->queue_job(hydra->processor, (job_t*)this->job);
+ lib->processor->queue_job(lib->processor, (job_t*)this->job);
return &this->public;
}
diff --git a/src/libcharon/plugins/ha/ha_dispatcher.c b/src/libcharon/plugins/ha/ha_dispatcher.c
index b6007b84b..4f9496f90 100644
--- a/src/libcharon/plugins/ha/ha_dispatcher.c
+++ b/src/libcharon/plugins/ha/ha_dispatcher.c
@@ -15,7 +15,6 @@
#include "ha_dispatcher.h"
-#include <hydra.h>
#include <daemon.h>
#include <processing/jobs/callback_job.h>
@@ -870,7 +869,7 @@ ha_dispatcher_t *ha_dispatcher_create(ha_socket_t *socket,
);
this->job = callback_job_create((callback_job_cb_t)dispatch,
this, NULL, NULL);
- hydra->processor->queue_job(hydra->processor, (job_t*)this->job);
+ lib->processor->queue_job(lib->processor, (job_t*)this->job);
return &this->public;
}
diff --git a/src/libcharon/plugins/ha/ha_segments.c b/src/libcharon/plugins/ha/ha_segments.c
index fea454aa8..19e0f692e 100644
--- a/src/libcharon/plugins/ha/ha_segments.c
+++ b/src/libcharon/plugins/ha/ha_segments.c
@@ -17,7 +17,6 @@
#include <pthread.h>
-#include <hydra.h>
#include <threading/mutex.h>
#include <threading/condvar.h>
#include <utils/linked_list.h>
@@ -284,7 +283,7 @@ static void start_watchdog(private_ha_segments_t *this)
{
this->job = callback_job_create((callback_job_cb_t)watchdog,
this, NULL, NULL);
- hydra->processor->queue_job(hydra->processor, (job_t*)this->job);
+ lib->processor->queue_job(lib->processor, (job_t*)this->job);
}
METHOD(ha_segments_t, handle_status, void,
@@ -346,7 +345,7 @@ static job_requeue_t send_status(private_ha_segments_t *this)
message->destroy(message);
/* schedule next invocation */
- hydra->scheduler->schedule_job_ms(hydra->scheduler, (job_t*)
+ lib->scheduler->schedule_job_ms(lib->scheduler, (job_t*)
callback_job_create((callback_job_cb_t)
send_status, this, NULL, NULL),
this->heartbeat_delay);
diff --git a/src/libcharon/plugins/ha/ha_socket.c b/src/libcharon/plugins/ha/ha_socket.c
index 50c10b9ef..614c70ed3 100644
--- a/src/libcharon/plugins/ha/ha_socket.c
+++ b/src/libcharon/plugins/ha/ha_socket.c
@@ -22,7 +22,6 @@
#include <unistd.h>
#include <pthread.h>
-#include <hydra.h>
#include <daemon.h>
#include <utils/host.h>
#include <processing/jobs/callback_job.h>
@@ -108,7 +107,7 @@ METHOD(ha_socket_t, push, void,
job = callback_job_create((callback_job_cb_t)send_message,
data, (void*)job_data_destroy, NULL);
- hydra->processor->queue_job(hydra->processor, (job_t*)job);
+ lib->processor->queue_job(lib->processor, (job_t*)job);
return;
}
DBG1(DBG_CFG, "pushing HA message failed: %s", strerror(errno));
diff --git a/src/libcharon/plugins/load_tester/load_tester_listener.c b/src/libcharon/plugins/load_tester/load_tester_listener.c
index 19a38d90e..cf6dd0562 100644
--- a/src/libcharon/plugins/load_tester/load_tester_listener.c
+++ b/src/libcharon/plugins/load_tester/load_tester_listener.c
@@ -17,7 +17,6 @@
#include <signal.h>
-#include <hydra.h>
#include <daemon.h>
#include <processing/jobs/delete_ike_sa_job.h>
@@ -60,7 +59,7 @@ static bool ike_state_change(private_load_tester_listener_t *this,
if (this->delete_after_established)
{
- hydra->processor->queue_job(hydra->processor,
+ lib->processor->queue_job(lib->processor,
(job_t*)delete_ike_sa_job_create(id, TRUE));
}
diff --git a/src/libcharon/plugins/load_tester/load_tester_plugin.c b/src/libcharon/plugins/load_tester/load_tester_plugin.c
index a1956d17c..cb9b80c7f 100644
--- a/src/libcharon/plugins/load_tester/load_tester_plugin.c
+++ b/src/libcharon/plugins/load_tester/load_tester_plugin.c
@@ -222,7 +222,7 @@ plugin_t *load_tester_plugin_create()
this->running = 0;
for (i = 0; i < this->initiators; i++)
{
- hydra->processor->queue_job(hydra->processor,
+ lib->processor->queue_job(lib->processor,
(job_t*)callback_job_create((callback_job_cb_t)do_load_test,
this, NULL, NULL));
}
diff --git a/src/libcharon/plugins/medcli/medcli_config.c b/src/libcharon/plugins/medcli/medcli_config.c
index aafe33af2..870d87c7e 100644
--- a/src/libcharon/plugins/medcli/medcli_config.c
+++ b/src/libcharon/plugins/medcli/medcli_config.c
@@ -18,7 +18,6 @@
#include "medcli_config.h"
-#include <hydra.h>
#include <daemon.h>
#include <processing/jobs/callback_job.h>
@@ -365,7 +364,7 @@ static void schedule_autoinit(private_medcli_config_t *this)
if (peer_cfg)
{
/* schedule asynchronous initiation job */
- hydra->processor->queue_job(hydra->processor,
+ lib->processor->queue_job(lib->processor,
(job_t*)callback_job_create(
(callback_job_cb_t)initiate_config,
peer_cfg, (void*)peer_cfg->destroy, NULL));
diff --git a/src/libcharon/plugins/nm/nm_plugin.c b/src/libcharon/plugins/nm/nm_plugin.c
index e1da7822b..fd0580bd6 100644
--- a/src/libcharon/plugins/nm/nm_plugin.c
+++ b/src/libcharon/plugins/nm/nm_plugin.c
@@ -122,7 +122,7 @@ plugin_t *nm_plugin_create()
/* bypass file permissions to read from users ssh-agent */
charon->keep_cap(charon, CAP_DAC_OVERRIDE);
- hydra->processor->queue_job(hydra->processor,
+ lib->processor->queue_job(lib->processor,
(job_t*)callback_job_create((callback_job_cb_t)run, this, NULL, NULL));
return &this->public.plugin;
diff --git a/src/libcharon/plugins/smp/smp.c b/src/libcharon/plugins/smp/smp.c
index c891c3262..60937f23d 100644
--- a/src/libcharon/plugins/smp/smp.c
+++ b/src/libcharon/plugins/smp/smp.c
@@ -28,7 +28,6 @@
#include <libxml/xmlwriter.h>
#include <library.h>
-#include <hydra.h>
#include <daemon.h>
#include <threading/thread.h>
#include <processing/jobs/callback_job.h>
@@ -703,7 +702,7 @@ static job_requeue_t dispatch(private_smp_t *this)
fdp = malloc_thing(int);
*fdp = fd;
job = callback_job_create((callback_job_cb_t)process, fdp, free, this->job);
- hydra->processor->queue_job(hydra->processor, (job_t*)job);
+ lib->processor->queue_job(lib->processor, (job_t*)job);
return JOB_REQUEUE_DIRECT;
}
@@ -762,7 +761,7 @@ plugin_t *smp_plugin_create()
}
this->job = callback_job_create((callback_job_cb_t)dispatch, this, NULL, NULL);
- hydra->processor->queue_job(hydra->processor, (job_t*)this->job);
+ lib->processor->queue_job(lib->processor, (job_t*)this->job);
return &this->public.plugin;
}
diff --git a/src/libcharon/plugins/stroke/stroke_control.c b/src/libcharon/plugins/stroke/stroke_control.c
index f009d077f..e0398ba78 100644
--- a/src/libcharon/plugins/stroke/stroke_control.c
+++ b/src/libcharon/plugins/stroke/stroke_control.c
@@ -15,7 +15,6 @@
#include "stroke_control.h"
-#include <hydra.h>
#include <daemon.h>
#include <processing/jobs/delete_ike_sa_job.h>
@@ -355,7 +354,7 @@ static void terminate_srcip(private_stroke_control_t *this,
}
/* schedule delete asynchronously */
- hydra->processor->queue_job(hydra->processor, (job_t*)
+ lib->processor->queue_job(lib->processor, (job_t*)
delete_ike_sa_job_create(ike_sa->get_id(ike_sa), TRUE));
}
enumerator->destroy(enumerator);
diff --git a/src/libcharon/plugins/stroke/stroke_list.c b/src/libcharon/plugins/stroke/stroke_list.c
index ee7927f3c..5825df0b7 100644
--- a/src/libcharon/plugins/stroke/stroke_list.c
+++ b/src/libcharon/plugins/stroke/stroke_list.c
@@ -423,12 +423,12 @@ static void status(private_stroke_list_t *this, stroke_msg_t *msg, FILE *out, bo
}
#endif /* HAVE_MALLINFO */
fprintf(out, " worker threads: %d idle of %d,",
- hydra->processor->get_idle_threads(hydra->processor),
- hydra->processor->get_total_threads(hydra->processor));
+ lib->processor->get_idle_threads(lib->processor),
+ lib->processor->get_total_threads(lib->processor));
fprintf(out, " job queue load: %d,",
- hydra->processor->get_job_load(hydra->processor));
+ lib->processor->get_job_load(lib->processor));
fprintf(out, " scheduled events: %d\n",
- hydra->scheduler->get_job_load(hydra->scheduler));
+ lib->scheduler->get_job_load(lib->scheduler));
fprintf(out, " loaded plugins: ");
enumerator = lib->plugins->create_plugin_enumerator(lib->plugins);
while (enumerator->enumerate(enumerator, &plugin))
diff --git a/src/libcharon/plugins/stroke/stroke_socket.c b/src/libcharon/plugins/stroke/stroke_socket.c
index 891128f73..0a5110fd3 100644
--- a/src/libcharon/plugins/stroke/stroke_socket.c
+++ b/src/libcharon/plugins/stroke/stroke_socket.c
@@ -586,7 +586,7 @@ static job_requeue_t receive(private_stroke_socket_t *this)
ctx->this = this;
job = callback_job_create((callback_job_cb_t)process,
ctx, (void*)stroke_job_context_destroy, this->job);
- hydra->processor->queue_job(hydra->processor, (job_t*)job);
+ lib->processor->queue_job(lib->processor, (job_t*)job);
return JOB_REQUEUE_FAIR;
}
@@ -684,7 +684,7 @@ stroke_socket_t *stroke_socket_create()
this->job = callback_job_create((callback_job_cb_t)receive,
this, NULL, NULL);
- hydra->processor->queue_job(hydra->processor, (job_t*)this->job);
+ lib->processor->queue_job(lib->processor, (job_t*)this->job);
return &this->public;
}
diff --git a/src/libcharon/plugins/uci/uci_control.c b/src/libcharon/plugins/uci/uci_control.c
index 0736ed5fd..aee2505e3 100644
--- a/src/libcharon/plugins/uci/uci_control.c
+++ b/src/libcharon/plugins/uci/uci_control.c
@@ -24,7 +24,6 @@
#include "uci_control.h"
-#include <hydra.h>
#include <daemon.h>
#include <threading/thread.h>
#include <processing/jobs/callback_job.h>
@@ -295,7 +294,7 @@ uci_control_t *uci_control_create()
{
this->job = callback_job_create((callback_job_cb_t)receive,
this, NULL, NULL);
- hydra->processor->queue_job(hydra->processor, (job_t*)this->job);
+ lib->processor->queue_job(lib->processor, (job_t*)this->job);
}
return &this->public;
}
diff --git a/src/libcharon/processing/jobs/inactivity_job.c b/src/libcharon/processing/jobs/inactivity_job.c
index 237c9d2b3..1371000eb 100644
--- a/src/libcharon/processing/jobs/inactivity_job.c
+++ b/src/libcharon/processing/jobs/inactivity_job.c
@@ -15,7 +15,6 @@
#include "inactivity_job.h"
-#include <hydra.h>
#include <daemon.h>
typedef struct private_inactivity_job_t private_inactivity_job_t;
@@ -88,7 +87,7 @@ METHOD(job_t, execute, void,
}
else
{
- hydra->scheduler->schedule_job(hydra->scheduler,
+ lib->scheduler->schedule_job(lib->scheduler,
&this->public.job_interface, this->timeout - diff);
rescheduled = TRUE;
}
diff --git a/src/libcharon/sa/connect_manager.c b/src/libcharon/sa/connect_manager.c
index 8367d644e..1fb286863 100644
--- a/src/libcharon/sa/connect_manager.c
+++ b/src/libcharon/sa/connect_manager.c
@@ -17,7 +17,6 @@
#include <math.h>
-#include <hydra.h>
#include <daemon.h>
#include <threading/mutex.h>
#include <utils/linked_list.h>
@@ -933,7 +932,7 @@ static void update_checklist_state(private_connect_manager_t *this,
callback_data_t *data = callback_data_create(this, checklist->connect_id);
job_t *job = (job_t*)callback_job_create((callback_job_cb_t)initiator_finish, data, (callback_job_cleanup_t)callback_data_destroy, NULL);
- hydra->scheduler->schedule_job_ms(hydra->scheduler, job, ME_WAIT_TO_FINISH);
+ lib->scheduler->schedule_job_ms(lib->scheduler, job, ME_WAIT_TO_FINISH);
checklist->is_finishing = TRUE;
}
@@ -1032,7 +1031,7 @@ static void queue_retransmission(private_connect_manager_t *this, check_list_t *
DBG2(DBG_IKE, "scheduling retransmission %d of pair '%d' in %dms",
retransmission, pair->id, rto);
- hydra->scheduler->schedule_job_ms(hydra->scheduler, (job_t*)job, rto);
+ lib->scheduler->schedule_job_ms(lib->scheduler, (job_t*)job, rto);
}
/**
@@ -1171,7 +1170,7 @@ static void schedule_checks(private_connect_manager_t *this, check_list_t *check
{
callback_data_t *data = callback_data_create(this, checklist->connect_id);
checklist->sender = (job_t*)callback_job_create((callback_job_cb_t)sender, data, (callback_job_cleanup_t)callback_data_destroy, NULL);
- hydra->scheduler->schedule_job_ms(hydra->scheduler, checklist->sender, time);
+ lib->scheduler->schedule_job_ms(lib->scheduler, checklist->sender, time);
}
/**
@@ -1223,7 +1222,7 @@ static void finish_checks(private_connect_manager_t *this, check_list_t *checkli
initiate_data_t *data = initiate_data_create(checklist, initiated);
job_t *job = (job_t*)callback_job_create((callback_job_cb_t)initiate_mediated, data, (callback_job_cleanup_t)initiate_data_destroy, NULL);
- hydra->processor->queue_job(hydra->processor, job);
+ lib->processor->queue_job(lib->processor, job);
return;
}
else
@@ -1478,7 +1477,7 @@ static void check_and_initiate(private_connect_manager_t *this,
{
job_t *job = (job_t*)reinitiate_mediation_job_create(mediation_sa,
waiting_sa);
- hydra->processor->queue_job(hydra->processor, job);
+ lib->processor->queue_job(lib->processor, job);
}
iterator->destroy(iterator);
diff --git a/src/libcharon/sa/ike_sa.c b/src/libcharon/sa/ike_sa.c
index e82b4e0a1..9eb18c336 100644
--- a/src/libcharon/sa/ike_sa.c
+++ b/src/libcharon/sa/ike_sa.c
@@ -470,8 +470,8 @@ METHOD(ike_sa_t, send_keepalive, void,
diff = 0;
}
job = send_keepalive_job_create(this->ike_sa_id);
- hydra->scheduler->schedule_job(hydra->scheduler, (job_t*)job,
- this->keepalive_interval - diff);
+ lib->scheduler->schedule_job(lib->scheduler, (job_t*)job,
+ this->keepalive_interval - diff);
}
METHOD(ike_sa_t, get_ike_cfg, ike_cfg_t*,
@@ -605,7 +605,7 @@ METHOD(ike_sa_t, send_dpd, status_t,
}
/* recheck in "interval" seconds */
job = (job_t*)send_dpd_job_create(this->ike_sa_id);
- hydra->scheduler->schedule_job(hydra->scheduler, job, delay - diff);
+ lib->scheduler->schedule_job(lib->scheduler, job, delay - diff);
return SUCCESS;
}
@@ -644,7 +644,7 @@ METHOD(ike_sa_t, set_state, void,
{
this->stats[STAT_REKEY] = t + this->stats[STAT_ESTABLISHED];
job = (job_t*)rekey_ike_sa_job_create(this->ike_sa_id, FALSE);
- hydra->scheduler->schedule_job(hydra->scheduler, job, t);
+ lib->scheduler->schedule_job(lib->scheduler, job, t);
DBG1(DBG_IKE, "scheduling rekeying in %ds", t);
}
t = this->peer_cfg->get_reauth_time(this->peer_cfg);
@@ -653,7 +653,7 @@ METHOD(ike_sa_t, set_state, void,
{
this->stats[STAT_REAUTH] = t + this->stats[STAT_ESTABLISHED];
job = (job_t*)rekey_ike_sa_job_create(this->ike_sa_id, TRUE);
- hydra->scheduler->schedule_job(hydra->scheduler, job, t);
+ lib->scheduler->schedule_job(lib->scheduler, job, t);
DBG1(DBG_IKE, "scheduling reauthentication in %ds", t);
}
t = this->peer_cfg->get_over_time(this->peer_cfg);
@@ -675,7 +675,7 @@ METHOD(ike_sa_t, set_state, void,
this->stats[STAT_DELETE] += t;
t = this->stats[STAT_DELETE] - this->stats[STAT_ESTABLISHED];
job = (job_t*)delete_ike_sa_job_create(this->ike_sa_id, TRUE);
- hydra->scheduler->schedule_job(hydra->scheduler, job, t);
+ lib->scheduler->schedule_job(lib->scheduler, job, t);
DBG1(DBG_IKE, "maximum IKE_SA lifetime %ds", t);
}
@@ -688,8 +688,8 @@ METHOD(ike_sa_t, set_state, void,
{
/* delete may fail if a packet gets lost, so set a timeout */
job_t *job = (job_t*)delete_ike_sa_job_create(this->ike_sa_id, TRUE);
- hydra->scheduler->schedule_job(hydra->scheduler, job,
- HALF_OPEN_IKE_SA_TIMEOUT);
+ lib->scheduler->schedule_job(lib->scheduler, job,
+ HALF_OPEN_IKE_SA_TIMEOUT);
break;
}
default:
@@ -1163,7 +1163,7 @@ METHOD(ike_sa_t, initiate, status_t,
{
/* mediated connection, initiate mediation process */
job_t *job = (job_t*)initiate_mediation_job_create(this->ike_sa_id);
- hydra->processor->queue_job(hydra->processor, job);
+ lib->processor->queue_job(lib->processor, job);
return SUCCESS;
}
#endif /* ME */
@@ -1262,8 +1262,8 @@ METHOD(ike_sa_t, process_message, status_t,
}
/* add a timeout if peer does not establish it completely */
job = (job_t*)delete_ike_sa_job_create(this->ike_sa_id, FALSE);
- hydra->scheduler->schedule_job(hydra->scheduler, job,
- HALF_OPEN_IKE_SA_TIMEOUT);
+ lib->scheduler->schedule_job(lib->scheduler, job,
+ HALF_OPEN_IKE_SA_TIMEOUT);
}
this->stats[STAT_INBOUND] = time_monotonic(NULL);
/* check if message is trustworthy, and update host information */
@@ -1709,7 +1709,7 @@ METHOD(ike_sa_t, set_auth_lifetime, void,
{
DBG1(DBG_IKE, "received AUTH_LIFETIME of %ds, starting reauthentication",
lifetime);
- hydra->processor->queue_job(hydra->processor,
+ lib->processor->queue_job(lib->processor,
(job_t*)rekey_ike_sa_job_create(this->ike_sa_id, TRUE));
}
else if (this->stats[STAT_REAUTH] == 0 ||
@@ -1718,7 +1718,7 @@ METHOD(ike_sa_t, set_auth_lifetime, void,
this->stats[STAT_REAUTH] = reauth_time;
DBG1(DBG_IKE, "received AUTH_LIFETIME of %ds, scheduling reauthentication"
" in %ds", lifetime, lifetime - reduction);
- hydra->scheduler->schedule_job(hydra->scheduler,
+ lib->scheduler->schedule_job(lib->scheduler,
(job_t*)rekey_ike_sa_job_create(this->ike_sa_id, TRUE),
lifetime - reduction);
}
@@ -1919,9 +1919,9 @@ METHOD(ike_sa_t, inherit, status_t,
this->stats[STAT_DELETE] = this->stats[STAT_REAUTH] + delete;
DBG1(DBG_IKE, "rescheduling reauthentication in %ds after rekeying, "
"lifetime reduced to %ds", reauth, delete);
- hydra->scheduler->schedule_job(hydra->scheduler,
+ lib->scheduler->schedule_job(lib->scheduler,
(job_t*)rekey_ike_sa_job_create(this->ike_sa_id, TRUE), reauth);
- hydra->scheduler->schedule_job(hydra->scheduler,
+ lib->scheduler->schedule_job(lib->scheduler,
(job_t*)delete_ike_sa_job_create(this->ike_sa_id, TRUE), delete);
}
/* we have to initate here, there may be new tasks to handle */
diff --git a/src/libcharon/sa/mediation_manager.c b/src/libcharon/sa/mediation_manager.c
index 0efbdc2e9..2fbab7c7c 100644
--- a/src/libcharon/sa/mediation_manager.c
+++ b/src/libcharon/sa/mediation_manager.c
@@ -15,7 +15,6 @@
#include "mediation_manager.h"
-#include <hydra.h>
#include <daemon.h>
#include <threading/mutex.h>
#include <utils/linked_list.h>
@@ -242,7 +241,7 @@ static void update_sa_id(private_mediation_manager_t *this, identification_t *pe
(void**)&requester) == SUCCESS)
{
job_t *job = (job_t*)mediation_callback_job_create(requester, peer_id);
- hydra->processor->queue_job(hydra->processor, job);
+ lib->processor->queue_job(lib->processor, job);
requester->destroy(requester);
}
diff --git a/src/libcharon/sa/task_manager.c b/src/libcharon/sa/task_manager.c
index 69c08bf93..a7258848f 100644
--- a/src/libcharon/sa/task_manager.c
+++ b/src/libcharon/sa/task_manager.c
@@ -18,7 +18,6 @@
#include <math.h>
-#include <hydra.h>
#include <daemon.h>
#include <sa/tasks/ike_init.h>
#include <sa/tasks/ike_natd.h>
@@ -275,7 +274,7 @@ METHOD(task_manager_t, retransmit, status_t,
this->initiating.retransmitted++;
job = (job_t*)retransmit_job_create(this->initiating.mid,
this->ike_sa->get_id(this->ike_sa));
- hydra->scheduler->schedule_job_ms(hydra->scheduler, job, timeout);
+ lib->scheduler->schedule_job_ms(lib->scheduler, job, timeout);
}
return SUCCESS;
}
diff --git a/src/libcharon/sa/tasks/child_create.c b/src/libcharon/sa/tasks/child_create.c
index 02513025f..57beedba9 100644
--- a/src/libcharon/sa/tasks/child_create.c
+++ b/src/libcharon/sa/tasks/child_create.c
@@ -17,7 +17,6 @@
#include "child_create.h"
-#include <hydra.h>
#include <daemon.h>
#include <crypto/diffie_hellman.h>
#include <credentials/certificates/x509.h>
@@ -262,7 +261,7 @@ static void schedule_inactivity_timeout(private_child_create_t *this)
{
close_ike = lib->settings->get_bool(lib->settings,
"charon.inactivity_close_ike", FALSE);
- hydra->scheduler->schedule_job(hydra->scheduler, (job_t*)
+ lib->scheduler->schedule_job(lib->scheduler, (job_t*)
inactivity_job_create(this->child_sa->get_reqid(this->child_sa),
timeout, close_ike), timeout);
}
@@ -872,7 +871,7 @@ static void handle_child_sa_failure(private_child_create_t *this,
/* we delay the delete for 100ms, as the IKE_AUTH response must arrive
* first */
DBG1(DBG_IKE, "closing IKE_SA due CHILD_SA setup failure");
- hydra->scheduler->schedule_job_ms(hydra->scheduler, (job_t*)
+ lib->scheduler->schedule_job_ms(lib->scheduler, (job_t*)
delete_ike_sa_job_create(this->ike_sa->get_id(this->ike_sa), TRUE),
100);
}
diff --git a/src/libcharon/sa/tasks/child_rekey.c b/src/libcharon/sa/tasks/child_rekey.c
index e497f0108..fdaaea4b8 100644
--- a/src/libcharon/sa/tasks/child_rekey.c
+++ b/src/libcharon/sa/tasks/child_rekey.c
@@ -16,7 +16,6 @@
#include "child_rekey.h"
-#include <hydra.h>
#include <daemon.h>
#include <encoding/payloads/notify_payload.h>
#include <sa/tasks/child_create.h>
@@ -300,7 +299,7 @@ static status_t process_i(private_child_rekey_t *this, message_t *message)
DBG1(DBG_IKE, "peer seems to not support CHILD_SA rekeying, "
"starting reauthentication");
this->child_sa->set_state(this->child_sa, CHILD_INSTALLED);
- hydra->processor->queue_job(hydra->processor,
+ lib->processor->queue_job(lib->processor,
(job_t*)rekey_ike_sa_job_create(
this->ike_sa->get_id(this->ike_sa), TRUE));
return SUCCESS;
@@ -330,7 +329,7 @@ static status_t process_i(private_child_rekey_t *this, message_t *message)
DBG1(DBG_IKE, "CHILD_SA rekeying failed, "
"trying again in %d seconds", retry);
this->child_sa->set_state(this->child_sa, CHILD_INSTALLED);
- hydra->scheduler->schedule_job(hydra->scheduler, job, retry);
+ lib->scheduler->schedule_job(lib->scheduler, job, retry);
}
return SUCCESS;
}
diff --git a/src/libcharon/sa/tasks/ike_me.c b/src/libcharon/sa/tasks/ike_me.c
index 3ccefd47c..1de6ae8fc 100644
--- a/src/libcharon/sa/tasks/ike_me.c
+++ b/src/libcharon/sa/tasks/ike_me.c
@@ -693,7 +693,7 @@ static status_t build_r_ms(private_ike_me_t *this, message_t *message)
job_t *job = (job_t*)mediation_job_create(this->peer_id,
this->ike_sa->get_other_id(this->ike_sa), this->connect_id,
this->connect_key, this->remote_endpoints, this->response);
- hydra->processor->queue_job(hydra->processor, job);
+ lib->processor->queue_job(lib->processor, job);
break;
}
default:
diff --git a/src/libcharon/sa/tasks/ike_rekey.c b/src/libcharon/sa/tasks/ike_rekey.c
index 1eabf9365..1a6c140c4 100644
--- a/src/libcharon/sa/tasks/ike_rekey.c
+++ b/src/libcharon/sa/tasks/ike_rekey.c
@@ -16,7 +16,6 @@
#include "ike_rekey.h"
-#include <hydra.h>
#include <daemon.h>
#include <encoding/payloads/notify_payload.h>
#include <sa/tasks/ike_init.h>
@@ -197,7 +196,7 @@ static status_t process_i(private_ike_rekey_t *this, message_t *message)
DBG1(DBG_IKE, "peer seems to not support IKE rekeying, "
"starting reauthentication");
this->ike_sa->set_state(this->ike_sa, IKE_ESTABLISHED);
- hydra->processor->queue_job(hydra->processor,
+ lib->processor->queue_job(lib->processor,
(job_t*)rekey_ike_sa_job_create(
this->ike_sa->get_id(this->ike_sa), TRUE));
return SUCCESS;
@@ -218,7 +217,7 @@ static status_t process_i(private_ike_rekey_t *this, message_t *message)
DBG1(DBG_IKE, "IKE_SA rekeying failed, "
"trying again in %d seconds", retry);
this->ike_sa->set_state(this->ike_sa, IKE_ESTABLISHED);
- hydra->scheduler->schedule_job(hydra->scheduler, job, retry);
+ lib->scheduler->schedule_job(lib->scheduler, job, retry);
}
return SUCCESS;
case NEED_MORE:
@@ -261,7 +260,7 @@ static status_t process_i(private_ike_rekey_t *this, message_t *message)
/* peer should delete this SA. Add a timeout just in case. */
job_t *job = (job_t*)delete_ike_sa_job_create(
other->new_sa->get_id(other->new_sa), TRUE);
- hydra->scheduler->schedule_job(hydra->scheduler, job, 10);
+ lib->scheduler->schedule_job(lib->scheduler, job, 10);
DBG1(DBG_IKE, "IKE_SA rekey collision won, deleting rekeyed IKE_SA");
charon->ike_sa_manager->checkin(charon->ike_sa_manager, other->new_sa);
other->new_sa = NULL;
diff --git a/src/libhydra/plugins/kernel_klips/kernel_klips_ipsec.c b/src/libhydra/plugins/kernel_klips/kernel_klips_ipsec.c
index 28ca697c2..166df54fe 100644
--- a/src/libhydra/plugins/kernel_klips/kernel_klips_ipsec.c
+++ b/src/libhydra/plugins/kernel_klips/kernel_klips_ipsec.c
@@ -1509,7 +1509,7 @@ static void schedule_expire(private_kernel_klips_ipsec_t *this,
expire->reqid = reqid;
expire->type = type;
job = callback_job_create((callback_job_cb_t)sa_expires, expire, free, NULL);
- hydra->scheduler->schedule_job(hydra->scheduler, (job_t*)job, time);
+ lib->scheduler->schedule_job(lib->scheduler, (job_t*)job, time);
}
METHOD(kernel_ipsec_t, get_spi, status_t,
@@ -2632,7 +2632,7 @@ kernel_klips_ipsec_t *kernel_klips_ipsec_create()
this->job = callback_job_create((callback_job_cb_t)receive_events,
this, NULL, NULL);
- hydra->processor->queue_job(hydra->processor, (job_t*)this->job);
+ lib->processor->queue_job(lib->processor, (job_t*)this->job);
return &this->public;
}
diff --git a/src/libhydra/plugins/kernel_netlink/kernel_netlink_ipsec.c b/src/libhydra/plugins/kernel_netlink/kernel_netlink_ipsec.c
index 1db6ee9e3..6ecfa03e3 100644
--- a/src/libhydra/plugins/kernel_netlink/kernel_netlink_ipsec.c
+++ b/src/libhydra/plugins/kernel_netlink/kernel_netlink_ipsec.c
@@ -2201,7 +2201,7 @@ kernel_netlink_ipsec_t *kernel_netlink_ipsec_create()
}
this->job = callback_job_create((callback_job_cb_t)receive_events,
this, NULL, NULL);
- hydra->processor->queue_job(hydra->processor, (job_t*)this->job);
+ lib->processor->queue_job(lib->processor, (job_t*)this->job);
return &this->public;
}
diff --git a/src/libhydra/plugins/kernel_netlink/kernel_netlink_net.c b/src/libhydra/plugins/kernel_netlink/kernel_netlink_net.c
index 8e7a0a935..f509d8286 100644
--- a/src/libhydra/plugins/kernel_netlink/kernel_netlink_net.c
+++ b/src/libhydra/plugins/kernel_netlink/kernel_netlink_net.c
@@ -254,7 +254,7 @@ static void fire_roam_event(private_kernel_netlink_net_t *this, bool address)
job = (job_t*)callback_job_create((callback_job_cb_t)roam_event,
(void*)(uintptr_t)(address ? 1 : 0),
NULL, NULL);
- hydra->scheduler->schedule_job_ms(hydra->scheduler, job, ROAM_DELAY);
+ lib->scheduler->schedule_job_ms(lib->scheduler, job, ROAM_DELAY);
}
}
@@ -1492,7 +1492,7 @@ kernel_netlink_net_t *kernel_netlink_net_create()
this->job = callback_job_create((callback_job_cb_t)receive_events,
this, NULL, NULL);
- hydra->processor->queue_job(hydra->processor, (job_t*)this->job);
+ lib->processor->queue_job(lib->processor, (job_t*)this->job);
if (init_address_list(this) != SUCCESS)
{
diff --git a/src/libhydra/plugins/kernel_pfkey/kernel_pfkey_ipsec.c b/src/libhydra/plugins/kernel_pfkey/kernel_pfkey_ipsec.c
index b6d2c5f66..b2c0e2ccd 100644
--- a/src/libhydra/plugins/kernel_pfkey/kernel_pfkey_ipsec.c
+++ b/src/libhydra/plugins/kernel_pfkey/kernel_pfkey_ipsec.c
@@ -2166,7 +2166,7 @@ kernel_pfkey_ipsec_t *kernel_pfkey_ipsec_create()
this->job = callback_job_create((callback_job_cb_t)receive_events,
this, NULL, NULL);
- hydra->processor->queue_job(hydra->processor, (job_t*)this->job);
+ lib->processor->queue_job(lib->processor, (job_t*)this->job);
return &this->public;
}
diff --git a/src/libhydra/plugins/kernel_pfroute/kernel_pfroute_net.c b/src/libhydra/plugins/kernel_pfroute/kernel_pfroute_net.c
index 99b99a274..59fc915fd 100644
--- a/src/libhydra/plugins/kernel_pfroute/kernel_pfroute_net.c
+++ b/src/libhydra/plugins/kernel_pfroute/kernel_pfroute_net.c
@@ -182,7 +182,7 @@ static void fire_roam_event(private_kernel_pfroute_net_t *this, bool address)
job = (job_t*)callback_job_create((callback_job_cb_t)roam_event,
(void*)(uintptr_t)(address ? 1 : 0),
NULL, NULL);
- hydra->scheduler->schedule_job_ms(hydra->scheduler, job, ROAM_DELAY);
+ lib->scheduler->schedule_job_ms(lib->scheduler, job, ROAM_DELAY);
}
}
@@ -729,7 +729,7 @@ kernel_pfroute_net_t *kernel_pfroute_net_create()
this->job = callback_job_create((callback_job_cb_t)receive_events,
this, NULL, NULL);
- hydra->processor->queue_job(hydra->processor, (job_t*)this->job);
+ lib->processor->queue_job(lib->processor, (job_t*)this->job);
if (init_address_list(this) != SUCCESS)
{
diff --git a/src/libstrongswan/processing/jobs/callback_job.c b/src/libstrongswan/processing/jobs/callback_job.c
index 4c9a7fdac..556cbd907 100644
--- a/src/libstrongswan/processing/jobs/callback_job.c
+++ b/src/libstrongswan/processing/jobs/callback_job.c
@@ -18,7 +18,6 @@
#include <semaphore.h>
-#include <hydra.h>
#include <threading/thread.h>
#include <threading/condvar.h>
#include <threading/mutex.h>
@@ -227,8 +226,8 @@ static void execute(private_callback_job_t *this)
thread_cancellation_point();
if (requeue)
{
- hydra->processor->queue_job(hydra->processor,
- &this->public.job_interface);
+ lib->processor->queue_job(lib->processor,
+ &this->public.job_interface);
}
thread_cleanup_pop(cleanup);
}
diff --git a/src/libstrongswan/processing/scheduler.c b/src/libstrongswan/processing/scheduler.c
index 8a58e4570..e23f04598 100644
--- a/src/libstrongswan/processing/scheduler.c
+++ b/src/libstrongswan/processing/scheduler.c
@@ -19,7 +19,6 @@
#include "scheduler.h"
-#include <hydra.h>
#include <debug.h>
#include <processing/processor.h>
#include <processing/jobs/callback_job.h>
@@ -200,7 +199,7 @@ static job_requeue_t schedule(private_scheduler_t * this)
remove_event(this);
this->mutex->unlock(this->mutex);
DBG2(DBG_JOB, "got event, queuing job for execution");
- hydra->processor->queue_job(hydra->processor, event->job);
+ lib->processor->queue_job(lib->processor, event->job);
free(event);
return JOB_REQUEUE_DIRECT;
}
@@ -352,7 +351,7 @@ scheduler_t * scheduler_create()
this->condvar = condvar_create(CONDVAR_TYPE_DEFAULT);
this->job = callback_job_create((callback_job_cb_t)schedule, this, NULL, NULL);
- hydra->processor->queue_job(hydra->processor, (job_t*)this->job);
+ lib->processor->queue_job(lib->processor, (job_t*)this->job);
return &this->public;
}