diff options
Diffstat (limited to 'src/charon/threads')
-rw-r--r-- | src/charon/threads/kernel_interface.h | 10 | ||||
-rw-r--r-- | src/charon/threads/receiver.h | 5 | ||||
-rw-r--r-- | src/charon/threads/scheduler.h | 12 | ||||
-rw-r--r-- | src/charon/threads/sender.h | 4 | ||||
-rw-r--r-- | src/charon/threads/stroke_interface.h | 2 | ||||
-rw-r--r-- | src/charon/threads/thread_pool.h | 11 |
6 files changed, 19 insertions, 25 deletions
diff --git a/src/charon/threads/kernel_interface.h b/src/charon/threads/kernel_interface.h index 4370e8253..2655745a8 100644 --- a/src/charon/threads/kernel_interface.h +++ b/src/charon/threads/kernel_interface.h @@ -25,12 +25,14 @@ #ifndef KERNEL_INTERFACE_H_ #define KERNEL_INTERFACE_H_ +typedef struct natt_conf_t natt_conf_t; +typedef enum policy_dir_t policy_dir_t; +typedef struct kernel_interface_t kernel_interface_t; + #include <utils/host.h> #include <crypto/prf_plus.h> #include <encoding/payloads/proposal_substructure.h> -typedef struct natt_conf_t natt_conf_t; - /** * Configuration for NAT-T */ @@ -41,8 +43,6 @@ struct natt_conf_t { u_int16_t dport; }; -typedef enum policy_dir_t policy_dir_t; - /** * Direction of a policy. These are equal to those * defined in xfrm.h, but we want to stay implementation @@ -57,8 +57,6 @@ enum policy_dir_t { POLICY_FWD = 2, }; -typedef struct kernel_interface_t kernel_interface_t; - /** * @brief Interface to the kernel. * diff --git a/src/charon/threads/receiver.h b/src/charon/threads/receiver.h index dada9b1f4..19c0a05f4 100644 --- a/src/charon/threads/receiver.h +++ b/src/charon/threads/receiver.h @@ -24,11 +24,10 @@ #ifndef RECEIVER_H_ #define RECEIVER_H_ -#include <types.h> - - typedef struct receiver_t receiver_t; +#include <types.h> + /** * @brief Receives packets from the socket and adds them to the job queue. * diff --git a/src/charon/threads/scheduler.h b/src/charon/threads/scheduler.h index 943a18c58..e794cceeb 100644 --- a/src/charon/threads/scheduler.h +++ b/src/charon/threads/scheduler.h @@ -24,21 +24,21 @@ #ifndef SCHEDULER_H_ #define SCHEDULER_H_ -#include <types.h> - typedef struct scheduler_t scheduler_t; +#include <types.h> + /** * @brief The scheduler thread is responsible for timed events. - * + * * The scheduler thread takes out jobs from the event-queue and adds them * to the job-queue. - * + * * Starts a thread which does the work, since event-queue is blocking. - * + * * @b Constructors: * - scheduler_create() - * + * * @ingroup threads */ struct scheduler_t { diff --git a/src/charon/threads/sender.h b/src/charon/threads/sender.h index a36245933..6ec83a745 100644 --- a/src/charon/threads/sender.h +++ b/src/charon/threads/sender.h @@ -24,10 +24,10 @@ #ifndef SENDER_H_ #define SENDER_H_ -#include <types.h> - typedef struct sender_t sender_t; +#include <types.h> + /** * @brief Thread responsible for sending packets over the socket. * diff --git a/src/charon/threads/stroke_interface.h b/src/charon/threads/stroke_interface.h index 941841d14..0def5167e 100644 --- a/src/charon/threads/stroke_interface.h +++ b/src/charon/threads/stroke_interface.h @@ -23,8 +23,6 @@ #ifndef STROKE_INTERFACE_H_ #define STROKE_INTERFACE_H_ - - typedef struct stroke_t stroke_t; /** diff --git a/src/charon/threads/thread_pool.h b/src/charon/threads/thread_pool.h index e4a04e8cb..2d8fd4f4d 100644 --- a/src/charon/threads/thread_pool.h +++ b/src/charon/threads/thread_pool.h @@ -24,22 +24,21 @@ #ifndef THREAD_POOL_H_ #define THREAD_POOL_H_ +typedef struct thread_pool_t thread_pool_t; + #include <stdlib.h> #include <types.h> - -typedef struct thread_pool_t thread_pool_t; - /** * @brief A thread_pool consists of a pool of threads processing jobs from the job queue. - * + * * Current implementation uses as many threads as specified in constructor. * A more improved version would dynamically increase thread count if necessary. - * + * * @b Constructors: * - thread_pool_create() - * + * * @todo Add support for dynamic thread handling * * @ingroup threads |