]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
Refer to processor via hydra and not charon.
authorTobias Brunner <tobias@strongswan.org>
Mon, 5 Jul 2010 11:52:05 +0000 (13:52 +0200)
committerTobias Brunner <tobias@strongswan.org>
Thu, 2 Sep 2010 17:01:22 +0000 (19:01 +0200)
34 files changed:
src/libcharon/bus/bus.c
src/libcharon/daemon.c
src/libcharon/network/receiver.c
src/libcharon/network/sender.c
src/libcharon/plugins/android/android_service.c
src/libcharon/plugins/dhcp/dhcp_socket.c
src/libcharon/plugins/farp/farp_spoofer.c
src/libcharon/plugins/ha/ha_ctl.c
src/libcharon/plugins/ha/ha_dispatcher.c
src/libcharon/plugins/ha/ha_segments.c
src/libcharon/plugins/ha/ha_socket.c
src/libcharon/plugins/kernel_klips/kernel_klips_ipsec.c
src/libcharon/plugins/kernel_netlink/kernel_netlink_ipsec.c
src/libcharon/plugins/kernel_netlink/kernel_netlink_net.c
src/libcharon/plugins/kernel_pfkey/kernel_pfkey_ipsec.c
src/libcharon/plugins/kernel_pfroute/kernel_pfroute_net.c
src/libcharon/plugins/load_tester/load_tester_listener.c
src/libcharon/plugins/load_tester/load_tester_plugin.c
src/libcharon/plugins/medcli/medcli_config.c
src/libcharon/plugins/nm/nm_plugin.c
src/libcharon/plugins/smp/smp.c
src/libcharon/plugins/stroke/stroke_control.c
src/libcharon/plugins/stroke/stroke_list.c
src/libcharon/plugins/stroke/stroke_socket.c
src/libcharon/plugins/uci/uci_control.c
src/libcharon/processing/jobs/callback_job.c
src/libcharon/processing/scheduler.c
src/libcharon/sa/connect_manager.c
src/libcharon/sa/ike_sa.c
src/libcharon/sa/mediation_manager.c
src/libcharon/sa/tasks/child_rekey.c
src/libcharon/sa/tasks/ike_me.c
src/libcharon/sa/tasks/ike_rekey.c
src/libhydra/processing/processor.c

index 441009e5e1c6cc34ff2b8df081ad3a501f4415dd..d017c2a97525b71a9d37e830325a07dbf293e345 100644 (file)
@@ -17,7 +17,7 @@
 
 #include <stdint.h>
 
-#include <daemon.h>
+#include <hydra.h>
 #include <threading/thread.h>
 #include <threading/thread_value.h>
 #include <threading/condvar.h>
@@ -163,7 +163,7 @@ METHOD(bus_t, listen_, void,
 
        this->mutex->lock(this->mutex);
        this->listeners->insert_last(this->listeners, data.entry);
-       charon->processor->queue_job(charon->processor, job);
+       hydra->processor->queue_job(hydra->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);
index 2f4c1c1fa56165ece6e8794af33d14a5239ed340..f414db96e4927bfdd33bc0cbcfa3d5c89462c15b 100644 (file)
@@ -32,6 +32,7 @@
 #include "daemon.h"
 
 #include <library.h>
+#include <hydra.h>
 #include <config/proposal.h>
 
 #ifndef LOG_AUTHPRIV /* not defined on OpenSolaris */
index 1a25d457d5d0b9db16ce70c3b849a744602ccf1b..cc73ba89e1e57c7e6b8342dd23af7b676a914707 100644 (file)
@@ -20,6 +20,7 @@
 
 #include "receiver.h"
 
+#include <hydra.h>
 #include <daemon.h>
 #include <network/socket.h>
 #include <network/packet.h>
@@ -360,7 +361,7 @@ static job_requeue_t receive_packets(private_receiver_t *this)
                        }
                }
        }
-       charon->processor->queue_job(charon->processor,
+       hydra->processor->queue_job(hydra->processor,
                                                                 (job_t*)process_message_job_create(message));
        return JOB_REQUEUE_DIRECT;
 }
@@ -426,7 +427,7 @@ receiver_t *receiver_create()
 
        this->job = callback_job_create((callback_job_cb_t)receive_packets,
                                                                        this, NULL, NULL);
-       charon->processor->queue_job(charon->processor, (job_t*)this->job);
+       hydra->processor->queue_job(hydra->processor, (job_t*)this->job);
 
        return &this->public;
 }
index bb6d50605afb0c83f5aa1264cb0fa0ff84c9b8e7..541384270652c5bc021368e54c8089ae3cf6a648 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "sender.h"
 
