changed enum and structs names to _t

This commit is contained in:
Jan Hutter
2005-11-24 09:17:51 +00:00
parent 1f9c9180e4
commit 95c61cb956
45 changed files with 199 additions and 178 deletions
+3 -3
View File
@@ -34,12 +34,12 @@
#include <encoding/payloads/ke_payload.h> #include <encoding/payloads/ke_payload.h>
#include <encoding/payloads/transform_attribute.h> #include <encoding/payloads/transform_attribute.h>
typedef struct private_configuration_manager_t private_configuration_manager_t;
/** /**
* Private data of an configuration_t object * Private data of an configuration_t object
*/ */
typedef struct private_configuration_manager_s private_configuration_manager_t; struct private_configuration_manager_t {
struct private_configuration_manager_s {
/** /**
* Public part * Public part
+4 -3
View File
@@ -31,6 +31,9 @@
#include <transforms/signers/signer.h> #include <transforms/signers/signer.h>
#include <transforms/crypters/crypter.h> #include <transforms/crypters/crypter.h>
typedef struct configuration_manager_t configuration_manager_t;
/** /**
* @brief Manages all configuration aspects of the daemon. * @brief Manages all configuration aspects of the daemon.
* *
@@ -39,9 +42,7 @@
* or a hash map and are managed by this class. * or a hash map and are managed by this class.
* *
*/ */
typedef struct configuration_manager_s configuration_manager_t; struct configuration_manager_t {
struct configuration_manager_s {
/** /**
* Gets the remote host information for a specific configuration name. * Gets the remote host information for a specific configuration name.
+4 -3
View File
@@ -41,12 +41,13 @@
#include <encoding/payloads/notify_payload.h> #include <encoding/payloads/notify_payload.h>
#include <encoding/payloads/nonce_payload.h> #include <encoding/payloads/nonce_payload.h>
typedef struct private_generator_t private_generator_t;
/** /**
* Private part of a generator_t object * Private part of a generator_t object
*/ */
typedef struct private_generator_s private_generator_t; struct private_generator_t {
struct private_generator_s {
/** /**
* Public part of a generator_t object * Public part of a generator_t object
*/ */
+3 -3
View File
@@ -38,12 +38,12 @@
*/ */
#define GENERATOR_DATA_BUFFER_INCREASE_VALUE 500 #define GENERATOR_DATA_BUFFER_INCREASE_VALUE 500
typedef struct generator_t generator_t;
/** /**
*A generator_t object which generates payloads of specific type. *A generator_t object which generates payloads of specific type.
*/ */
typedef struct generator_s generator_t; struct generator_t {
struct generator_s {
/** /**
* @brief Generates a specific payload from given payload object. * @brief Generates a specific payload from given payload object.
+6 -6
View File
@@ -36,13 +36,13 @@
#include <encoding/payloads/payload.h> #include <encoding/payloads/payload.h>
typedef struct supported_payload_entry_t supported_payload_entry_t;
/** /**
* Supported payload entry used in message_rule_t * Supported payload entry used in message_rule_t
* *
*/ */
typedef struct supported_payload_entry_s supported_payload_entry_t; struct supported_payload_entry_t {
struct supported_payload_entry_s {
/** /**
* Payload type * Payload type
*/ */
@@ -59,13 +59,13 @@ struct supported_payload_entry_s {
size_t max_occurence; size_t max_occurence;
}; };
typedef struct message_rule_t message_rule_t;
/** /**
* Message Rule used to find out which payloads are supported by each message type * Message Rule used to find out which payloads are supported by each message type
* *
*/ */
typedef struct message_rule_s message_rule_t; struct message_rule_t {
struct message_rule_s {
/** /**
* Type of message * Type of message
*/ */
+2 -4
View File
@@ -30,16 +30,14 @@
#include <utils/linked_list.h> #include <utils/linked_list.h>
typedef struct message_t message_t;
/** /**
* @brief This class is used to represent an IKEv2-Message. * @brief This class is used to represent an IKEv2-Message.
* *
* An IKEv2-Message is either a request or response. * An IKEv2-Message is either a request or response.
*/ */
typedef struct message_s message_t; struct message_t {
struct message_s {
/** /**
* @brief Sets the IKE major version of the message. * @brief Sets the IKE major version of the message.
+4 -3
View File
@@ -43,14 +43,15 @@
typedef struct private_parser_t private_parser_t;
/** /**
* @private data stored in a context * @private data stored in a context
* *
* contains pointers and counters to store current state * contains pointers and counters to store current state
*/ */
typedef struct private_parser_s private_parser_t; struct private_parser_t {
struct private_parser_s {
/** /**
* Public members, see parser_t * Public members, see parser_t
*/ */
+3 -3
View File
@@ -28,6 +28,8 @@
#include <encoding/payloads/payload.h> #include <encoding/payloads/payload.h>
typedef struct parser_t parser_t;
/** /**
* @brief A parser_t object which parses payloads * @brief A parser_t object which parses payloads
* *
@@ -35,9 +37,7 @@
* payloads can be parsed out of the chunk using parse_payload. * payloads can be parsed out of the chunk using parse_payload.
* The parser remains the state until destroyed. * The parser remains the state until destroyed.
*/ */
typedef struct parser_s parser_t; struct parser_t {
struct parser_s {
/** /**
* @brief parses the next payload * @brief parses the next payload
+3 -3
View File
@@ -33,6 +33,8 @@
#include <definitions.h> #include <definitions.h>
typedef enum encoding_type_t encoding_type_t;
/** /**
* @brief All different kinds of encoding types. * @brief All different kinds of encoding types.
* *
@@ -40,9 +42,7 @@
* which has to be parsed or generated differently has its own * which has to be parsed or generated differently has its own
* type defined here. * type defined here.
*/ */
typedef enum encoding_type_e encoding_type_t; enum encoding_type_t{
enum encoding_type_e{
/** /**
* Representing a 4 Bit unsigned int value * Representing a 4 Bit unsigned int value
* *
+7 -2
View File
@@ -31,9 +31,14 @@
#include <encoding/payloads/encodings.h> #include <encoding/payloads/encodings.h>
#include <utils/allocator.h> #include <utils/allocator.h>
typedef struct private_ike_header_s private_ike_header_t;
struct private_ike_header_s { typedef struct private_ike_header_t private_ike_header_t;
/**
* Private data of an ike_header_t Object
*
*/
struct private_ike_header_t {
/** /**
* public interface * public interface
*/ */
+6 -6
View File
@@ -49,14 +49,14 @@
*/ */
#define IKE_HEADER_LENGTH 28 #define IKE_HEADER_LENGTH 28
typedef enum exchange_type_t exchange_type_t;
/** /**
* @brief Different types of IKE-Exchanges. * @brief Different types of IKE-Exchanges.
* *
* See RFC for different types. * See RFC for different types.
*/ */
typedef enum exchange_type_e exchange_type_t; enum exchange_type_t{
enum exchange_type_e{
/** /**
* EXCHANGE_TYPE_UNDEFINED, not a official message type :-) * EXCHANGE_TYPE_UNDEFINED, not a official message type :-)
@@ -82,6 +82,8 @@ enum exchange_type_e{
extern mapping_t exchange_type_m[]; extern mapping_t exchange_type_m[];
typedef struct ike_header_t ike_header_t;
/** /**
* Object representing an IKEv2-Header * Object representing an IKEv2-Header
* *
@@ -90,9 +92,7 @@ extern mapping_t exchange_type_m[];
* both versions of the IKE-protocol. * both versions of the IKE-protocol.
* *
*/ */
typedef struct ike_header_s ike_header_t; struct ike_header_t {
struct ike_header_s {
/** /**
* implements payload_t interface * implements payload_t interface
*/ */
+3 -3
View File
@@ -33,13 +33,13 @@
#include <utils/allocator.h> #include <utils/allocator.h>
typedef struct private_ke_payload_t private_ke_payload_t;
/** /**
* Private data of an ke_payload_t Object * Private data of an ke_payload_t Object
* *
*/ */
typedef struct private_ke_payload_s private_ke_payload_t; struct private_ke_payload_t {
struct private_ke_payload_s {
/** /**
* public ke_payload_t interface * public ke_payload_t interface
*/ */
+4 -3
View File
@@ -42,15 +42,16 @@
*/ */
#define KE_PAYLOAD_HEADER_LENGTH 8 #define KE_PAYLOAD_HEADER_LENGTH 8
typedef struct ke_payload_t ke_payload_t;
/** /**
* Object representing an IKEv2-KE Payload * Object representing an IKEv2-KE Payload
* *
* The KE Payload format is described in RFC section 3.4. * The KE Payload format is described in RFC section 3.4.
* *
*/ */
typedef struct ke_payload_s ke_payload_t; struct ke_payload_t {
struct ke_payload_s {
/** /**
* implements payload_t interface * implements payload_t interface
*/ */
@@ -31,14 +31,13 @@
#include <utils/allocator.h> #include <utils/allocator.h>
typedef struct private_nonce_payload_t private_nonce_payload_t;
/** /**
* Private data of an nonce_payload_t' Object * Private data of an nonce_payload_t' Object
* *
*/ */
typedef struct private_nonce_payload_s private_nonce_payload_t; struct private_nonce_payload_t {
struct private_nonce_payload_s {
/** /**
* public nonce_payload_t interface * public nonce_payload_t interface
*/ */
@@ -33,15 +33,15 @@
*/ */
#define NONCE_PAYLOAD_HEADER_LENGTH 4 #define NONCE_PAYLOAD_HEADER_LENGTH 4
typedef struct nonce_payload_t nonce_payload_t;
/** /**
* Object representing an IKEv2 Nonce payload * Object representing an IKEv2 Nonce payload
* *
* The Nonce payload format is described in draft section 3.3. * The Nonce payload format is described in draft section 3.3.
* *
*/ */
typedef struct nonce_payload_s nonce_payload_t; struct nonce_payload_t {
struct nonce_payload_s {
/** /**
* implements payload_t interface * implements payload_t interface
*/ */
@@ -32,13 +32,14 @@
#include <encoding/payloads/encodings.h> #include <encoding/payloads/encodings.h>
#include <utils/allocator.h> #include <utils/allocator.h>
typedef struct private_notify_payload_t private_notify_payload_t;
/** /**
* Private data of an notify_payload_t Object * Private data of an notify_payload_t Object
* *
*/ */
typedef struct private_notify_payload_s private_notify_payload_t; struct private_notify_payload_t {
struct private_notify_payload_s {
/** /**
* public notify_payload_t interface * public notify_payload_t interface
*/ */
@@ -42,15 +42,15 @@
*/ */
#define NOTIFY_PAYLOAD_HEADER_LENGTH 8 #define NOTIFY_PAYLOAD_HEADER_LENGTH 8
typedef struct notify_payload_t notify_payload_t;
/** /**
* Object representing an IKEv2-Notify Payload * Object representing an IKEv2-Notify Payload
* *
* The Notify Payload format is described in Draft section 3.10. * The Notify Payload format is described in Draft section 3.10.
* *
*/ */
typedef struct notify_payload_s notify_payload_t; struct notify_payload_t {
struct notify_payload_s {
/** /**
* implements payload_t interface * implements payload_t interface
*/ */
+6 -6
View File
@@ -29,6 +29,8 @@
#include <encoding/payloads/encodings.h> #include <encoding/payloads/encodings.h>
typedef enum payload_type_t payload_type_t;
/** /**
* Payload-Types of a IKEv2-Message * Payload-Types of a IKEv2-Message
* *
@@ -36,9 +38,7 @@
* Header and substructures are also defined as * Header and substructures are also defined as
* payload types with values from PRIVATE USE space. * payload types with values from PRIVATE USE space.
*/ */
typedef enum payload_type_e payload_type_t; enum payload_type_t{
enum payload_type_e{
/** /**
* NO_PAYLOAD * NO_PAYLOAD
@@ -150,15 +150,15 @@ enum payload_type_e{
extern mapping_t payload_type_m[]; extern mapping_t payload_type_m[];
typedef struct payload_t payload_t;
/** /**
* @brief Generic interface for all payload types (inclusive * @brief Generic interface for all payload types (inclusive
* header and substructures) * header and substructures)
* *
* *
*/ */
typedef struct payload_s payload_t; struct payload_t {
struct payload_s {
/** /**
* @brief Destroys a payload and all included substructures. * @brief Destroys a payload and all included substructures.
* *
@@ -33,13 +33,13 @@
#include <utils/allocator.h> #include <utils/allocator.h>
#include <utils/linked_list.h> #include <utils/linked_list.h>
typedef struct private_proposal_substructure_t private_proposal_substructure_t;
/** /**
* Private data of an proposal_substructure_t' Object * Private data of an proposal_substructure_t' Object
* *
*/ */
typedef struct private_proposal_substructure_s private_proposal_substructure_t; struct private_proposal_substructure_t {
struct private_proposal_substructure_s {
/** /**
* public proposal_substructure_t interface * public proposal_substructure_t interface
*/ */
@@ -37,27 +37,27 @@
#define PROPOSAL_SUBSTRUCTURE_HEADER_LENGTH 8 #define PROPOSAL_SUBSTRUCTURE_HEADER_LENGTH 8
typedef enum protocol_id_t protocol_id_t;
/** /**
* Protocol ID of a proposal * Protocol ID of a proposal
*/ */
typedef enum protocol_id_e protocol_id_t; enum protocol_id_t {
enum protocol_id_e {
UNDEFINED_PROTOCOL_ID = 201, UNDEFINED_PROTOCOL_ID = 201,
IKE = 1, IKE = 1,
AH = 2, AH = 2,
ESP = 3, ESP = 3,
}; };
typedef struct proposal_substructure_t proposal_substructure_t;
/** /**
* Object representing an IKEv2- PROPOSAL SUBSTRUCTURE * Object representing an IKEv2- PROPOSAL SUBSTRUCTURE
* *
* The PROPOSAL SUBSTRUCTURE format is described in RFC section 3.3.1. * The PROPOSAL SUBSTRUCTURE format is described in RFC section 3.3.1.
* *
*/ */
typedef struct proposal_substructure_s proposal_substructure_t; struct proposal_substructure_t {
struct proposal_substructure_s {
/** /**
* implements payload_t interface * implements payload_t interface
*/ */
+3 -3
View File
@@ -33,13 +33,13 @@
#include <utils/linked_list.h> #include <utils/linked_list.h>
typedef struct private_sa_payload_t private_sa_payload_t;
/** /**
* Private data of an sa_payload_t' Object * Private data of an sa_payload_t' Object
* *
*/ */
typedef struct private_sa_payload_s private_sa_payload_t; struct private_sa_payload_t {
struct private_sa_payload_s {
/** /**
* public sa_payload_t interface * public sa_payload_t interface
*/ */
+3 -3
View File
@@ -41,15 +41,15 @@
*/ */
#define SA_PAYLOAD_HEADER_LENGTH 4 #define SA_PAYLOAD_HEADER_LENGTH 4
typedef struct sa_payload_t sa_payload_t;
/** /**
* Object representing an IKEv2-SA Payload * Object representing an IKEv2-SA Payload
* *
* The SA Payload format is described in RFC section 3.3. * The SA Payload format is described in RFC section 3.3.
* *
*/ */
typedef struct sa_payload_s sa_payload_t; struct sa_payload_t {
struct sa_payload_s {
/** /**
* implements payload_t interface * implements payload_t interface
*/ */
@@ -31,13 +31,13 @@
#include <types.h> #include <types.h>
#include <utils/allocator.h> #include <utils/allocator.h>
typedef struct private_transform_attribute_t private_transform_attribute_t;
/** /**
* Private data of an transform_attribute_t Object * Private data of an transform_attribute_t Object
* *
*/ */
typedef struct private_transform_attribute_s private_transform_attribute_t; struct private_transform_attribute_t {
struct private_transform_attribute_s {
/** /**
* public transform_attribute_t interface * public transform_attribute_t interface
*/ */
@@ -29,12 +29,12 @@
#include <encoding/payloads/payload.h> #include <encoding/payloads/payload.h>
typedef enum transform_attribute_type_t transform_attribute_type_t;
/** /**
* Type of the attribute, as in IKEv2 draft 3.3.5 * Type of the attribute, as in IKEv2 draft 3.3.5
*/ */
typedef enum transform_attribute_type_e transform_attribute_type_t; enum transform_attribute_type_t {
enum transform_attribute_type_e {
ATTRIBUTE_UNDEFINED = 16384, ATTRIBUTE_UNDEFINED = 16384,
KEY_LENGTH = 14 KEY_LENGTH = 14
}; };
@@ -44,15 +44,15 @@ enum transform_attribute_type_e {
*/ */
extern mapping_t transform_attribute_type_m[]; extern mapping_t transform_attribute_type_m[];
typedef struct transform_attribute_t transform_attribute_t;
/** /**
* Object representing an IKEv2- TRANSFORM Attribute * Object representing an IKEv2- TRANSFORM Attribute
* *
* The TRANSFORM ATTRIBUTE format is described in RFC section 3.3.5. * The TRANSFORM ATTRIBUTE format is described in RFC section 3.3.5.
* *
*/ */
typedef struct transform_attribute_s transform_attribute_t; struct transform_attribute_t {
struct transform_attribute_s {
/** /**
* implements payload_t interface * implements payload_t interface
*/ */
@@ -33,13 +33,14 @@
#include <utils/allocator.h> #include <utils/allocator.h>
#include <utils/linked_list.h> #include <utils/linked_list.h>
typedef struct private_transform_substructure_t private_transform_substructure_t;
/** /**
* Private data of an transform_substructure_t' Object * Private data of an transform_substructure_t' Object
* *
*/ */
typedef struct private_transform_substructure_s private_transform_substructure_t; struct private_transform_substructure_t {
struct private_transform_substructure_s {
/** /**
* public transform_substructure_t interface * public transform_substructure_t interface
*/ */
@@ -43,12 +43,12 @@
#define TRANSFORM_SUBSTRUCTURE_HEADER_LENGTH 8 #define TRANSFORM_SUBSTRUCTURE_HEADER_LENGTH 8
typedef enum transform_type_t transform_type_t;
/** /**
* Type of a transform, as in IKEv2 draft 3.3.2 * Type of a transform, as in IKEv2 draft 3.3.2
*/ */
typedef enum transform_type_e transform_type_t; enum transform_type_t {
enum transform_type_e {
UNDEFINED_TRANSFORM_TYPE = 241, UNDEFINED_TRANSFORM_TYPE = 241,
ENCRYPTION_ALGORITHM = 1, ENCRYPTION_ALGORITHM = 1,
PSEUDO_RANDOM_FUNCTION = 2, PSEUDO_RANDOM_FUNCTION = 2,
@@ -62,12 +62,12 @@ enum transform_type_e {
*/ */
extern mapping_t transform_type_m[]; extern mapping_t transform_type_m[];
typedef enum encryption_algorithm_t encryption_algorithm_t;
/** /**
* Encryption algorithm, as in IKEv2 draft 3.3.2 * Encryption algorithm, as in IKEv2 draft 3.3.2
*/ */
typedef enum encryption_algorithm_e encryption_algorithm_t; enum encryption_algorithm_t {
enum encryption_algorithm_e {
ENCR_UNDEFINED = 1024, ENCR_UNDEFINED = 1024,
ENCR_DES_IV64 = 1, ENCR_DES_IV64 = 1,
ENCR_DES = 2, ENCR_DES = 2,
@@ -89,12 +89,12 @@ enum encryption_algorithm_e {
*/ */
extern mapping_t encryption_algorithm_m[]; extern mapping_t encryption_algorithm_m[];
typedef enum pseudo_random_function_t pseudo_random_function_t;
/** /**
* Pseudo random function, as in IKEv2 draft 3.3.2 * Pseudo random function, as in IKEv2 draft 3.3.2
*/ */
typedef enum pseudo_random_function_e pseudo_random_function_t; enum pseudo_random_function_t {
enum pseudo_random_function_e {
PRF_UNDEFINED = 1024, PRF_UNDEFINED = 1024,
PRF_HMAC_MD5 = 1, PRF_HMAC_MD5 = 1,
PRF_HMAC_SHA1 = 2, PRF_HMAC_SHA1 = 2,
@@ -107,12 +107,12 @@ enum pseudo_random_function_e {
*/ */
extern mapping_t pseudo_random_function_m[]; extern mapping_t pseudo_random_function_m[];
typedef enum integrity_algorithm_t integrity_algorithm_t;
/** /**
* Integrity algorithm, as in IKEv2 draft 3.3.2 * Integrity algorithm, as in IKEv2 draft 3.3.2
*/ */
typedef enum integrity_algorithm_e integrity_algorithm_t; enum integrity_algorithm_t {
enum integrity_algorithm_e {
AUTH_UNDEFINED = 1024, AUTH_UNDEFINED = 1024,
AUTH_HMAC_MD5_96 = 1, AUTH_HMAC_MD5_96 = 1,
AUTH_HMAC_SHA1_96 = 2, AUTH_HMAC_SHA1_96 = 2,
@@ -127,12 +127,12 @@ enum integrity_algorithm_e {
extern mapping_t integrity_algorithm_m[]; extern mapping_t integrity_algorithm_m[];
typedef enum diffie_hellman_group_t diffie_hellman_group_t;
/** /**
* Diffie-Hellman group, as in IKEv2 draft 3.3.2 and RFC 3526 * Diffie-Hellman group, as in IKEv2 draft 3.3.2 and RFC 3526
*/ */
typedef enum diffie_hellman_group_e diffie_hellman_group_t; enum diffie_hellman_group_t {
enum diffie_hellman_group_e {
MODP_UNDEFINED = 1024, MODP_UNDEFINED = 1024,
MODP_768_BIT = 1, MODP_768_BIT = 1,
MODP_1024_BIT = 2, MODP_1024_BIT = 2,
@@ -149,12 +149,12 @@ enum diffie_hellman_group_e {
*/ */
extern mapping_t diffie_hellman_group_m[]; extern mapping_t diffie_hellman_group_m[];
typedef enum extended_sequence_numbers_t extended_sequence_numbers_t;
/** /**
* Extended sequence numbers, as in IKEv2 draft 3.3.2 * Extended sequence numbers, as in IKEv2 draft 3.3.2
*/ */
typedef enum extended_sequence_numbers_e extended_sequence_numbers_t; enum extended_sequence_numbers_t {
enum extended_sequence_numbers_e {
NO_EXT_SEQ_NUMBERS = 0, NO_EXT_SEQ_NUMBERS = 0,
EXT_SEQ_NUMBERS = 1 EXT_SEQ_NUMBERS = 1
}; };
@@ -164,15 +164,15 @@ enum extended_sequence_numbers_e {
*/ */
extern mapping_t extended_sequence_numbers_m[]; extern mapping_t extended_sequence_numbers_m[];
typedef struct transform_substructure_t transform_substructure_t;
/** /**
* Object representing an IKEv2- TRANSFORM SUBSTRUCTURE * Object representing an IKEv2- TRANSFORM SUBSTRUCTURE
* *
* The TRANSFORM SUBSTRUCTURE format is described in RFC section 3.3.2. * The TRANSFORM SUBSTRUCTURE format is described in RFC section 3.3.2.
* *
*/ */
typedef struct transform_substructure_s transform_substructure_t; struct transform_substructure_t {
struct transform_substructure_s {
/** /**
* implements payload_t interface * implements payload_t interface
*/ */
+5 -3
View File
@@ -24,11 +24,13 @@
#include <utils/allocator.h> #include <utils/allocator.h>
typedef struct private_host_t private_host_t;
/** /**
* @brief The logger object. * @brief Private Data of a host object.
*/ */
typedef struct private_host_s private_host_t; struct private_host_t {
struct private_host_s {
/** /**
* Public data * Public data
*/ */
+4 -3
View File
@@ -32,11 +32,12 @@
#include <types.h> #include <types.h>
typedef struct host_t host_t;
/** /**
* @brief The logger object * @brief Representates a Host
*/ */
typedef struct host_s host_t; struct host_t {
struct host_s {
/** /**
* @brief Build a clone of this host object. * @brief Build a clone of this host object.
* *
+6 -6
View File
@@ -26,15 +26,15 @@
#include <utils/allocator.h> #include <utils/allocator.h>
/** typedef struct private_packet_t private_packet_t;
* Private data of an packet_t object
*/
typedef struct private_packet_s private_packet_t;
struct private_packet_s { /**
* Private data of an packet_t object.
*/
struct private_packet_t {
/** /**
* Public part of a packet_t object * Public part of a packet_t object.
*/ */
packet_t public; packet_t public;
}; };
+2 -3
View File
@@ -28,12 +28,11 @@
#include <network/host.h> #include <network/host.h>
typedef struct packet_t packet_t;
/** /**
* @brief UDP-Packet, contains data, sender and receiver * @brief UDP-Packet, contains data, sender and receiver
*/ */
typedef struct packet_s packet_t; struct packet_t {
struct packet_s {
/** /**
* source address structure * source address structure
+6 -2
View File
@@ -36,9 +36,13 @@
#include <utils/allocator.h> #include <utils/allocator.h>
#include <utils/logger_manager.h> #include <utils/logger_manager.h>
typedef struct private_socket_s private_socket_t;
struct private_socket_s{ typedef struct private_socket_t private_socket_t;
/**
* Private data of an socket_t object
*/
struct private_socket_t{
/** /**
* public functions * public functions
*/ */
+3 -2
View File
@@ -37,12 +37,13 @@
#define MAX_PACKET 3000 #define MAX_PACKET 3000
typedef struct socket_t socket_t;
/** /**
* @brief abstraction of one (ipv4), or in future, of multiple sockets * @brief abstraction of one (ipv4), or in future, of multiple sockets
* *
*/ */
typedef struct socket_s socket_t; struct socket_t {
struct socket_s {
/** /**
* @brief receive a packet * @brief receive a packet
* *
+6 -7
View File
@@ -31,15 +31,15 @@
typedef struct event_t event_t;
/** /**
* @brief Represents an event as it is stored in the event queue. * @brief Represents an event as it is stored in the event queue.
* *
* A event consists of a event time and an assigned job object. * A event consists of a event time and an assigned job object.
* *
*/ */
typedef struct event_s event_t; struct event_t{
struct event_s{
/** /**
* Time to fire the event. * Time to fire the event.
*/ */
@@ -95,14 +95,13 @@ static event_t *event_create(timeval_t time, job_t *job)
} }
typedef struct private_event_queue_t private_event_queue_t;
/** /**
* @brief Private Variables and Functions of event_queue_t class. * @brief Private Variables and Functions of event_queue_t class.
* *
*/ */
typedef struct private_event_queue_s private_event_queue_t; struct private_event_queue_t {
struct private_event_queue_s {
/** /**
* Public part. * Public part.
*/ */
+3 -3
View File
@@ -28,15 +28,15 @@
#include <types.h> #include <types.h>
#include <queues/jobs/job.h> #include <queues/jobs/job.h>
typedef struct event_queue_t event_queue_t;
/** /**
* @brief Event-Queue used to store timed events. * @brief Event-Queue used to store timed events.
* *
* Although the event-queue is based on a linked_list_t * Although the event-queue is based on a linked_list_t
* all access functions are thread-save implemented. * all access functions are thread-save implemented.
*/ */
typedef struct event_queue_s event_queue_t; struct event_queue_t {
struct event_queue_s {
/** /**
* @brief Returns number of events in queue. * @brief Returns number of events in queue.
+4 -4
View File
@@ -28,14 +28,14 @@
#include <utils/allocator.h> #include <utils/allocator.h>
#include <utils/linked_list.h> #include <utils/linked_list.h>
typedef struct private_job_queue_t private_job_queue_t;
/** /**
* @brief Private Variables and Functions of job_queue class * @brief Private Variables and Functions of job_queue class
* *
*/ */
typedef struct private_job_queue_s private_job_queue_t; struct private_job_queue_t {
struct private_job_queue_s {
job_queue_t public; job_queue_t public;
/** /**
+3 -3
View File
@@ -26,15 +26,15 @@
#include <types.h> #include <types.h>
#include <queues/jobs/job.h> #include <queues/jobs/job.h>
typedef struct job_queue_t job_queue_t;
/** /**
* @brief Job-Queue * @brief Job-Queue
* *
* Although the job-queue is based on a linked_list_t * Although the job-queue is based on a linked_list_t
* all access functions are thread-save implemented * all access functions are thread-save implemented
*/ */
typedef struct job_queue_s job_queue_t; struct job_queue_t {
struct job_queue_s {
/** /**
* @brief returns number of jobs in queue * @brief returns number of jobs in queue
@@ -24,13 +24,14 @@
#include <utils/allocator.h> #include <utils/allocator.h>
typedef struct private_delete_ike_sa_job_t private_delete_ike_sa_job_t;
/** /**
* Private data of an delete_ike_sa_job_t Object * Private data of an delete_ike_sa_job_t Object
* *
*/ */
typedef struct private_delete_ike_sa_job_s private_delete_ike_sa_job_t; struct private_delete_ike_sa_job_t {
struct private_delete_ike_sa_job_s {
/** /**
* public delete_ike_sa_job_t interface * public delete_ike_sa_job_t interface
*/ */
@@ -28,13 +28,13 @@
#include <queues/jobs/job.h> #include <queues/jobs/job.h>
typedef struct delete_ike_sa_job_t delete_ike_sa_job_t;
/** /**
* Object representing an DELETE_IKE_SA Job * Object representing an DELETE_IKE_SA Job
* *
*/ */
typedef struct delete_ike_sa_job_s delete_ike_sa_job_t; struct delete_ike_sa_job_t {
struct delete_ike_sa_job_s {
/** /**
* implements job_t interface * implements job_t interface
*/ */
@@ -25,13 +25,14 @@
#include <utils/allocator.h> #include <utils/allocator.h>
typedef struct private_incoming_packet_job_t private_incoming_packet_job_t;
/** /**
* Private data of an incoming_packet_job_t Object * Private data of an incoming_packet_job_t Object
* *
*/ */
typedef struct private_incoming_packet_job_s private_incoming_packet_job_t; struct private_incoming_packet_job_t {
struct private_incoming_packet_job_s {
/** /**
* public incoming_packet_job_t interface * public incoming_packet_job_t interface
*/ */
@@ -27,13 +27,14 @@
#include <network/packet.h> #include <network/packet.h>
#include <queues/jobs/job.h> #include <queues/jobs/job.h>
typedef struct incoming_packet_job_t incoming_packet_job_t;
/** /**
* Object representing an INCOMING_PACKET Job * Object representing an INCOMING_PACKET Job
* *
*/ */
typedef struct incoming_packet_job_s incoming_packet_job_t; struct incoming_packet_job_t {
struct incoming_packet_job_s {
/** /**
* implements job_t interface * implements job_t interface
*/ */
@@ -27,13 +27,14 @@
#include <utils/allocator.h> #include <utils/allocator.h>
typedef struct private_initiate_ike_sa_job_t private_initiate_ike_sa_job_t;
/** /**
* Private data of an initiate_ike_sa_job_t Object * Private data of an initiate_ike_sa_job_t Object
* *
*/ */
typedef struct private_initiate_ike_sa_job_s private_initiate_ike_sa_job_t; struct private_initiate_ike_sa_job_t {
struct private_initiate_ike_sa_job_s {
/** /**
* public initiate_ike_sa_job_t interface * public initiate_ike_sa_job_t interface
*/ */
@@ -26,13 +26,13 @@
#include <types.h> #include <types.h>
#include <queues/jobs/job.h> #include <queues/jobs/job.h>
typedef struct initiate_ike_sa_job_t initiate_ike_sa_job_t;
/** /**
* Object representing an INITIATE_IKE_SA Job * Object representing an INITIATE_IKE_SA Job
* *
*/ */
typedef struct initiate_ike_sa_job_s initiate_ike_sa_job_t; struct initiate_ike_sa_job_t {
struct initiate_ike_sa_job_s {
/** /**
* implements job_t interface * implements job_t interface
*/ */
+8 -6
View File
@@ -26,12 +26,13 @@
#include <types.h> #include <types.h>
#include <definitions.h> #include <definitions.h>
typedef enum job_type_t job_type_t;
/** /**
* Type of Jobs in Job-Queue * Type of Jobs in Job-Queue
*/ */
typedef enum job_type_e job_type_t; enum job_type_t {
enum job_type_e {
/** /**
* Process an incoming IKEv2-Message * Process an incoming IKEv2-Message
* *
@@ -61,14 +62,15 @@ enum job_type_e {
extern mapping_t job_type_m[]; extern mapping_t job_type_m[];
typedef struct job_t job_t;
/** /**
* @brief Job-Interface as it is stored in the job queue * @brief Job-Interface as it is stored in the job queue
* *
* A job consists of a job-type and one or more assigned values * A job consists of a job-type and one or more assigned values
*/ */
typedef struct job_s job_t; struct job_t{
struct job_s{
/** /**
* @brief get type of job * @brief get type of job
+4 -4
View File
@@ -27,14 +27,14 @@
#include <utils/allocator.h> #include <utils/allocator.h>
#include <utils/linked_list.h> #include <utils/linked_list.h>
typedef struct private_send_queue_t private_send_queue_t;
/** /**
* @brief Private Variables and Functions of send_queue class * @brief Private Variables and Functions of send_queue class
* *
*/ */
typedef struct private_send_queue_s private_send_queue_t; struct private_send_queue_t {
struct private_send_queue_s {
/** /**
* Public part of the send_queue_t object * Public part of the send_queue_t object
*/ */
+4 -3
View File
@@ -26,15 +26,16 @@
#include <types.h> #include <types.h>
#include <network/packet.h> #include <network/packet.h>
typedef struct send_queue_t send_queue_t;
/** /**
* @brief Send-Queue * @brief Send-Queue
* *
* Although the send-queue is based on a linked_list_t * Although the send-queue is based on a linked_list_t
* all access functions are thread-save implemented * all access functions are thread-save implemented
*/ */
typedef struct send_queue_s send_queue_t; struct send_queue_t {
struct send_queue_s {
/** /**
* @brief returns number of packets in queue * @brief returns number of packets in queue