]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
Added a generic TASK_ prefix to all task types
authorMartin Willi <martin@revosec.ch>
Mon, 21 Nov 2011 11:18:24 +0000 (12:18 +0100)
committerMartin Willi <martin@revosec.ch>
Tue, 20 Mar 2012 16:30:45 +0000 (17:30 +0100)
31 files changed:
src/libcharon/sa/ike_sa.c
src/libcharon/sa/task_manager_v1.c
src/libcharon/sa/task_manager_v2.c
src/libcharon/sa/tasks/child_create.c
src/libcharon/sa/tasks/child_create.h
src/libcharon/sa/tasks/child_delete.c
src/libcharon/sa/tasks/child_rekey.c
src/libcharon/sa/tasks/child_rekey.h
src/libcharon/sa/tasks/ike_auth.c
src/libcharon/sa/tasks/ike_auth.h
src/libcharon/sa/tasks/ike_auth_lifetime.c
src/libcharon/sa/tasks/ike_auth_lifetime.h
src/libcharon/sa/tasks/ike_cert_post.c
src/libcharon/sa/tasks/ike_cert_pre.c
src/libcharon/sa/tasks/ike_config.c
src/libcharon/sa/tasks/ike_config.h
src/libcharon/sa/tasks/ike_delete.c
src/libcharon/sa/tasks/ike_dpd.c
src/libcharon/sa/tasks/ike_init.c
src/libcharon/sa/tasks/ike_init.h
src/libcharon/sa/tasks/ike_me.c
src/libcharon/sa/tasks/ike_me.h
src/libcharon/sa/tasks/ike_mobike.c
src/libcharon/sa/tasks/ike_natd.c
src/libcharon/sa/tasks/ike_reauth.c
src/libcharon/sa/tasks/ike_rekey.c
src/libcharon/sa/tasks/ike_rekey.h
src/libcharon/sa/tasks/ike_vendor.c
src/libcharon/sa/tasks/main_mode.c
src/libcharon/sa/tasks/task.c
src/libcharon/sa/tasks/task.h