+#include <hydra.h>
 #include <daemon.h>
 #include <network/socket.h>
 #include <processing/jobs/callback_job.h>
@@ -195,7 +196,7 @@ sender_t * sender_create()
                                                                                        "charon.send_delay_response", TRUE),
        );
 
-       charon->processor->queue_job(charon->processor, (job_t*)this->job);
+       hydra->processor->queue_job(hydra->processor, (job_t*)this->job);
 
        return &this->public;
 }
index 538c4a9a2036c2b56a39b37ce6d48cb91d70ced9..235679a15546b7473129d17f561a6a9a2cdfcb4d 100644 (file)
@@ -20,6 +20,7 @@
 
 #include "android_service.h"
 
+#include <hydra.h>
 #include <daemon.h>
 #include <threading/thread.h>
 #include <processing/jobs/callback_job.h>
@@ -378,7 +379,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);
-       charon->processor->queue_job(charon->processor, (job_t*)this->job);
+       hydra->processor->queue_job(hydra->processor, (job_t*)this->job);
 
        return &this->public;
 }
index f61b3a60e616bceaf23dd6bc8f2a5024b4a4ac8c..4a6b4514ad2a4959f5ecae480bab0dcddb35b205 100644 (file)
@@ -31,6 +31,7 @@
 #include <threading/condvar.h>
 #include <threading/thread.h>
 
+#include <hydra.h>
 #include <daemon.h>
 #include <processing/jobs/callback_job.h>
 
@@ -751,7 +752,7 @@ dhcp_socket_t *dhcp_socket_create()
 
        this->job = callback_job_create((callback_job_cb_t)receive_dhcp,
                                                                        this, NULL, NULL);
-       charon->processor->queue_job(charon->processor, (job_t*)this->job);
+       hydra->processor->queue_job(hydra->processor, (job_t*)this->job);
 
        return &this->public;
 }
index 20bb44fd3800152c03ff72c2d9af055f9e81cbea..031f47687f12a5ddc4dce4e3232a433105059750 100644 (file)
@@ -23,6 +23,7 @@
 #include <linux/filter.h>
 #include <sys/ioctl.h>
 
+#include <hydra.h>
 #include <daemon.h>
 #include <threading/thread.h>
 #include <processing/jobs/callback_job.h>
@@ -191,7 +192,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);
-       charon->processor->queue_job(charon->processor, (job_t*)this->job);
+       hydra->processor->queue_job(hydra->processor, (job_t*)this->job);
 
        return &this->public;
 }
index e188a848400b5085734b50eaee408dd18703bec8..781918c0ac7ff7a8463905c531b1fa2bdd84ffeb 100644 (file)
@@ -23,6 +23,7 @@
 #include <errno.h>
 #include <pthread.h>
 
+#include <hydra.h>
 #include <processing/jobs/callback_job.h>
 
 #define HA_FIFO IPSEC_PIDDIR "/charon.ha"
@@ -134,7 +135,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);
-       charon->processor->queue_job(charon->processor, (job_t*)this->job);
+       hydra->processor->queue_job(hydra->processor, (job_t*)this->job);
        return &this->public;
 }
 
index 3bc426ea0666a2f69260e65ebf53d56a75eb8bbb..b6007b84bccb316d977f96833a978761dd4c4ac6 100644 (file)
@@ -15,6 +15,7 @@
 
 #include "ha_dispatcher.h"
 
+#include <hydra.h>
 #include <daemon.h>
 #include <processing/jobs/callback_job.h>
 
@@ -869,7 +870,7 @@ ha_dispatcher_t *ha_dispatcher_create(ha_socket_t *socket,
        );
        this->job = callback_job_create((callback_job_cb_t)dispatch,
                                                                        this, NULL, NULL);
-       charon->processor->queue_job(charon->processor, (job_t*)this->job);
+       hydra->processor->queue_job(hydra->processor, (job_t*)this->job);
 
        return &this->public;
 }
index c8c20859bd6ac082cff06e7c47e8823c671e05a1..8d6fff439583193feaa5acd22877c89bcc9b3f72 100644 (file)
@@ -17,6 +17,7 @@
 
 #include <pthread.h>
 
+#include <hydra.h>
 #include <threading/mutex.h>
 #include <threading/condvar.h>
 #include <utils/linked_list.h>
