- logger in utils

- allocator in utils
- tests.c -> testcases/testcases.c
This commit is contained in:
Martin Willi 2005-11-11 13:52:11 +00:00
parent b85d20d117
commit 8887824292
64 changed files with 113 additions and 96 deletions

View File

@ -24,10 +24,11 @@
#include <stdlib.h>
#include "allocator.h"
#include "types.h"
#include "configuration.h"
#include "types.h"
#include "utils/allocator.h"
/**
* Private data of an configuration_t object
*/

View File

@ -28,9 +28,9 @@
#include <stdlib.h>
#include "types.h"
#include "../types.h"
#include "encodings.h"
#include "encodings/ike_header.h"
#include "ike_header.h"
extern payload_info_t ike_header_info;

View File

@ -29,8 +29,8 @@
#ifndef ENCODINGS_H_
#define ENCODINGS_H_
#include "types.h"
#include "definitions.h"
#include "../types.h"
#include "../definitions.h"
/**

View File

@ -24,7 +24,7 @@
/* offsetof macro */
#include <stddef.h>
#include "../encodings.h"
#include "sencodings.h"
#include "ike_header.h"
/**

View File

@ -25,6 +25,7 @@
#ifndef IKE_HEADER_H_
#define IKE_HEADER_H_
#include "../types.h"
/**
* Data structure to hold the data of an IKEv2-Header

View File

@ -25,10 +25,12 @@
#include <arpa/inet.h>
#include <stdio.h>
#include "allocator.h"
#include "types.h"
#include "generator.h"
#include "types.h"
#include "utils/allocator.h"
typedef struct private_generator_context_s private_generator_context_t;

View File

@ -24,7 +24,7 @@
#define GENERATOR_H_
#include "types.h"
#include "encodings.h"
#include "encodings/encodings.h"
/**
* Generating is done in a data buffer.

View File

@ -23,11 +23,11 @@
#ifndef GLOBALS_H_
#define GLOBALS_H_
#include "socket.h"
#include "queues/send_queue.h"
#include "queues/job_queue.h"
#include "queues/event_queue.h"
#include "socket.h"
#include "logger_manager.h"
#include "utils/logger_manager.h"
extern send_queue_t *global_send_queue;

View File

@ -21,11 +21,12 @@
* for more details.
*/
#include "allocator.h"
#include "types.h"
#include "utils/linked_list.h"
#include "ike_sa.h"
#include "types.h"
#include "utils/allocator.h"
#include "utils/linked_list.h"
/**
* States in which a IKE_SA can actually be

View File

@ -23,10 +23,11 @@
#include <stdlib.h>
#include <string.h>
#include "allocator.h"
#include "types.h"
#include "ike_sa_id.h"
#include "types.h"
#include "utils/allocator.h"
/**
* Private data of an ike_sa_id object
*/

View File