index 11901884b9d80f99b4946f57e1d8c6daebc4cc34..1f879989006ae0bd04bc93d46f6a1f6cba124249 100644 (file)
@@ -1715,7 +1715,7 @@ static void requeue_init_tasks(private_ike_sa_t *this)
                                                                                this->task_manager, TASK_QUEUE_QUEUED);
        while (enumerator->enumerate(enumerator, &task))
        {
-               if (task->get_type(task) == IKE_INIT)
+               if (task->get_type(task) == TASK_IKE_INIT)
                {
                        has_init = TRUE;
                        break;
index 6cc2d7592d8a64ed4a7d08497201f6fa7d5fd507..c96adaa39f5a64ab98a88dc0684f6d31c952f90b 100644 (file)
@@ -210,7 +210,7 @@ METHOD(task_manager_t, initiate, status_t,
                switch (this->ike_sa->get_state(this->ike_sa))
                {
                        case IKE_CREATED:
-                               if (activate_task(this, MAIN_MODE))
+                               if (activate_task(this, TASK_MAIN_MODE))
                                {
                                        exchange = ID_PROT;
                                }
@@ -234,7 +234,7 @@ METHOD(task_manager_t, initiate, status_t,
                        DBG2(DBG_IKE, "  %N task", task_type_names, task->get_type(task));
                        switch (task->get_type(task))
                        {
-                               case MAIN_MODE:
+                               case TASK_MAIN_MODE:
                                        exchange = ID_PROT;
                                        break;
                                case TASK_QUICK_MODE:
index 158c04b5ba2aacb21b746b1bc6b01108fa86f045..6148a814cb58f3e5d737cfab23e405faef2997c8 100644 (file)
@@ -211,7 +211,7 @@ METHOD(task_manager_t, retransmit, status_t,
                enumerator = this->active_tasks->create_enumerator(this->active_tasks);
                while (enumerator->enumerate(enumerator, (void*)&task))
                {
-                       if (task->get_type(task) == IKE_MOBIKE)
+                       if (task->get_type(task) == TASK_IKE_MOBIKE)
                        {
                                mobike = (ike_mobike_t*)task;
                                if (!mobike->is_probing(mobike))
@@ -303,78 +303,78 @@ METHOD(task_manager_t, initiate, status_t,
                switch (this->ike_sa->get_state(this->ike_sa))
                {
                        case IKE_CREATED:
-                               activate_task(this, IKE_VENDOR);
-                               if (activate_task(this, IKE_INIT))
+                               activate_task(this, TASK_IKE_VENDOR);
+                               if (activate_task(this, TASK_IKE_INIT))
                                {
                                        this->initiating.mid = 0;
                                        exchange = IKE_SA_INIT;
-                                       activate_task(this, IKE_NATD);
-                                       activate_task(this, IKE_CERT_PRE);
+                                       activate_task(this, TASK_IKE_NATD);
+                                       activate_task(this, TASK_IKE_CERT_PRE);
 #ifdef ME
-                                       /* this task has to be activated before the IKE_AUTHENTICATE
+                                       /* this task has to be activated before the TASK_IKE_AUTH
                                         * task, because that task pregenerates the packet after
                                         * which no payloads can be added to the message anymore.
                                         */
-                                       activate_task(this, IKE_ME);
+                                       activate_task(this, TASK_IKE_ME);
 #endif /* ME */
-                                       activate_task(this, IKE_AUTHENTICATE);
-                                       activate_task(this, IKE_CERT_POST);
-                                       activate_task(this, IKE_CONFIG);
-                                       activate_task(this, CHILD_CREATE);
-                                       activate_task(this, IKE_AUTH_LIFETIME);
-                                       activate_task(this, IKE_MOBIKE);
+                                       activate_task(this, TASK_IKE_AUTH);
+                                       activate_task(this, TASK_IKE_CERT_POST);
+                                       activate_task(this, TASK_IKE_CONFIG);
+                                       activate_task(this, TASK_CHILD_CREATE);
+                                       activate_task(this, TASK_IKE_AUTH_LIFETIME);
+                                       activate_task(this, TASK_IKE_MOBIKE);
                                }
                                break;
                        case IKE_ESTABLISHED:
-                               if (activate_task(this, CHILD_CREATE))
+                               if (activate_task(this, TASK_CHILD_CREATE))
                                {
                                        exchange = CREATE_CHILD_SA;
                                        break;
                                }
-                               if (activate_task(this, CHILD_DELETE))
+                               if (activate_task(this, TASK_CHILD_DELETE))
                                {
                                        exchange = INFORMATIONAL;
                                        break;
                                }
-                               if (activate_task(this, CHILD_REKEY))
+                               if (activate_task(this, TASK_CHILD_REKEY))
                                {
                                        exchange = CREATE_CHILD_SA;
                                        break;
                                }
-                               if (activate_task(this, IKE_DELETE))
+                               if (activate_task(this, TASK_IKE_DELETE))
                                {
                                        exchange = INFORMATIONAL;
                                        break;
                                }
-                               if (activate_task(this, IKE_REKEY))
+                               if (activate_task(this, TASK_IKE_REKEY))
                                {
                                        exchange = CREATE_CHILD_SA;
                                        break;
                                }
-                               if (activate_task(this, IKE_REAUTH))
+                               if (activate_task(this, TASK_IKE_REAUTH))
                                {
                                        exchange = INFORMATIONAL;
                                        break;
                                }
-                               if (activate_task(this, IKE_MOBIKE))
+                               if (activate_task(this, TASK_IKE_MOBIKE))
                                {
                                        exchange = INFORMATIONAL;
                                        break;
                                }
-                               if (activate_task(this, IKE_DPD))
+                               if (activate_task(this, TASK_IKE_DPD))
                                {
                                        exchange = INFORMATIONAL;
                                        break;
                                }
 #ifdef ME
-                               if (activate_task(this, IKE_ME))
+                               if (activate_task(this, TASK_IKE_ME))
                                {
                                        exchange = ME_CONNECT;
                                        break;
                                }
 #endif /* ME */
                        case IKE_REKEYING:
-                               if (activate_task(this, IKE_DELETE))
+                               if (activate_task(this, TASK_IKE_DELETE))
                                {
                                        exchange = INFORMATIONAL;
                                        break;
@@ -393,18 +393,18 @@ METHOD(task_manager_t, initiate, status_t,
                        DBG2(DBG_IKE, "  %N task", task_type_names, task->get_type(task));
                        switch (task->get_type(task))
                        {
-                               case IKE_INIT:
+                               case TASK_IKE_INIT:
                                        exchange = IKE_SA_INIT;
                                        break;
-                               case IKE_AUTHENTICATE:
+                               case TASK_IKE_AUTH:
                                        exchange = IKE_AUTH;
                                        break;
-                               case CHILD_CREATE:
-                               case CHILD_REKEY:
-                               case IKE_REKEY:
+                               case TASK_CHILD_CREATE:
+                               case TASK_CHILD_REKEY:
+                               case TASK_IKE_REKEY:
                                        exchange = CREATE_CHILD_SA;
                                        break;
-                               case IKE_MOBIKE:
+                               case TASK_IKE_MOBIKE:
                                        exchange = INFORMATIONAL;
                                        break;
                                default:
@@ -555,8 +555,9 @@ static bool handle_collisions(private_task_manager_t *this, task_t *task)
        type = task->get_type(task);
 
        /* do we have to check  */
-       if (type == IKE_REKEY || type == CHILD_REKEY ||
-               type == CHILD_DELETE || type == IKE_DELETE || type == IKE_REAUTH)
+       if (type == TASK_IKE_REKEY || type == TASK_CHILD_REKEY ||
+               type == TASK_CHILD_DELETE || type == TASK_IKE_DELETE ||
+               type == TASK_IKE_REAUTH)
        {
                /* find an exchange collision, and notify these tasks */
                enumerator = this->active_tasks->create_enumerator(this->active_tasks);
@@ -564,17 +565,17 @@ static bool handle_collisions(private_task_manager_t *this, task_t *task)
                {
                        switch (active->get_type(active))
                        {
-                               case IKE_REKEY:
-                                       if (type == IKE_REKEY || type == IKE_DELETE ||
-                                               type == IKE_REAUTH)
+                               case TASK_IKE_REKEY:
+                                       if (type == TASK_IKE_REKEY || type == TASK_IKE_DELETE ||
+                                               type == TASK_IKE_REAUTH)
                                        {
                                                ike_rekey_t *rekey = (ike_rekey_t*)active;
                                                rekey->collide(rekey, task);
                                                break;
                                        }
                                        continue;
-                               case CHILD_REKEY:
-                                       if (type == CHILD_REKEY || type == CHILD_DELETE)
+                               case TASK_CHILD_REKEY:
+                                       if (type == TASK_CHILD_REKEY || type == TASK_CHILD_DELETE)
                                        {
                                                child_rekey_t *rekey = (child_rekey_t*)active;
                                                rekey->collide(rekey, task);
@@ -977,7 +978,7 @@ METHOD(task_manager_t, process_message, status_t,
 METHOD(task_manager_t, queue_task, void,
        private_task_manager_t *this, task_t *task)
 {
-       if (task->get_type(task) == IKE_MOBIKE)
+       if (task->get_type(task) == TASK_IKE_MOBIKE)
        {       /*  there is no need to queue more than one mobike task */
                enumerator_t *enumerator;
                task_t *current;
@@ -985,7 +986,7 @@ METHOD(task_manager_t, queue_task, void,
                enumerator = this->queued_tasks->create_enumerator(this->queued_tasks);
                while (enumerator->enumerate(enumerator, (void**)&current))
                {
-                       if (current->get_type(current) == IKE_MOBIKE)
+                       if (current->get_type(current) == TASK_IKE_MOBIKE)
                        {
                                enumerator->destroy(enumerator);
                                task->destroy(task);
index 46382a2a09a8e2caa70709f9f00ff8c8511a980f..7a89e6f627772e7bd2a3f76d9720a072beb9105c 100644 (file)
@@ -1212,7 +1212,7 @@ METHOD(child_create_t, get_lower_nonce, chunk_t,
 METHOD(task_t, get_type, task_type_t,
        private_child_create_t *this)
 {
-       return CHILD_CREATE;
+       return TASK_CHILD_CREATE;
 }
 
 METHOD(task_t, migrate, void,
index 5dedeb8b1f41478c01e74459980ba233f29c71bf..fdec3bbb9f9d2f14f5ea04535868c51791ff58b9 100644 (file)
@@ -29,7 +29,7 @@ typedef struct child_create_t child_create_t;
 #include <config/child_cfg.h>
 
 /**
- * Task of type CHILD_CREATE, established a new CHILD_SA.
+ * Task of type TASK_CHILD_CREATE, established a new CHILD_SA.
  *
  * This task may be included in the IKE_AUTH message or in a separate
  * CREATE_CHILD_SA exchange.
index e730746759b6fac48dcecfb69d5f84c0d906ed41..c5151abf1234d97e383c86b0125c944e7008080d 100644 (file)
@@ -324,7 +324,7 @@ METHOD(task_t, build_r, status_t,
 METHOD(task_t, get_type, task_type_t,
        private_child_delete_t *this)
 {
-       return CHILD_DELETE;
+       return TASK_CHILD_DELETE;
 }
 
 METHOD(child_delete_t , get_child, child_sa_t*,
index bcdf093b85bb191ca65819b22a7ad721cf827935..fa916c4e50f843f8fdc4551f1b03ee714c592cff 100644 (file)
@@ -224,7 +224,7 @@ static child_sa_t *handle_collision(private_child_rekey_t *this)
 {
        child_sa_t *to_delete;
 
-       if (this->collision->get_type(this->collision) == CHILD_REKEY)
+       if (this->collision->get_type(this->collision) == TASK_CHILD_REKEY)
        {
                chunk_t this_nonce, other_nonce;
                private_child_rekey_t *other = (private_child_rekey_t*)this->collision;
@@ -311,7 +311,7 @@ METHOD(task_t, process_i, status_t,
                /* establishing new child failed, reuse old. but not when we
                 * received a delete in the meantime */
                if (!(this->collision &&
-                         this->collision->get_type(this->collision) == CHILD_DELETE))
+                         this->collision->get_type(this->collision) == TASK_CHILD_DELETE))
                {
                        job_t *job;
                        u_int32_t retry = RETRY_INTERVAL - (random() % RETRY_JITTER);
@@ -362,7 +362,7 @@ METHOD(task_t, process_i, status_t,
 METHOD(task_t, get_type, task_type_t,
        private_child_rekey_t *this)
 {
-       return CHILD_REKEY;
+       return TASK_CHILD_REKEY;
 }
 
 METHOD(child_rekey_t, collide, void,
@@ -370,7 +370,7 @@ METHOD(child_rekey_t, collide, void,
 {
        /* the task manager only detects exchange collision, but not if
         * the collision is for the same child. we check it here. */
-       if (other->get_type(other) == CHILD_REKEY)
+       if (other->get_type(other) == TASK_CHILD_REKEY)
        {
                private_child_rekey_t *rekey = (private_child_rekey_t*)other;
                if (rekey->child_sa != this->child_sa)
@@ -380,7 +380,7 @@ METHOD(child_rekey_t, collide, void,
                        return;
                }
        }
-       else if (other->get_type(other) == CHILD_DELETE)
+       else if (other->get_type(other) == TASK_CHILD_DELETE)
        {
                child_delete_t *del = (child_delete_t*)other;
                if (del->get_child(del) == this->child_create->get_child(this->child_create))
@@ -403,8 +403,8 @@ METHOD(child_rekey_t, collide, void,
                other->destroy(other);
                return;
        }
-       DBG1(DBG_IKE, "detected %N collision with %N", task_type_names, CHILD_REKEY,
-                task_type_names, other->get_type(other));
+       DBG1(DBG_IKE, "detected %N collision with %N", task_type_names,
+                TASK_CHILD_REKEY, task_type_names, other->get_type(other));
        DESTROY_IF(this->collision);
        this->collision = other;
 }
index 9b1aea5fa79051ed9d6497da923facc0e0322f0e..3ba4176111b2bb682f57e9df5a47af90101190ce 100644 (file)
@@ -29,7 +29,7 @@ typedef struct child_rekey_t child_rekey_t;
 #include <sa/tasks/task.h>
 
 /**
- * Task of type CHILD_REKEY, rekey an established CHILD_SA.
+ * Task of type TASK_CHILD_REKEY, rekey an established CHILD_SA.
  */
 struct child_rekey_t {
 
@@ -51,7 +51,7 @@ struct child_rekey_t {
 };
 
 /**
- * Create a new CHILD_REKEY task.
+ * Create a new TASK_CHILD_REKEY task.
  *
  * @param ike_sa               IKE_SA this task works for
  * @param protocol             protocol of CHILD_SA to rekey, PROTO_NONE as responder
index af2c30f714ae4ea3b9b3449b3000fb2c8678773c..4a92385eea8fe3881fa3792cb222fe4a1c417363 100644 (file)
@@ -1023,7 +1023,7 @@ peer_auth_failed:
 METHOD(task_t, get_type, task_type_t,
        private_ike_auth_t *this)
 {
-       return IKE_AUTHENTICATE;
+       return TASK_IKE_AUTH;
 }
 
 METHOD(task_t, migrate, void,
index 13290794198db5fb9360f4d57fcf9bff9ffa9dd5..c6c0100b055b565f75f96134027acf3584bf2620 100644 (file)
@@ -46,7 +46,7 @@ struct ike_auth_t {
 };
 
 /**
- * Create a new task of type IKE_AUTHENTICATE.
+ * Create a new task of type TASK_IKE_AUTH.
  *
  * @param ike_sa               IKE_SA this task works for
  * @param initiator            TRUE if task is the initiator of an exchange
index a57cfd07554f41c38eb22e632aaf1b34a8a2f4fe..31e3bffca56b698bcb2bb0daa7638113d502ba58 100644 (file)
@@ -124,7 +124,7 @@ METHOD(task_t, process_i, status_t,
 METHOD(task_t, get_type, task_type_t,
        private_ike_auth_lifetime_t *this)
 {
-       return IKE_AUTH_LIFETIME;
+       return TASK_IKE_AUTH_LIFETIME;
 }
 
 METHOD(task_t, migrate, void,
index 3b129b9e3dece5a807f27c5797e568be7d30dd02..9052f42746854862dd3b0baeb8bb0ef9c80fa816 100644 (file)
@@ -28,7 +28,7 @@ typedef struct ike_auth_lifetime_t ike_auth_lifetime_t;
 #include <sa/tasks/task.h>
 
 /**
- * Task of type IKE_AUTH_LIFETIME, implements RFC4478.
+ * Task of type TASK_IKE_AUTH_LIFETIME, implements RFC4478.
  *
  * This task exchanges lifetimes for IKE_AUTH to force a client to
  * reauthenticate before the responders lifetime reaches the limit.
@@ -42,7 +42,7 @@ struct ike_auth_lifetime_t {
 };
 
 /**
- * Create a new IKE_AUTH_LIFETIME task.
+ * Create a new TASK_IKE_AUTH_LIFETIME task.
  *
  * @param ike_sa               IKE_SA this task works for
  * @param initiator            TRUE if taks is initiated by us
@@ -50,4 +50,4 @@ struct ike_auth_lifetime_t {
  */
 ike_auth_lifetime_t *ike_auth_lifetime_create(ike_sa_t *ike_sa, bool initiator);
 
-#endif /** IKE_MOBIKE_H_ @}*/
+#endif /** IKE_AUTH_LIFETIME_H_ @}*/
index 94af50eae0c1f0fa76669e63dd03d7434b69247c..f2986dc500d9f709bcf86aeb96b2478258c43a37 100644 (file)
@@ -207,7 +207,7 @@ METHOD(task_t, process_i, status_t,
 METHOD(task_t, get_type, task_type_t,
        private_ike_cert_post_t *this)
 {
-       return IKE_CERT_POST;
+       return TASK_IKE_CERT_POST;
 }
 
 METHOD(task_t, migrate, void,
index 1919ed0a6fe06cfea750717c4f5a14a722a58724..0de2efd38302815b97bd5c16dc8976ecab6a58c7 100644 (file)
@@ -479,7 +479,7 @@ METHOD(task_t, process_i, status_t,
 METHOD(task_t, get_type, task_type_t,
        private_ike_cert_pre_t *this)
 {
-       return IKE_CERT_PRE;
+       return TASK_IKE_CERT_PRE;
 }
 
 METHOD(task_t, migrate, void,
index 4ef9c56a5b9929913e09392d42c9667eff62076b..6623730d1752d5c9f72f8adf1ea0ceb24862745c 100644 (file)
@@ -385,7 +385,7 @@ METHOD(task_t, process_i, status_t,
 METHOD(task_t, get_type, task_type_t,
        private_ike_config_t *this)
 {
-       return IKE_CONFIG;
+       return TASK_IKE_CONFIG;
 }
 
 METHOD(task_t, migrate, void,
index 8cef0869744bf2224ce46ebe0f50909f4263bdc0..d343761c119c158e34e615bc0def534a5cc4d9ce 100644 (file)
@@ -28,7 +28,7 @@ typedef struct ike_config_t ike_config_t;
 #include <sa/tasks/task.h>
 
 /**
- * Task of type IKE_CONFIG, sets up a virtual IP and other
+ * Task of type TASK_IKE_CONFIG, sets up a virtual IP and other
  * configurations for an IKE_SA.
  */
 struct ike_config_t {
index fc24a6e948bb3f837c267bbbe260d07d2d6ecc0b..29ac87258a8e6b3cd24db62bd69d788dc2b84778 100644 (file)
@@ -149,7 +149,7 @@ METHOD(task_t, build_r, status_t,
 METHOD(task_t, get_type, task_type_t,
        private_ike_delete_t *this)
 {
-       return IKE_DELETE;
+       return TASK_IKE_DELETE;
 }
 
 METHOD(task_t, migrate, void,
index 106eff87c435cd4c0e369a757f60f40bcbc73caa..28ccc2efeaa3915dc666887dd21f1e8df536636b 100644 (file)
@@ -46,7 +46,7 @@ METHOD(task_t, return_success, status_t,
 METHOD(task_t, get_type, task_type_t,
        private_ike_dpd_t *this)
 {
-       return IKE_DPD;
+       return TASK_IKE_DPD;
 }
 
 
index aa514bffcc7f9e5a6ffb4a04b5c01a0ebf59cd1e..390756706cb9ac630b20edb33e62bef26e13645a 100644 (file)
@@ -507,7 +507,7 @@ METHOD(task_t, process_i, status_t,
 METHOD(task_t, get_type, task_type_t,
        private_ike_init_t *this)
 {
-       return IKE_INIT;
+       return TASK_IKE_INIT;
 }
 
 METHOD(task_t, migrate, void,
index 4b7f60416fba60eaff90119d54fab4f656616204..6855ac8394e206a991baf07fe00d0a48735d9d18 100644 (file)
@@ -28,7 +28,7 @@ typedef struct ike_init_t ike_init_t;
 #include <sa/tasks/task.h>
 
 /**
- * Task of type IKE_INIT, creates an IKE_SA without authentication.
+ * Task of type TASK_IKE_INIT, creates an IKE_SA without authentication.
  *
  * The authentication of is handle in the ike_auth task.
  */
@@ -48,7 +48,7 @@ struct ike_init_t {
 };
 
 /**
- * Create a new IKE_INIT task.
+ * Create a new TASK_IKE_INIT task.
  *
  * @param ike_sa               IKE_SA this task works for (new one when rekeying)
  * @param initiator            TRUE if task is the original initiator
index 8f90efcc321ec587fb7f407b211444489054fbf8..333c13635e8376882ff1347cc364b4ecc841d181 100644 (file)
@@ -750,7 +750,7 @@ METHOD(ike_me_t, relay, void,
 METHOD(task_t, get_type, task_type_t,
        private_ike_me_t *this)
 {
-       return IKE_ME;
+       return TASK_IKE_ME;
 }
 
 METHOD(task_t, migrate, void,
index 31285a4261f9976cc1e133d681818a8f1e79eefd..74dd1dedf401c89553d6ca766a81964899e8092c 100644 (file)
@@ -28,7 +28,7 @@ typedef struct ike_me_t ike_me_t;
 #include <sa/tasks/task.h>
 
 /**
- * Task of type IKE_ME, detects and handles IKE-ME extensions.
+ * Task of type TASK_IKE_ME, detects and handles IKE-ME extensions.
  *
  * This tasks handles the ME_MEDIATION Notify exchange to setup a mediation
  * connection, allows to initiate mediated connections using ME_CONNECT
index da8834c1ddeffd38d3259438ca53dc9117b8c8fb..6719bddd6b9fdfda165a12aecfc0fb8cfa82ac4f 100644 (file)
@@ -53,7 +53,7 @@ struct private_ike_mobike_t {
        chunk_t cookie2;
 
        /**
-        * NAT discovery reusing the IKE_NATD task
+        * NAT discovery reusing the TASK_IKE_NATD task
         */
        ike_natd_t *natd;
 
@@ -587,7 +587,7 @@ METHOD(ike_mobike_t, is_probing, bool,
 METHOD(task_t, get_type, task_type_t,
           private_ike_mobike_t *this)
 {
-       return IKE_MOBIKE;
+       return TASK_IKE_MOBIKE;
 }
 
 METHOD(task_t, migrate, void,
index 6b658f8b19c7b5efa55ffaab4bbf92ed54679591..3de0ab1b4149c8f7ed160eea27bd5142c59f046c 100644 (file)
@@ -385,7 +385,7 @@ METHOD(task_t, process_r, status_t,
 METHOD(task_t, get_type, task_type_t,
        private_ike_natd_t *this)
 {
-       return IKE_NATD;
+       return TASK_IKE_NATD;
 }
 
 METHOD(task_t, migrate, void,
index 197849d889dffec7f4e053b759b46e7679592070..38c7a4272303397c910407731edd8cbacbed2df5 100644 (file)
@@ -150,7 +150,7 @@ METHOD(task_t, process_i, status_t,
 METHOD(task_t, get_type, task_type_t,
        private_ike_reauth_t *this)
 {
-       return IKE_REAUTH;
+       return TASK_IKE_REAUTH;
 }
 
 METHOD(task_t, migrate, void,
index c089edab51b15b1fd83d924592d2193bb8c1face..a0d346040f3a259aa24563023e7f241f29ad148c 100644 (file)
@@ -52,7 +52,7 @@ struct private_ike_rekey_t {
        bool initiator;
 
        /**
-        * the IKE_INIT task which is reused to simplify rekeying
+        * the TASK_IKE_INIT task which is reused to simplify rekeying
         */
        ike_init_t *ike_init;
 
@@ -233,8 +233,8 @@ METHOD(task_t, process_i, status_t,
                case FAILED:
                        /* rekeying failed, fallback to old SA */
                        if (!(this->collision && (
-                               this->collision->get_type(this->collision) == IKE_DELETE ||
-                               this->collision->get_type(this->collision) == IKE_REAUTH)))
+                               this->collision->get_type(this->collision) == TASK_IKE_DELETE ||
+                               this->collision->get_type(this->collision) == TASK_IKE_REAUTH)))
                        {
                                job_t *job;
                                u_int32_t retry = RETRY_INTERVAL - (random() % RETRY_JITTER);
@@ -256,7 +256,7 @@ METHOD(task_t, process_i, status_t,
 
        /* check for collisions */
        if (this->collision &&
-               this->collision->get_type(this->collision) == IKE_REKEY)
+               this->collision->get_type(this->collision) == TASK_IKE_REKEY)
        {
                private_ike_rekey_t *other = (private_ike_rekey_t*)this->collision;
 
@@ -326,14 +326,14 @@ METHOD(task_t, process_i, status_t,
 METHOD(task_t, get_type, task_type_t,
        private_ike_rekey_t *this)
 {
-       return IKE_REKEY;
+       return TASK_IKE_REKEY;
 }
 
 METHOD(ike_rekey_t, collide, void,
        private_ike_rekey_t* this, task_t *other)
 {
-       DBG1(DBG_IKE, "detected %N collision with %N", task_type_names, IKE_REKEY,
-                task_type_names, other->get_type(other));
+       DBG1(DBG_IKE, "detected %N collision with %N", task_type_names,
+                TASK_IKE_REKEY, task_type_names, other->get_type(other));
        DESTROY_IF(this->collision);
        this->collision = other;
 }
index 1c955076812165119f5928b56ff33bd83e057175..6a9d59b0e4c209450799eff633b352153c94bf6d 100644 (file)
@@ -28,7 +28,7 @@ typedef struct ike_rekey_t ike_rekey_t;
 #include <sa/tasks/task.h>
 
 /**
- * Task of type IKE_REKEY, rekey an established IKE_SA.
+ * Task of type TASK_IKE_REKEY, rekey an established IKE_SA.
  */
 struct ike_rekey_t {
 
@@ -50,11 +50,11 @@ struct ike_rekey_t {
 };
 
 /**
- * Create a new IKE_REKEY task.
+ * Create a new TASK_IKE_REKEY task.
  *
  * @param ike_sa               IKE_SA this task works for
  * @param initiator            TRUE for initiator, FALSE for responder
- * @return                             IKE_REKEY task to handle by the task_manager
+ * @return                             TASK_IKE_REKEY task to handle by the task_manager
  */
 ike_rekey_t *ike_rekey_create(ike_sa_t *ike_sa, bool initiator);
 
index b3a7dddfac43c2b85cb8d4f65390c67fb19d0222..7b3cc6e91360900c07dadd98b215812677d35774 100644 (file)
@@ -107,7 +107,7 @@ METHOD(task_t, migrate, void,
 METHOD(task_t, get_type, task_type_t,
        private_ike_vendor_t *this)
 {
-       return IKE_VENDOR;
+       return TASK_IKE_VENDOR;
 }
 
 METHOD(task_t, destroy, void,
index 4d0c570d9d6f600b1e4cb807532c32d88cd644c3..2d9acf611c56d659b2a5e879080509fbb1db296a 100644 (file)
@@ -527,7 +527,7 @@ METHOD(task_t, process_i, status_t,
 METHOD(task_t, get_type, task_type_t,
        private_main_mode_t *this)
 {
-       return MAIN_MODE;
+       return TASK_MAIN_MODE;
 }
 
 METHOD(task_t, migrate, void,
index 2889409afb363682d035403811ddbac8cc67d8ca..83d0478ca550c812fbb07217d69d4044fede32c0 100644 (file)
 #include "task.h"
 
 #ifdef ME
-ENUM(task_type_names, IKE_INIT, TASK_QUICK_MODE,
+ENUM(task_type_names, TASK_IKE_INIT, TASK_QUICK_MODE,
        "IKE_INIT",
        "IKE_NATD",
        "IKE_MOBIKE",
-       "IKE_AUTHENTICATE",
+       "IKE_AUTH",
        "IKE_AUTH_LIFETIME",
        "IKE_CERT_PRE",
        "IKE_CERT_POST",
@@ -39,11 +39,11 @@ ENUM(task_type_names, IKE_INIT, TASK_QUICK_MODE,
        "QUICK_MODE",
 );
 #else
-ENUM(task_type_names, IKE_INIT, TASK_QUICK_MODE,
+ENUM(task_type_names, TASK_IKE_INIT, TASK_QUICK_MODE,
        "IKE_INIT",
        "IKE_NATD",
        "IKE_MOBIKE",
-       "IKE_AUTHENTICATE",
+       "IKE_AUTH",
        "IKE_AUTH_LIFETIME",
        "IKE_CERT_PRE",
        "IKE_CERT_POST",
index 8d78053ad9c9b720b978a7e3bc515221f7426cb6..8a81439673e968031c0472008c495d7177745063 100644 (file)
@@ -34,43 +34,43 @@ typedef struct task_t task_t;
  */
 enum task_type_t {
        /** establish an unauthenticated IKE_SA */
-       IKE_INIT,
+       TASK_IKE_INIT,
        /** detect NAT situation */
-       IKE_NATD,
+       TASK_IKE_NATD,
        /** handle MOBIKE stuff */
-       IKE_MOBIKE,
+       TASK_IKE_MOBIKE,
        /** authenticate the initiated IKE_SA */
-       IKE_AUTHENTICATE,
+       TASK_IKE_AUTH,
        /** AUTH_LIFETIME negotiation, RFC4478 */
-       IKE_AUTH_LIFETIME,
+       TASK_IKE_AUTH_LIFETIME,
        /** certificate processing before authentication (certreqs, cert parsing) */
-       IKE_CERT_PRE,
+       TASK_IKE_CERT_PRE,
        /** certificate processing after authentication (certs payload generation) */
-       IKE_CERT_POST,
+       TASK_IKE_CERT_POST,
        /** Configuration payloads, virtual IP and such */
-       IKE_CONFIG,
+       TASK_IKE_CONFIG,
        /** rekey an IKE_SA */
-       IKE_REKEY,
+       TASK_IKE_REKEY,
        /** reestablish a complete IKE_SA */
-       IKE_REAUTH,
+       TASK_IKE_REAUTH,
        /** delete an IKE_SA */
-       IKE_DELETE,
+       TASK_IKE_DELETE,
        /** liveness check */
-       IKE_DPD,
+       TASK_IKE_DPD,
        /** Vendor ID processing */
-       IKE_VENDOR,
+       TASK_IKE_VENDOR,
 #ifdef ME
        /** handle ME stuff */
-       IKE_ME,
+       TASK_IKE_ME,
 #endif /* ME */
        /** establish a CHILD_SA within an IKE_SA */
-       CHILD_CREATE,
+       TASK_CHILD_CREATE,
        /** delete an established CHILD_SA */
-       CHILD_DELETE,
+       TASK_CHILD_DELETE,
        /** rekey an CHILD_SA */
-       CHILD_REKEY,
+       TASK_CHILD_REKEY,
        /** IKEv1 main mode */
-       MAIN_MODE,
+       TASK_MAIN_MODE,
        /** IKEv1 quick mode */
        TASK_QUICK_MODE,
 };