@@ -283,7 +284,7 @@ static void start_watchdog(private_ha_segments_t *this)
 {
        this->job = callback_job_create((callback_job_cb_t)watchdog,
                                                                        this, NULL, NULL);
-       charon->processor->queue_job(charon->processor, (job_t*)this->job);
+       hydra->processor->queue_job(hydra->processor, (job_t*)this->job);
 }
 
 METHOD(ha_segments_t, handle_status, void,
index 21e6eb6d5f7333d75e41958e7f4e60e19e1a13b0..50c10b9ef1cf28a3104af4233b4daaa2bf3d4386 100644 (file)
@@ -22,6 +22,7 @@
 #include <unistd.h>
 #include <pthread.h>
 
+#include <hydra.h>
 #include <daemon.h>
 #include <utils/host.h>
 #include <processing/jobs/callback_job.h>
@@ -107,7 +108,7 @@ METHOD(ha_socket_t, push, void,
 
                        job = callback_job_create((callback_job_cb_t)send_message,
                                                                          data, (void*)job_data_destroy, NULL);
-                       charon->processor->queue_job(charon->processor, (job_t*)job);
+                       hydra->processor->queue_job(hydra->processor, (job_t*)job);
                        return;
                }
                DBG1(DBG_CFG, "pushing HA message failed: %s", strerror(errno));
index f8a5d5bcbae246ace85d1c402389d39dd4a16a83..81e46dad374d5ca81501c58b710b6da4902cc519 100644 (file)
@@ -28,6 +28,7 @@
 
 #include "kernel_klips_ipsec.h"
 
+#include <hydra.h>
 #include <daemon.h>
 #include <threading/thread.h>
 #include <threading/mutex.h>
@@ -1300,7 +1301,7 @@ static void process_acquire(private_kernel_klips_ipsec_t *this, struct sadb_msg*
        DBG2(DBG_KNL, "received an SADB_ACQUIRE");
        DBG1(DBG_KNL, "creating acquire job for CHILD_SA with reqid {%d}", reqid);
        job = (job_t*)acquire_job_create(reqid, NULL, NULL);
-       charon->processor->queue_job(charon->processor, job);
+       hydra->processor->queue_job(hydra->processor, job);
 }
 
 /**
@@ -1363,7 +1364,7 @@ static void process_mapping(private_kernel_klips_ipsec_t *this, struct sadb_msg*
                        DBG1(DBG_KNL, "NAT mappings of ESP CHILD_SA with SPI %.8x and"
                                " reqid {%d} changed, queuing update job", ntohl(spi), reqid);
                        job = (job_t*)update_sa_job_create(reqid, new_src);
-                       charon->processor->queue_job(charon->processor, job);
+                       hydra->processor->queue_job(hydra->processor, job);
                }
        }
 }
@@ -1510,7 +1511,7 @@ static job_requeue_t sa_expires(sa_expire_t *expire)
        {
                job = (job_t*)rekey_child_sa_job_create(reqid, protocol, spi);
        }
-       charon->processor->queue_job(charon->processor, job);
+       hydra->processor->queue_job(hydra->processor, job);
        return JOB_REQUEUE_NONE;
 }
 
@@ -2655,7 +2656,7 @@ kernel_klips_ipsec_t *kernel_klips_ipsec_create()
 
        this->job = callback_job_create((callback_job_cb_t)receive_events,
                                                                        this, NULL, NULL);
-       charon->processor->queue_job(charon->processor, (job_t*)this->job);
+       hydra->processor->queue_job(hydra->processor, (job_t*)this->job);
 
        return &this->public;
 }
index dcd6871c18cdf215723b0a787703e015483ebd02..9ba539175151b2b5d8b7c2660b3fb504b7f630a4 100644 (file)
@@ -35,6 +35,7 @@
 #include "kernel_netlink_ipsec.h"
 #include "kernel_netlink_shared.h"
 
+#include <hydra.h>
 #include <daemon.h>
 #include <threading/thread.h>
 #include <threading/mutex.h>
@@ -296,7 +297,7 @@ struct policy_entry_t {
 static u_int policy_hash(policy_entry_t *key)
 {
        chunk_t chunk = chunk_create((void*)&key->sel,
-                                                       sizeof(struct xfrm_selector) + sizeof(u_int32_t));
+                                                       sizeof(struct xfrm_selector) + sizeof(u_int32_t));
        return chunk_hash(chunk);
 }
 
@@ -593,7 +594,7 @@ static void process_acquire(private_kernel_netlink_ipsec_t *this, struct nlmsghd
        DBG1(DBG_KNL, "creating acquire job for policy %R === %R with reqid {%u}",
                                        src_ts, dst_ts, reqid);
        job = (job_t*)acquire_job_create(reqid, src_ts, dst_ts);
-       charon->processor->queue_job(charon->processor, job);
+       hydra->processor->queue_job(hydra->processor, job);
 }
 
 /**
@@ -631,7 +632,7 @@ static void process_expire(private_kernel_netlink_ipsec_t *this, struct nlmsghdr
        {
                job = (job_t*)rekey_child_sa_job_create(reqid, protocol, spi);
        }
-       charon->processor->queue_job(charon->processor, job);
+       hydra->processor->queue_job(hydra->processor, job);
 }
 
 /**
@@ -703,7 +704,7 @@ static void process_migrate(private_kernel_netlink_ipsec_t *this, struct nlmsghd
                                           src_ts, dst_ts, policy_dir_names, dir, reqid, local);
                job = (job_t*)migrate_job_create(reqid, src_ts, dst_ts, dir,
                                                                                 local, remote);
-               charon->processor->queue_job(charon->processor, job);
+               hydra->processor->queue_job(hydra->processor, job);
        }
        else
        {
@@ -740,7 +741,7 @@ static void process_mapping(private_kernel_netlink_ipsec_t *this,
                        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, host);
-                       charon->processor->queue_job(charon->processor, job);
+                       hydra->processor->queue_job(hydra->processor, job);
                }
        }
 }
@@ -1705,7 +1706,7 @@ METHOD(kernel_ipsec_t, add_policy, status_t,
                        DBG2(DBG_KNL, "policy %R === %R %N  (mark %u/0x%8x) "
                                                  "already exists, increasing refcount",
                                                   src_ts, dst_ts, policy_dir_names, direction,
-                                                  mark.value, mark.mask);
+                                                  mark.value, mark.mask);
                }
                else
                {
@@ -2260,7 +2261,7 @@ kernel_netlink_ipsec_t *kernel_netlink_ipsec_create()
        }
        this->job = callback_job_create((callback_job_cb_t)receive_events,
                                                                        this, NULL, NULL);
-       charon->processor->queue_job(charon->processor, (job_t*)this->job);
+       hydra->processor->queue_job(hydra->processor, (job_t*)this->job);
 
        return &this->public;
 }
index 6750458cfd110173d188afbea02e5aa8664f9236..5240d3d228657ad0ce5590924c9661876829b3a2 100644 (file)
@@ -47,6 +47,7 @@
 #include "kernel_netlink_net.h"
 #include "kernel_netlink_shared.h"
 
+#include <hydra.h>
 #include <daemon.h>
 #include <threading/thread.h>
 #include <threading/condvar.h>
@@ -1479,7 +1480,7 @@ kernel_netlink_net_t *kernel_netlink_net_create()
 
        this->job = callback_job_create((callback_job_cb_t)receive_events,
                                                                        this, NULL, NULL);
-       charon->processor->queue_job(charon->processor, (job_t*)this->job);
+       hydra->processor->queue_job(hydra->processor, (job_t*)this->job);
 
        if (init_address_list(this) != SUCCESS)
        {
index b01f627fa6a63cd81053a1c876863beea76e67f3..6773dcf87577299c1868d26938f16e4ba826983b 100644 (file)
@@ -54,6 +54,7 @@
 
 #include "kernel_pfkey_ipsec.h"
 
+#include <hydra.h>
 #include <daemon.h>
 #include <utils/host.h>
 #include <threading/thread.h>
@@ -940,7 +941,7 @@ static void process_acquire(private_kernel_pfkey_ipsec_t *this, struct sadb_msg*
        DBG1(DBG_KNL, "creating acquire job for policy %R === %R with reqid {%u}",
                                   src_ts, dst_ts, reqid);
        job = (job_t*)acquire_job_create(reqid, src_ts, dst_ts);
-       charon->processor->queue_job(charon->processor, job);
+       hydra->processor->queue_job(hydra->processor, job);
 }
 
 /**
@@ -985,7 +986,7 @@ static void process_expire(private_kernel_pfkey_ipsec_t *this, struct sadb_msg*
        {
                job = (job_t*)rekey_child_sa_job_create(reqid, protocol, spi);
        }
-       charon->processor->queue_job(charon->processor, job);
+       hydra->processor->queue_job(hydra->processor, job);
 }
 
 #ifdef SADB_X_MIGRATE
@@ -1035,7 +1036,7 @@ static void process_migrate(private_kernel_pfkey_ipsec_t *this, struct sadb_msg*
                                           src_ts, dst_ts, policy_dir_names, dir, reqid, local);
                job = (job_t*)migrate_job_create(reqid, src_ts, dst_ts, dir,
                                                                                 local, remote);
-               charon->processor->queue_job(charon->processor, job);
+               hydra->processor->queue_job(hydra->processor, job);
        }
        else
        {
@@ -1099,7 +1100,7 @@ static void process_mapping(private_kernel_pfkey_ipsec_t *this, struct sadb_msg*
                        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, host);
-                       charon->processor->queue_job(charon->processor, job);
+                       hydra->processor->queue_job(hydra->processor, job);
                }
        }
 }
@@ -2205,7 +2206,7 @@ kernel_pfkey_ipsec_t *kernel_pfkey_ipsec_create()
 
        this->job = callback_job_create((callback_job_cb_t)receive_events,
                                                                        this, NULL, NULL);
-       charon->processor->queue_job(charon->processor, (job_t*)this->job);
+       hydra->processor->queue_job(hydra->processor, (job_t*)this->job);
 
        return &this->public;
 }
index 97c019b58abedafcbfb08935ceb7ff822bc343d3..6c06b6292d1b0492ce311bc1d284831122a1cd8a 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "kernel_pfroute_net.h"
 
+#include <hydra.h>
 #include <daemon.h>
 #include <utils/host.h>
 #include <threading/thread.h>
@@ -716,7 +717,7 @@ kernel_pfroute_net_t *kernel_pfroute_net_create()
 
        this->job = callback_job_create((callback_job_cb_t)receive_events,
                                                                        this, NULL, NULL);
-       charon->processor->queue_job(charon->processor, (job_t*)this->job);
+       hydra->processor->queue_job(hydra->processor, (job_t*)this->job);
 
        if (init_address_list(this) != SUCCESS)
        {
index 96b0cf1ec575763af5b9be2abc8aaab8c4612393..19a38d90e99e4d5606d9c3a7323b7cd1b0c3c903 100644 (file)
@@ -17,6 +17,7 @@
 
 #include <signal.h>
 
+#include <hydra.h>
 #include <daemon.h>
 #include <processing/jobs/delete_ike_sa_job.h>
 
@@ -59,7 +60,7 @@ static bool ike_state_change(private_load_tester_listener_t *this,
 
                if (this->delete_after_established)
                {
-                       charon->processor->queue_job(charon->processor,
+                       hydra->processor->queue_job(hydra->processor,
                                                                        (job_t*)delete_ike_sa_job_create(id, TRUE));
                }
 
index 15dbccb008582f0ab61bf4f5cb2f664f1f40776a..c9384d55861eebbe50d86f2f9919355f806c6aad 100644 (file)
@@ -22,6 +22,7 @@
 
 #include <unistd.h>
 
+#include <hydra.h>
 #include <daemon.h>
 #include <processing/jobs/callback_job.h>
 #include <threading/condvar.h>
@@ -221,7 +222,7 @@ plugin_t *load_tester_plugin_create()
        this->running = 0;
        for (i = 0; i < this->initiators; i++)
        {
-               charon->processor->queue_job(charon->processor,
+               hydra->processor->queue_job(hydra->processor,
                                        (job_t*)callback_job_create((callback_job_cb_t)do_load_test,
                                                                                                this, NULL, NULL));
        }
index 6cbaf36f23fd1571d1918c5255c3fdde1fb52159..aafe33af2e8fd0ac7749259f97a9ca1db55b4138 100644 (file)
@@ -18,6 +18,7 @@
 
 #include "medcli_config.h"
 
+#include <hydra.h>
 #include <daemon.h>
 #include <processing/jobs/callback_job.h>
 
@@ -126,11 +127,11 @@ static peer_cfg_t *get_peer_cfg_by_name(private_medcli_config_t *this, char *nam
        med_cfg = peer_cfg_create(
                "mediation", 2, ike_cfg,
                CERT_NEVER_SEND, UNIQUE_REPLACE,
-               1, this->rekey*60, 0,                   /* keytries, rekey, reauth */
-               this->rekey*5, this->rekey*3,   /* jitter, overtime */
-               TRUE, this->dpd,                                /* mobike, dpddelay */
-               NULL, NULL,                                     /* vip, pool */
-               TRUE, NULL, NULL);                              /* mediation, med by, peer id */
+               1, this->rekey*60, 0,                   /* keytries, rekey, reauth */
+               this->rekey*5, this->rekey*3,   /* jitter, overtime */
+               TRUE, this->dpd,                                /* mobike, dpddelay */
+               NULL, NULL,                                             /* vip, pool */
+               TRUE, NULL, NULL);                              /* mediation, med by, peer id */
        e->destroy(e);
 
        auth = auth_cfg_create();