@ -23,10 +23,11 @@
#include <pthread.h>
#include <string.h>
#include "allocator.h"
#include "ike_sa_manager.h"
#include "utils/linked_list.h"
#include "ike_sa_id.h"
#include "utils/allocator.h"
#include "utils/linked_list.h"
/**
* @brief An entry in the linked list, contains IKE_SA, locking and lookup data.

View File

@ -22,8 +22,9 @@
#include <stdlib.h>
#include "allocator.h"
#include "job.h"
#include "job.h"
#include "utils/allocator.h"
/**
* @brief implements function destroy of job_t

View File

@ -24,11 +24,11 @@
#include "message.h"
#include "allocator.h"
#include "types.h"
#include "ike_sa_id.h"
#include "utils/linked_list.h"
#include "encodings.h"
#include "utils/allocator.h"
#include "encodings/encodings.h"
/**
* Entry for a payload in the internal used linked list

View File

@ -20,9 +20,11 @@
* for more details.
*/
#include "allocator.h"
#include "packet.h"
#include "utils/allocator.h"
/**
* Private data of an packet_t object

View File

@ -23,12 +23,13 @@
#include <stdlib.h>
#include <arpa/inet.h>
#include "allocator.h"
#include "parser.h"
#include "types.h"
#include "definitions.h"
#include "globals.h"
#include "types.h"
#include "parser.h"
#include "logger.h"
#include "utils/allocator.h"
#include "utils/logger.h"
/**
* @private data stored in a context

View File

@ -24,7 +24,7 @@
#define PARSER_H_
#include "types.h"
#include "encodings.h"
#include "encodings/encodings.h"
/**
* @brief The parser context stores state information for a parsing session.

View File

@ -25,8 +25,8 @@
#include "event_queue.h"
#include "../allocator.h"
#include "../types.h"
#include "../utils/allocator.h"
#include "../utils/linked_list.h"

View File

@ -25,7 +25,7 @@
#include "job_queue.h"
#include "../allocator.h"
#include "../utils/allocator.h"
#include "../utils/linked_list.h"
/**

View File

@ -24,7 +24,7 @@
#include "send_queue.h"
#include "../allocator.h"
#include "../utils/allocator.h"
#include "../utils/linked_list.h"
/**

View File

@ -25,12 +25,12 @@
#include "receiver.h"
#include "allocator.h"
#include "socket.h"
#include "packet.h"
#include "job.h"
#include "queues/job_queue.h"
#include "globals.h"
#include "utils/allocator.h"
/**
* Private data of a receiver object

View File

@ -25,9 +25,9 @@
#include "scheduler.h"
#include "allocator.h"
#include "queues/job_queue.h"
#include "globals.h"
#include "utils/allocator.h"
#include "queues/job_queue.h"
/**
* Private data of a scheduler object

View File

@ -25,11 +25,11 @@
#include "sender.h"
#include "allocator.h"
#include "socket.h"
#include "packet.h"
#include "queues/send_queue.h"
#include "globals.h"
#include "queues/send_queue.h"
#include "utils/allocator.h"
/**
* Private data of a sender object

View File

@ -29,9 +29,10 @@
#include <unistd.h>
#include <stdlib.h>
#include "allocator.h"
#include "socket.h"
#include "utils/allocator.h"
typedef struct private_socket_s private_socket_t;
struct private_socket_s{

View File

@ -23,9 +23,9 @@
#include <stdlib.h>
#include <pthread.h>
#include "../allocator.h"
#include "event_queue_test.h"
#include "../tester.h"
#include "../utils/allocator.h"
#include "../queues/event_queue.h"
/**

View File

@ -23,7 +23,7 @@
#ifndef EVENT_QUEUE_TEST_H_
#define EVENT_QUEUE_TEST_H_
#include "../tester.h"
#include "../utils/tester.h"
/**
* @brief Test function used to test the event_queue functionality

View File

@ -22,14 +22,14 @@
#include <string.h>
#include "../globals.h"
#include "../allocator.h"
#include "../logger_manager.h"
#include "generator_test.h"
#include "../tester.h"
#include "../logger.h"
#include "../encodings.h"
#include "../globals.h"
#include "../generator.h"
#include "../utils/allocator.h"
#include "../utils/logger_manager.h"
#include "../utils/logger.h"
#include "../encodings/encodings.h"
#include "../encodings/ike_header.h"
extern payload_info_t *payload_infos[];

View File

@ -23,7 +23,7 @@
#ifndef GENERATOR_TEST_H_
#define GENERATOR_TEST_H_
#include "../tester.h"
#include "../utils/tester.h"
/**
* @brief Test function used to test the generator with unsupported payload

View File

@ -21,7 +21,7 @@
*/
#include "ike_sa_id_test.h"
#include "../tester.h"
#include "../ike_sa_id.h"
/*

View File

@ -23,7 +23,7 @@
#ifndef IKE_SA_ID_TEST_H_
#define IKE_SA_ID_TEST_H_
#include "../tester.h"
#include "../utils/tester.h"
/**
* @brief Test function used to test the ike_sa_id functionality

View File

@ -25,8 +25,8 @@
#include <unistd.h>
#include "ike_sa_manager_test.h"
#include "../types.h"
#include "../tester.h"
#include "../ike_sa_manager.h"

View File

@ -23,7 +23,7 @@
#ifndef IKE_SA_MANAGER_TEST_H_
#define IKE_SA_MANAGER_TEST_H_
#include "../tester.h"
#include "../utils/tester.h"
/**
* @brief Test function used to test the ike_sa_manager_t functionality

View File

@ -21,8 +21,8 @@
*/
#include "ike_sa_test.h"
#include "../types.h"
#include "../tester.h"
#include "../message.h"
#include "../configuration.h"
#include "../ike_sa.h"

