- typedefs changed
This commit is contained in:
@@ -32,14 +32,14 @@
|
||||
|
||||
#ifdef LEAK_DETECTIVE
|
||||
|
||||
typedef union memory_hdr_t memory_hdr_t;
|
||||
|
||||
/**
|
||||
* Header of each allocated memory area
|
||||
*
|
||||
* Used to detect memory leaks
|
||||
*/
|
||||
typedef union memory_hdr_u memory_hdr_t;
|
||||
|
||||
union memory_hdr_u {
|
||||
union memory_hdr_t {
|
||||
struct {
|
||||
/**
|
||||
* Filename withing memory was allocated
|
||||
@@ -69,9 +69,9 @@ union memory_hdr_u {
|
||||
*
|
||||
* Contains private variables of allocator_t object.
|
||||
*/
|
||||
typedef struct private_allocator_s private_allocator_t;
|
||||
typedef struct private_allocator_t private_allocator_t;
|
||||
|
||||
struct private_allocator_s
|
||||
struct private_allocator_t
|
||||
{
|
||||
/**
|
||||
* Public part of an allocator_t object.
|
||||
|
||||
@@ -53,13 +53,13 @@
|
||||
|
||||
#ifdef LEAK_DETECTIVE
|
||||
|
||||
/**
|
||||
* @brief Allocater object use to detect memory leaks.
|
||||
*
|
||||
*/
|
||||
typedef struct allocator_s allocator_t;
|
||||
typedef struct allocator_t allocator_t;
|
||||
|
||||
struct allocator_s {
|
||||
/**
|
||||
*@brief Allocater object use to detect memory leaks.
|
||||
*
|
||||
*/
|
||||
struct allocator_t {
|
||||
|
||||
/**
|
||||
* Allocates memory with LEAK_DETECTION and
|
||||
|
||||
@@ -33,13 +33,12 @@
|
||||
*/
|
||||
#define PRIMECHECK_ROUNDS 30
|
||||
|
||||
typedef struct private_gmp_helper_t private_gmp_helper_t;
|
||||
|
||||
/**
|
||||
* Private data of an gmp_helper_t object.
|
||||
*
|
||||
*/
|
||||
typedef struct private_gmp_helper_s private_gmp_helper_t;
|
||||
|
||||
struct private_gmp_helper_s {
|
||||
struct private_gmp_helper_t {
|
||||
/**
|
||||
* public gmp_helper_t interface
|
||||
*/
|
||||
|
||||
@@ -30,13 +30,13 @@
|
||||
|
||||
#include <types.h>
|
||||
|
||||
typedef struct gmp_helper_t gmp_helper_t;
|
||||
|
||||
/**
|
||||
* Class with helper functions to manipulate gmp values
|
||||
* @brief Class with helper functions to manipulate gmp values.
|
||||
*
|
||||
*/
|
||||
typedef struct gmp_helper_s gmp_helper_t;
|
||||
|
||||
struct gmp_helper_s {
|
||||
struct gmp_helper_t {
|
||||
|
||||
/**
|
||||
* @brief initialize an mpz_t to a random prime of specified size
|
||||
|
||||
@@ -27,15 +27,14 @@
|
||||
#include <utils/allocator.h>
|
||||
|
||||
|
||||
typedef struct linked_list_element_s linked_list_element_t;
|
||||
|
||||
typedef struct linked_list_element_t linked_list_element_t;
|
||||
|
||||
/**
|
||||
* @brief Element of the linked_list.
|
||||
*
|
||||
* This element holds a pointer to the value of the list item itself.
|
||||
*/
|
||||
struct linked_list_element_s{
|
||||
struct linked_list_element_t {
|
||||
/**
|
||||
* value of a list item
|
||||
*/
|
||||
@@ -106,9 +105,9 @@ linked_list_element_t *linked_list_element_create(void *value)
|
||||
* Private variables and functions of linked list
|
||||
*
|
||||
*/
|
||||
typedef struct private_linked_list_s private_linked_list_t;
|
||||
typedef struct private_linked_list_t private_linked_list_t;
|
||||
|
||||
struct private_linked_list_s{
|
||||
struct private_linked_list_t {
|
||||
/**
|
||||
* Public part of linked list
|
||||
*/
|
||||
@@ -136,9 +135,9 @@ struct private_linked_list_s{
|
||||
* Private variables and functions of linked list iterator
|
||||
*
|
||||
*/
|
||||
typedef struct private_linked_list_iterator_s private_linked_list_iterator_t;
|
||||
typedef struct private_linked_list_iterator_t private_linked_list_iterator_t;
|
||||
|
||||
struct private_linked_list_iterator_s{
|
||||
struct private_linked_list_iterator_t {
|
||||
/**
|
||||
* Public part of linked list iterator
|
||||
*/
|
||||
|
||||
@@ -25,16 +25,16 @@
|
||||
|
||||
#include <types.h>
|
||||
|
||||
typedef struct linked_list_iterator_t linked_list_iterator_t;
|
||||
|
||||
/**
|
||||
* @brief Iterator for a linked list
|
||||
*
|
||||
* @brief Iterator for a linked list.
|
||||
*
|
||||
* This element holds a pointer to the current element in the linked list
|
||||
*
|
||||
*
|
||||
* @warning the iterator is NOT thread-save
|
||||
*/
|
||||
typedef struct linked_list_iterator_s linked_list_iterator_t;
|
||||
|
||||
struct linked_list_iterator_s {
|
||||
struct linked_list_iterator_t {
|
||||
|
||||
/**
|
||||
* @brief returns TRUE if more elements are available
|
||||
@@ -92,8 +92,11 @@ struct linked_list_iterator_s {
|
||||
status_t (*destroy) (linked_list_iterator_t *this);
|
||||
};
|
||||
|
||||
typedef struct linked_list_t linked_list_t;
|
||||
|
||||
|
||||
/**
|
||||
* @brief Double Linked List (named only as linked list)
|
||||
* @brief Double Linked List (named only as linked list).
|
||||
*
|
||||
* @warning Access to an object of this type is not thread-save
|
||||
*
|
||||
@@ -101,10 +104,7 @@ struct linked_list_iterator_s {
|
||||
* @see event_queue_t
|
||||
* @see send_queue_t
|
||||
*/
|
||||
typedef struct linked_list_s linked_list_t;
|
||||
|
||||
|
||||
struct linked_list_s {
|
||||
struct linked_list_t {
|
||||
|
||||
/**
|
||||
* @brief gets the count of items in the list
|
||||
|
||||
@@ -37,11 +37,12 @@
|
||||
*/
|
||||
#define MAX_LOG 8192
|
||||
|
||||
typedef struct private_logger_t private_logger_t;
|
||||
|
||||
/**
|
||||
* @brief The logger object.
|
||||
*/
|
||||
typedef struct private_logger_s private_logger_t;
|
||||
struct private_logger_s {
|
||||
struct private_logger_t {
|
||||
/**
|
||||
* Public data
|
||||
*/
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
|
||||
#include <types.h>
|
||||
|
||||
typedef enum logger_level_t logger_level_t;
|
||||
|
||||
/**
|
||||
* @brief Log Levels supported by the logger object
|
||||
*
|
||||
@@ -37,8 +39,7 @@
|
||||
* as CONTROL|MORE fore a detailed cotrol level, or
|
||||
* use RAW| to see all raw data dumps (except private)
|
||||
*/
|
||||
typedef enum logger_level_e logger_level_t;
|
||||
enum logger_level_e {
|
||||
enum logger_level_t {
|
||||
/**
|
||||
* control flow
|
||||
*/
|
||||
@@ -75,11 +76,12 @@ enum logger_level_e {
|
||||
FULL = ALL + CONTROL + ERROR + RAW + PRIVATE
|
||||
};
|
||||
|
||||
typedef struct logger_t logger_t;
|
||||
|
||||
/**
|
||||
* @brief The logger object
|
||||
*/
|
||||
typedef struct logger_s logger_t;
|
||||
struct logger_s {
|
||||
struct logger_t {
|
||||
|
||||
/**
|
||||
* @brief Log an entry, using printf()-like params.
|
||||
|
||||
@@ -49,8 +49,9 @@ mapping_t logger_context_t_mappings[] = {
|
||||
*/
|
||||
#define MAX_LOGGER_NAME 45
|
||||
|
||||
typedef struct private_logger_manager_s private_logger_manager_t;
|
||||
struct private_logger_manager_s {
|
||||
typedef struct private_logger_manager_t private_logger_manager_t;
|
||||
|
||||
struct private_logger_manager_t {
|
||||
/**
|
||||
* Public data.
|
||||
*/
|
||||
@@ -91,9 +92,9 @@ struct private_logger_manager_s {
|
||||
/**
|
||||
* Entry in the logger_levels linked list
|
||||
*/
|
||||
typedef struct logger_levels_entry_s logger_levels_entry_t;
|
||||
typedef struct logger_levels_entry_t logger_levels_entry_t;
|
||||
|
||||
struct logger_levels_entry_s{
|
||||
struct logger_levels_entry_t {
|
||||
logger_context_t context;
|
||||
logger_level_t level;
|
||||
};
|
||||
@@ -101,9 +102,9 @@ struct logger_levels_entry_s{
|
||||
/**
|
||||
* Entry in the loggers linked list
|
||||
*/
|
||||
typedef struct loggers_entry_s loggers_entry_t;
|
||||
typedef struct loggers_entry_t loggers_entry_t;
|
||||
|
||||
struct loggers_entry_s{
|
||||
struct loggers_entry_t {
|
||||
logger_context_t context;
|
||||
logger_t *logger;
|
||||
};
|
||||
|
||||
@@ -27,12 +27,12 @@
|
||||
|
||||
#include <utils/logger.h>
|
||||
|
||||
typedef enum logger_context_t logger_context_t;
|
||||
|
||||
/**
|
||||
* @brief Context of a specific logger
|
||||
*/
|
||||
typedef enum logger_context_e logger_context_t;
|
||||
|
||||
enum logger_context_e{
|
||||
enum logger_context_t {
|
||||
PARSER,
|
||||
GENERATOR,
|
||||
IKE_SA,
|
||||
@@ -47,14 +47,14 @@ enum logger_context_e{
|
||||
TESTER,
|
||||
DAEMON,
|
||||
CONFIGURATION_MANAGER,
|
||||
};
|
||||
};
|
||||
|
||||
typedef struct logger_manager_t logger_manager_t;
|
||||
|
||||
/**
|
||||
* @brief The logger_manager_t object
|
||||
*/
|
||||
typedef struct logger_manager_s logger_manager_t;
|
||||
|
||||
struct logger_manager_s {
|
||||
struct logger_manager_t {
|
||||
|
||||
/**
|
||||
* @brief Gets a logger_t object for a specific logger context.
|
||||
|
||||
@@ -40,9 +40,9 @@
|
||||
*/
|
||||
#define DEFAULT_PSEUDO_RANDOM_DEVICE "/dev/urandom"
|
||||
|
||||
typedef struct private_randomizer_s private_randomizer_t;
|
||||
typedef struct private_randomizer_t private_randomizer_t;
|
||||
|
||||
struct private_randomizer_s {
|
||||
struct private_randomizer_t {
|
||||
/**
|
||||
* public interface
|
||||
*/
|
||||
|
||||
@@ -25,14 +25,14 @@
|
||||
|
||||
#include <types.h>
|
||||
|
||||
typedef struct randomizer_t randomizer_t;
|
||||
|
||||
/**
|
||||
* Object representing an randomizer
|
||||
* @brief Object representing an randomizer
|
||||
*
|
||||
* This class is thread save as file system read calls are thread save...
|
||||
*/
|
||||
typedef struct randomizer_s randomizer_t;
|
||||
|
||||
struct randomizer_s {
|
||||
struct randomizer_t {
|
||||
|
||||
/**
|
||||
* @brief Reads a specific number of bytes from random device.
|
||||
|
||||
@@ -32,13 +32,14 @@
|
||||
#include <utils/linked_list.h>
|
||||
#include <queues/job_queue.h>
|
||||
|
||||
|
||||
typedef struct private_tester_t private_tester_t;
|
||||
|
||||
/**
|
||||
* @brief Private Variables and Functions of tester class
|
||||
* @brief Private Variables and Functions of tester class.
|
||||
*
|
||||
*/
|
||||
typedef struct private_tester_s private_tester_t;
|
||||
|
||||
struct private_tester_s {
|
||||
struct private_tester_t {
|
||||
tester_t public;
|
||||
|
||||
|
||||
|
||||
@@ -29,22 +29,22 @@
|
||||
|
||||
|
||||
|
||||
typedef struct test_t test_t;
|
||||
|
||||
typedef struct tester_t tester_t;
|
||||
|
||||
/**
|
||||
* @brief Specifies a test
|
||||
*/
|
||||
typedef struct test_s test_t;
|
||||
|
||||
/**
|
||||
* @brief A tester object to perform tests with
|
||||
*/
|
||||
typedef struct tester_s tester_t;
|
||||
|
||||
struct test_s{
|
||||
struct test_t {
|
||||
void (*test_function) (tester_t * tester);
|
||||
char * test_name;
|
||||
};
|
||||
|
||||
struct tester_s {
|
||||
/**
|
||||
* @brief A tester object to perform tests with
|
||||
*/
|
||||
struct tester_t {
|
||||
|
||||
/**
|
||||
* @brief Tests all testcases in array tests with specific tester object
|
||||
|
||||
Reference in New Issue
Block a user