@@ -163,10 +164,10 @@ static peer_cfg_t *get_peer_cfg_by_name(private_medcli_config_t *this, char *nam
        peer_cfg = peer_cfg_create(
                name, 2, this->ike->get_ref(this->ike),
                CERT_NEVER_SEND, UNIQUE_REPLACE,
-               1, this->rekey*60, 0,                   /* keytries, rekey, reauth */
-               this->rekey*5, this->rekey*3,   /* jitter, overtime */
-               TRUE, this->dpd,                                /* mobike, dpddelay */
-               NULL, NULL,                                     /* vip, pool */
+               1, this->rekey*60, 0,                   /* keytries, rekey, reauth */
+               this->rekey*5, this->rekey*3,   /* jitter, overtime */
+               TRUE, this->dpd,                                /* mobike, dpddelay */
+               NULL, NULL,                                             /* vip, pool */
                FALSE, med_cfg,                                 /* mediation, med by */
                identification_create_from_encoding(ID_KEY_ID, other));
 
@@ -243,11 +244,11 @@ static bool peer_enumerator_enumerate(peer_enumerator_t *this, peer_cfg_t **cfg)
        this->current = peer_cfg_create(
                                name, 2, this->ike->get_ref(this->ike),
                                CERT_NEVER_SEND, UNIQUE_REPLACE,
-                               1, this->rekey*60, 0,                   /* keytries, rekey, reauth */
-                               this->rekey*5, this->rekey*3,   /* jitter, overtime */
-                               TRUE, this->dpd,                                /* mobike, dpddelay */
-                               NULL, NULL,                                     /* vip, pool */
-                               FALSE, NULL, NULL);                     /* mediation, med by, peer id */
+                               1, this->rekey*60, 0,                   /* keytries, rekey, reauth */
+                               this->rekey*5, this->rekey*3,   /* jitter, overtime */
+                               TRUE, this->dpd,                                /* mobike, dpddelay */
+                               NULL, NULL,                                             /* vip, pool */
+                               FALSE, NULL, NULL);                             /* mediation, med by, peer id */
 
        auth = auth_cfg_create();
        auth->add(auth, AUTH_RULE_AUTH_CLASS, AUTH_CLASS_PUBKEY);