View File

@ -23,7 +23,7 @@
#ifndef IKE_SA_TEST_H_
#define IKE_SA_TEST_H_
#include "../tester.h"
#include "../utils/tester.h"
/**
* @brief Test function used to test the ike_sa_t functionality

View File

@ -25,9 +25,9 @@
#include <pthread.h>
#include <unistd.h>
#include "../allocator.h"
#include "job_queue_test.h"
#include "../tester.h"
#include "../utils/allocator.h"
#include "../queues/job_queue.h"

View File

@ -23,7 +23,7 @@
#ifndef JOB_QUEUE_TEST_H_
#define JOB_QUEUE_TEST_H_
#include "../tester.h"
#include "../utils/tester.h"
/**
* @brief Test function used to test the job_queue functionality

View File

@ -21,8 +21,9 @@
*/
#include <string.h>
#include "linked_list_test.h"
#include "../tester.h"
#include "../utils/linked_list.h"
/*

View File

@ -23,7 +23,7 @@
#ifndef LINKED_LIST_TEST_H_
#define LINKED_LIST_TEST_H_
#include "../tester.h"
#include "../utils/tester.h"
/**
* @brief Test function for the type linked_list_t

View File

@ -21,9 +21,11 @@
*/
#include <string.h>
#include "packet_test.h"
#include "../allocator.h"
#include "../packet.h"
#include "../utils/allocator.h"
/*

View File

@ -23,7 +23,7 @@
#ifndef PACKET_TEST_H_
#define PACKET_TEST_H_
#include "../tester.h"
#include "../utils/tester.h"
/**
* @brief Test function used to test the packet_t functionality

View File

@ -21,13 +21,13 @@
#include <string.h>
#include "../allocator.h"
#include "parser_test.h"
#include "../tester.h"
#include "../logger_manager.h"
#include "../encodings.h"
#include "../generator.h"
#include "../parser.h"
#include "../utils/allocator.h"
#include "../utils/logger_manager.h"
#include "../encodings/encodings.h"
#include "../encodings/ike_header.h"
extern payload_info_t *payload_infos[];

View File

@ -22,7 +22,7 @@
#ifndef PARSER_TEST_H_
#define PARSER_TEST_H_
#include "../tester.h"
#include "../utils/tester.h"
void test_parser_with_header_payload(tester_t *tester);

View File

@ -23,14 +23,16 @@
#include <string.h>
#include <unistd.h>
#include "../allocator.h"
#include "sender_test.h"
#include "receiver_test.h"
#include "../globals.h"
#include "../receiver.h"
#include "../packet.h"
#include "../socket.h"
#include "../queues/send_queue.h"
#include "../queues/job_queue.h"
#include "../encodings/encodings.h"
#include "../utils/allocator.h"
/**
* Number of packets to send by sender-thread

View File

@ -23,7 +23,7 @@
#ifndef RECEIVER_TEST_H_
#define RECEIVER_TEST_H_
#include "../tester.h"
#include "../utils/tester.h"
/**
* @brief Test function for the type receiver_t

View File

@ -24,6 +24,7 @@
#include <unistd.h>
#include "scheduler_test.h"
#include "../globals.h"
#include "../scheduler.h"
#include "../queues/event_queue.h"

View File

@ -23,7 +23,7 @@
#ifndef SCHEDULER_TEST_H_
#define SCHEDULER_TEST_H_
#include "../tester.h"
#include "../utils/tester.h"
/**
* @brief Test function for the type scheduler_t

View File

@ -23,7 +23,7 @@
#include <pthread.h>
#include "send_queue_test.h"
#include "../tester.h"
#include "../queues/send_queue.h"

View File

@ -23,7 +23,7 @@
#ifndef SEND_QUEUE_TEST_H_
#define SEND_QUEUE_TEST_H_
#include "../tester.h"
#include "../utils/tester.h"
/**
* @brief Test function used to test the send_queue functionality

View File

@ -22,14 +22,15 @@
#include <string.h>
#include "../allocator.h"
#include "sender_test.h"
#include "../globals.h"
#include "../sender.h"
#include "../packet.h"
#include "../socket.h"
#include "../queues/send_queue.h"
#include "../queues/job_queue.h"
#include "../utils/allocator.h"
/**
* Number of packets to send by sender-thread

View File

@ -23,7 +23,7 @@
#ifndef SENDER_TEST_H_
#define SENDER_TEST_H_
#include "../tester.h"
#include "../utils/tester.h"
/**
* @brief Test function for the type sender_t

View File

@ -23,10 +23,10 @@
#include <stdlib.h>
#include <string.h>
#include "../allocator.h"
#include "socket_test.h"
#include "../tester.h"
#include "../socket.h"
#include "../utils/allocator.h"
/*
* Description in header file

View File

@ -23,7 +23,7 @@
#ifndef SOCKET_TEST_H_
#define SOCKET_TEST_H_
#include "../tester.h"
#include "../utils/tester.h"
/**
* @brief Test function for the type socket_t

View File

@ -23,13 +23,13 @@
#include <stdio.h>
#include "../logger_manager.h"
#include "../allocator.h"
#include "../tester.h"
#include "../queues/job_queue.h"
#include "../queues/event_queue.h"
#include "../queues/send_queue.h"
#include "../socket.h"
#include "../utils/logger_manager.h"
#include "../utils/allocator.h"
#include "../utils/tester.h"
#include "linked_list_test.h"
#include "thread_pool_test.h"
#include "job_queue_test.h"

View File

@ -23,7 +23,7 @@
#include <stdlib.h>
#include "thread_pool_test.h"
#include "../tester.h"
#include "../thread_pool.h"
/*

View File

@ -23,7 +23,7 @@
#ifndef THREAD_POOL_TEST_H_
#define THREAD_POOL_TEST_H_
#include "../tester.h"
#include "../utils/tester.h"
/**
* @brief Test function for the type thread_pool_t

View File

@ -27,10 +27,10 @@
#include "thread_pool.h"
#include "allocator.h"
#include "logger.h"
#include "queues/job_queue.h"
#include "globals.h"
#include "queues/job_queue.h"
#include "utils/allocator.h"
#include "utils/logger.h"
/**
* @brief structure with private members for thread_pool_t

View File

@ -29,7 +29,6 @@
#include <stdio.h>
#include "allocator.h"
#include "types.h"
#ifdef LEAK_DETECTIVE

View File

@ -28,7 +28,7 @@
#include <stddef.h>
#include <string.h>
#include "types.h"
#include "../types.h"
/**

View File

@ -24,7 +24,7 @@
#include "linked_list.h"
#include "../allocator.h"
#include "allocator.h"
typedef struct linked_list_element_s linked_list_element_t;

View File

@ -27,8 +27,8 @@
#include <time.h>
#include "logger.h"
#include "daemon.h"
#include "types.h"
#include "../daemon.h"
#include "allocator.h"
/**

View File

@ -24,7 +24,7 @@
#define LOGGER_H_
#include <stdio.h>
#include "types.h"
#include "../types.h"
/**
* Log Levels supported by the logger object

View File

@ -24,7 +24,7 @@
#include "logger_manager.h"
#include "allocator.h"
#include "utils/linked_list.h"
#include "linked_list.h"
/**
* Maximum length of a logger name

View File

@ -29,9 +29,8 @@
#include "tester.h"
#include "allocator.h"
#include "utils/linked_list.h"
#include "thread_pool.h"
#include "queues/job_queue.h"
#include "linked_list.h"
#include "../queues/job_queue.h"
/**
* @brief Private Variables and Functions of tester class

View File

@ -25,7 +25,7 @@
#include <stdio.h>
#include "types.h"
#include "../types.h"