@@ -364,7 +365,7 @@ static void schedule_autoinit(private_medcli_config_t *this)
                        if (peer_cfg)
                        {
                                /* schedule asynchronous initiation job */
-                               charon->processor->queue_job(charon->processor,
+                               hydra->processor->queue_job(hydra->processor,
                                                (job_t*)callback_job_create(
                                                                        (callback_job_cb_t)initiate_config,
                                                                        peer_cfg, (void*)peer_cfg->destroy, NULL));
index 250e6f7f9f424f05030aa2061104e03aad79d3dc..e1da7822bf620583788139fc85c5e7eeb8948bc7 100644 (file)
@@ -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);
 
-       charon->processor->queue_job(charon->processor,
+       hydra->processor->queue_job(hydra->processor,
                 (job_t*)callback_job_create((callback_job_cb_t)run, this, NULL, NULL));
 
        return &this->public.plugin;
index 64820eb459ec7db49f83efef3c532b11bf7fad54..c891c3262606036ae52ac14949e7883efba7b5ec 100644 (file)
@@ -28,6 +28,7 @@
 #include <libxml/xmlwriter.h>
 
 #include <library.h>
+#include <hydra.h>
 #include <daemon.h>
 #include <threading/thread.h>
 #include <processing/jobs/callback_job.h>
@@ -702,7 +703,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);
-       charon->processor->queue_job(charon->processor, (job_t*)job);
+       hydra->processor->queue_job(hydra->processor, (job_t*)job);
 
        return JOB_REQUEUE_DIRECT;
 }
@@ -761,7 +762,7 @@ plugin_t *smp_plugin_create()
        }
 
        this->job = callback_job_create((callback_job_cb_t)dispatch, this, NULL, NULL);
-       charon->processor->queue_job(charon->processor, (job_t*)this->job);
+       hydra->processor->queue_job(hydra->processor, (job_t*)this->job);
 
        return &this->public.plugin;
 }
index f64421551cccbc718c038bd3584db6f0e26a5293..f009d077f0f7c61ebc182015e5d952f14e69bb0c 100644 (file)
@@ -15,6 +15,7 @@
 
 #include "stroke_control.h"
 
+#include <hydra.h>
 #include <daemon.h>
 #include <processing/jobs/delete_ike_sa_job.h>
 
@@ -354,7 +355,7 @@ static void terminate_srcip(private_stroke_control_t *this,
                }
 
                /* schedule delete asynchronously */
-               charon->processor->queue_job(charon->processor, (job_t*)
+               hydra->processor->queue_job(hydra->processor, (job_t*)
                                                delete_ike_sa_job_create(ike_sa->get_id(ike_sa), TRUE));
        }
        enumerator->destroy(enumerator);
index bd891811d43235f831197c2a123088820da9fb76..9106a4fe588a6ad9eb54802a00f6c5b0ca35e9ac 100644 (file)
@@ -21,6 +21,7 @@
 #include <malloc.h>
 #endif /* HAVE_MALLINFO */
 
+#include <hydra.h>
 #include <daemon.h>
 #include <utils/linked_list.h>
 #include <credentials/certificates/x509.h>
@@ -422,10 +423,10 @@ 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,",
-                               charon->processor->get_idle_threads(charon->processor),
-                               charon->processor->get_total_threads(charon->processor));
+                               hydra->processor->get_idle_threads(hydra->processor),
+                               hydra->processor->get_total_threads(hydra->processor));
                fprintf(out, " job queue load: %d,",
-                               charon->processor->get_job_load(charon->processor));
+                               hydra->processor->get_job_load(hydra->processor));
                fprintf(out, " scheduled events: %d\n",
                                charon->scheduler->get_job_load(charon->scheduler));
                fprintf(out, "  loaded plugins: ");
index 06a636a7dc1580e61955880d7011149641c77f80..891128f7334d48c65aa121166cf0cdd3ada4fe3c 100644 (file)
 #include <unistd.h>
 #include <errno.h>
 
-#include <processing/jobs/callback_job.h>
 #include <hydra.h>
 #include <daemon.h>
 #include <threading/thread.h>
+#include <processing/jobs/callback_job.h>
 
 #include "stroke_config.h"
 #include "stroke_control.h"
@@ -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);
-       charon->processor->queue_job(charon->processor, (job_t*)job);
+       hydra->processor->queue_job(hydra->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);
-       charon->processor->queue_job(charon->processor, (job_t*)this->job);
+       hydra->processor->queue_job(hydra->processor, (job_t*)this->job);
 
        return &this->public;
 }
index 3c4928be45d61d5ca59f7f015e95eb405f05658a..0736ed5fde4b51a4bcdf1e301a195a2e3156d866 100644 (file)
@@ -24,6 +24,7 @@
 
 #include "uci_control.h"
 
+#include <hydra.h>
 #include <daemon.h>
 #include <threading/thread.h>
 #include <processing/jobs/callback_job.h>
@@ -294,7 +295,7 @@ uci_control_t *uci_control_create()
        {
                this->job = callback_job_create((callback_job_cb_t)receive,
                                                                                this, NULL, NULL);
-               charon->processor->queue_job(charon->processor, (job_t*)this->job);
+               hydra->processor->queue_job(hydra->processor, (job_t*)this->job);
        }
        return &this->public;
 }
index 45e49112e108e5c49d16454d754aaa0c5a279bb1..4c9a7fdac383a085ef7caf68fe85f7f760c5d362 100644 (file)
 
 #include <semaphore.h>
 
-#include <daemon.h>
+#include <hydra.h>
 #include <threading/thread.h>
 #include <threading/condvar.h>
 #include <threading/mutex.h>
+#include <utils/linked_list.h>
 
 typedef struct private_callback_job_t private_callback_job_t;
 
@@ -226,7 +227,7 @@ static void execute(private_callback_job_t *this)
        thread_cancellation_point();
        if (requeue)
        {
-               charon->processor->queue_job(charon->processor,
+               hydra->processor->queue_job(hydra->processor,
                                                                         &this->public.job_interface);
        }
        thread_cleanup_pop(cleanup);
index 345af502a8bc4b8d88a82658fb43555088fb8b80..85796ba184f05dc577ea7f444572372de31837d8 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "scheduler.h"
 
+#include <hydra.h>
 #include <daemon.h>
 #include <processing/processor.h>
 #include <processing/jobs/callback_job.h>
@@ -199,7 +200,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");
-                       charon->processor->queue_job(charon->processor, event->job);
+                       hydra->processor->queue_job(hydra->processor, event->job);
                        free(event);
                        return JOB_REQUEUE_DIRECT;
                }
@@ -351,7 +352,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);
-       charon->processor->queue_job(charon->processor, (job_t*)this->job);
+       hydra->processor->queue_job(hydra->processor, (job_t*)this->job);
 
        return &this->public;
 }
index 8e8e19ba78e436bf87d0310c42cd945c16c20cae..fa877150ba70dd987e84e1268d61923488f14e3d 100644 (file)
@@ -17,6 +17,7 @@
 
 #include <math.h>
 
+#include <hydra.h>
 #include <daemon.h>
 #include <threading/mutex.h>
 #include <utils/linked_list.h>
@@ -1222,7 +1223,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);
-                       charon->processor->queue_job(charon->processor, job);
+                       hydra->processor->queue_job(hydra->processor, job);
                        return;
                }
                else
@@ -1477,7 +1478,7 @@ static void check_and_initiate(private_connect_manager_t *this,
        {
                job_t *job = (job_t*)reinitiate_mediation_job_create(mediation_sa,
                                                                                                                         waiting_sa);
-               charon->processor->queue_job(charon->processor, job);
+               hydra->processor->queue_job(hydra->processor, job);
        }
        iterator->destroy(iterator);
 
index b1638374d7798e84cea837c0d7ef0ed8eba4ffbf..a7b6cce5f5b719d97a33c157af84de081d7818ca 100644 (file)
@@ -24,8 +24,8 @@
 #include "ike_sa.h"
 
 #include <library.h>
-#include <daemon.h>
 #include <hydra.h>
+#include <daemon.h>
 #include <utils/linked_list.h>
 #include <utils/lexparser.h>
 #include <sa/task_manager.h>
@@ -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);
-                       charon->processor->queue_job(charon->processor, job);
+                       hydra->processor->queue_job(hydra->processor, job);
                        return SUCCESS;
                }
 #endif /* ME */
@@ -1709,7 +1709,7 @@ METHOD(ike_sa_t, set_auth_lifetime, void,
        {
                DBG1(DBG_IKE, "received AUTH_LIFETIME of %ds, starting reauthentication",
                         lifetime);
-               charon->processor->queue_job(charon->processor,
+               hydra->processor->queue_job(hydra->processor,
                                        (job_t*)rekey_ike_sa_job_create(this->ike_sa_id, TRUE));
        }
        else if (this->stats[STAT_REAUTH] == 0 ||
index 035f49053b73e0ea986022b0dbdaf499bd5f7ae1..0efbdc2e935c46a5a87385dc21c85e8c9c8630b6 100644 (file)
@@ -15,6 +15,7 @@
 
 #include "mediation_manager.h"
 
+#include <hydra.h>
 #include <daemon.h>
 #include <threading/mutex.h>
 #include <utils/linked_list.h>
@@ -241,7 +242,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);
-               charon->processor->queue_job(charon->processor, job);
+               hydra->processor->queue_job(hydra->processor, job);
                requester->destroy(requester);
        }
 
index c87a3ef5207de6190553ea918d6552f89c21b7c8..b53bfd4708e925edfc880be19df5d7a7af259b1c 100644 (file)
@@ -16,6 +16,7 @@
 
 #include "child_rekey.h"
 
+#include <hydra.h>
 #include <daemon.h>
 #include <encoding/payloads/notify_payload.h>
 #include <sa/tasks/child_create.h>
@@ -299,7 +300,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);
-               charon->processor->queue_job(charon->processor,
+               hydra->processor->queue_job(hydra->processor,
                                (job_t*)rekey_ike_sa_job_create(
                                                        this->ike_sa->get_id(this->ike_sa), TRUE));
                return SUCCESS;
index a04bf56ecc770c29c0ee646783e9ab6b01ab2f05..1b3771696ddc287eb3e1c6400a924b2f08e9b550 100644 (file)
@@ -17,6 +17,7 @@
 
 #include <string.h>
 
+#include <hydra.h>
 #include <daemon.h>
 #include <config/peer_cfg.h>
 #include <encoding/payloads/id_payload.h>
@@ -692,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);
-                       charon->processor->queue_job(charon->processor, job);
+                       hydra->processor->queue_job(hydra->processor, job);
                        break;
                }
                default:
index ea7782b63ee02976f4056506d40cd1adda14c168..a066adc3284c42e73e96c82d55db7d38dde1b318 100644 (file)
@@ -16,6 +16,7 @@
 
 #include "ike_rekey.h"
 
+#include <hydra.h>
 #include <daemon.h>
 #include <encoding/payloads/notify_payload.h>
 #include <sa/tasks/ike_init.h>
@@ -196,7 +197,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);
-               charon->processor->queue_job(charon->processor,
+               hydra->processor->queue_job(hydra->processor,
                                (job_t*)rekey_ike_sa_job_create(
                                                        this->ike_sa->get_id(this->ike_sa), TRUE));
                return SUCCESS;
index 731c9e296cae51c98800b18927652bfd88989f89..2a44f61e81192ee95da9c493b1efcb73fa6814cc 100644 (file)
@@ -20,6 +20,7 @@
 
 #include "processor.h"
 
+#include <debug.h>
 #include <threading/thread.h>
 #include <threading/condvar.h>
 #include <threading/mutex.h>