+++ /dev/null
-/**
- * @file configuration.c
- *
- * @brief Configuration class used to store IKE_SA-configurations.
- *
- * Object of this type represents a configuration for an IKE_SA and its child_sa's.
- *
- */
-
-/*
- * Copyright (C) 2005 Jan Hutter, Martin Willi
- * Hochschule fuer Technik Rapperswil
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * for more details.
- */
-
-#include <stdlib.h>
-
-#include "configuration.h"
-
-#include "types.h"
-#include "utils/allocator.h"
-
-/**
- * Private data of an configuration_t object
- */
-typedef struct private_configuration_s private_configuration_t;
-
-struct private_configuration_s {
-
- /**
- * Public part of a configuration_t object
- */
- configuration_t public;
-
-
- /* Private values */
-};
-
-/**
- * Implements function destroy of configuration_t.
- * See #configuration_s.destroy for description.
- */
-static status_t destroy (private_configuration_t *this)
-{
- if (this == NULL)
- {
- return FAILED;
- }
- allocator_free(this);
- return SUCCESS;
-}
-
-/*
- * Described in header-file
- */
-configuration_t * configuration_create()
-{
- private_configuration_t *this = allocator_alloc_thing(private_configuration_t);
- if (this == NULL)
- {
- return NULL;
- }
-
- /* public functions */
- this->public.destroy = (status_t(*)(configuration_t*))destroy;
-
-
- return (&this->public);
-}
+++ /dev/null
-/**
- * @file configuration.h
- *
- * @brief Configuration class used to store IKE_SA-configurations.
- *
- * Object of this type represents a configuration for an IKE_SA and its child_sa's.
- *
- */
-
-/*
- * Copyright (C) 2005 Jan Hutter, Martin Willi
- * Hochschule fuer Technik Rapperswil
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * for more details.
- */
-
-#ifndef CONFIGURATION_H_
-#define CONFIGURATION_H_
-
-#include "types.h"
-
-/**
- * @brief This class is used to represent an IKE_SA-configuration.
- *
- */
-typedef struct configuration_s configuration_t;
-
-struct configuration_s {
-
- /**
- * @brief Destroys a configuration_t object
- *
- * @param this configuration_t object
- * @return
- * - SUCCESS if succeeded
- * - FAILED when NULL pointer given
- */
- status_t (*destroy) (configuration_t *this);
-};
-
-/**
- * Creates an configuration_t object
- *
- * @return
- * - pointer to created configuration_t object if succeeded
- * - NULL if memory allocation failed
- */
-configuration_t *configuration_create();
-
-#endif /*CONFIGURATION_H_*/
register_signals();
/* logger_manager is created first */
- global_logger_manager = logger_manager_create(ALL);
+ global_logger_manager = logger_manager_create(FULL);
if (global_logger_manager == NULL)
{
printf("could not create logger manager");
}
- logger->log(logger,CONTROL_MORE,"going to wait for exit signal");
+ logger->log(logger,CONTROL|MORE,"going to wait for exit signal");
/* go and handle signals*/
main_loop();
destroy_globals();
/* logger is destroyed */
- logger->log(logger,CONTROL_MORE,"destroy logger");
+ logger->log(logger,CONTROL|MORE,"destroy logger");
global_logger_manager->destroy_logger(global_logger_manager,logger);
- logger->log(logger,CONTROL_MORE,"destroy logger_manager");
- logger->log(logger,CONTROL_MORE,"------------------------------------");
+ logger->log(logger,CONTROL|MORE,"destroy logger_manager");
+ logger->log(logger,CONTROL|MORE,"------------------------------------");
if (global_logger_manager != NULL)
{
global_logger_manager->destroy(global_logger_manager);
/* U_INT Types of multiple then 8 bits must be aligned */
if (((number_of_bits % 8) == 0) && (this->current_bit != 0))
{
- this->logger->log(this->logger,CONTROL_MORE,"U_INT Type %s is not 8 Bit aligned", mapping_find(encoding_type_m,int_type));
+ this->logger->log(this->logger,CONTROL|MORE,"U_INT Type %s is not 8 Bit aligned", mapping_find(encoding_type_m,int_type));
/* current bit has to be zero for values multiple of 8 bits */
return FAILED;
}
}
else
{
- this->logger->log(this->logger,CONTROL_MORE,"U_INT_4 Type is not 4 Bit aligned");
+ this->logger->log(this->logger,CONTROL|MORE,"U_INT_4 Type is not 4 Bit aligned");
/* 4 Bit integers must have a 4 bit alignment */
return FAILED;
};
/* attribute type must not change first bit uf current byte ! */
if (this->current_bit != 1)
{
- this->logger->log(this->logger,CONTROL_MORE,"ATTRIBUTE FORMAT flag is not set");
+ this->logger->log(this->logger,CONTROL|MORE,"ATTRIBUTE FORMAT flag is not set");
/* first bit has to be set! */
return FAILED;
}
}
default:
- this->logger->log(this->logger,CONTROL_MORE,"U_INT Type %s is not supported", mapping_find(encoding_type_m,int_type));
+ this->logger->log(this->logger,CONTROL|MORE,"U_INT Type %s is not supported", mapping_find(encoding_type_m,int_type));
return FAILED;
}
return SUCCESS;
/* only one bit or 8 bit fields are supported */
if ((bits != 1) && (bits != 8))
{
- this->logger->log(this->logger,CONTROL_MORE,"Reserved field of %d bits cannot be generated",bits);
+ this->logger->log(this->logger,CONTROL|MORE,"Reserved field of %d bits cannot be generated",bits);
return FAILED;
}
/* make sure enough space is available in buffer */
/* one byte processing*/
if (this->current_bit > 0)
{
- this->logger->log(this->logger,CONTROL_MORE,"Reserved field cannot be written cause allignement of current bit is %d",this->current_bit);
+ this->logger->log(this->logger,CONTROL|MORE,"Reserved field cannot be written cause allignement of current bit is %d",this->current_bit);
return FAILED;
}
*(this->out_position) = 0x00;
{
if (this->current_bit != 0)
{
- this->logger->log(this->logger,CONTROL_MORE,"Chunks can only be taken if bits are alligned in buffer");
+ this->logger->log(this->logger,CONTROL|MORE,"Chunks can only be taken if bits are alligned in buffer");
return FAILED;
}
/* position in buffer */
size_t new_buffer_size = old_buffer_size + GENERATOR_DATA_BUFFER_INCREASE_VALUE;
size_t out_position_offset = ((this->out_position) - (this->buffer));
- this->logger->log(this->logger,CONTROL_MORE,"Gen-Buffer is increased from %d to %d byte",old_buffer_size,new_buffer_size);
+ this->logger->log(this->logger,CONTROL|MORE,"Gen-Buffer is increased from %d to %d byte",old_buffer_size,new_buffer_size);
/* Reallocate space for new buffer */
new_buffer = allocator_realloc(this->buffer,new_buffer_size);
if (new_buffer == NULL)
{
- this->logger->log(this->logger,CONTROL_MORE,"Fatal error: Reallocation of buffer failed!!!");
+ this->logger->log(this->logger,CONTROL|MORE,"Fatal error: Reallocation of buffer failed!!!");
return OUT_OF_RES;
}
if (data->ptr == NULL)
{
data->len = 0;
- this->logger->log(this->logger,CONTROL_MORE,"OUT OF Ressources to wrote data to chunk!!!!!");
+ this->logger->log(this->logger,CONTROL|MORE,"OUT OF Ressources to wrote data to chunk!!!!!");
return OUT_OF_RES;
}
memcpy(data->ptr,this->buffer,data_length);
status = this->generate_from_chunk(this,rules[i].offset);
if (status != SUCCESS)
{
- this->logger->log(this->logger,CONTROL_MORE,"Could no write key exchange data from chunk");
+ this->logger->log(this->logger,CONTROL|MORE,"Could no write key exchange data from chunk");
return status;
}
status = this->write_bytes_to_buffer_at_offset(this,&int16_val,sizeof(u_int16_t),payload_length_position_offset);
if (status != SUCCESS)
{
- this->logger->log(this->logger,CONTROL_MORE,"Could no write payload length into buffer");
+ this->logger->log(this->logger,CONTROL|MORE,"Could no write payload length into buffer");
return status;
}
break;
status = this->generate_from_chunk(this,rules[i].offset);
if (status != SUCCESS)
{
- this->logger->log(this->logger,CONTROL_MORE,"Could no write notification data from chunk");
+ this->logger->log(this->logger,CONTROL|MORE,"Could no write notification data from chunk");
return status;
}
status = this->write_bytes_to_buffer_at_offset(this,&int16_val,sizeof(u_int16_t),payload_length_position_offset);
if (status != SUCCESS)
{
- this->logger->log(this->logger,CONTROL_MORE,"Could no write payload length into buffer");
+ this->logger->log(this->logger,CONTROL|MORE,"Could no write payload length into buffer");
return status;
}
break;
status = this->generate_from_chunk(this,rules[i].offset);
if (status != SUCCESS)
{
- this->logger->log(this->logger,CONTROL_MORE,"Could no write nonce data from chunk");
+ this->logger->log(this->logger,CONTROL|MORE,"Could no write nonce data from chunk");
return status;
}
status = this->write_bytes_to_buffer_at_offset(this,&int16_val,sizeof(u_int16_t),payload_length_position_offset);
if (status != SUCCESS)
{
- this->logger->log(this->logger,CONTROL_MORE,"Could no write payload length into buffer");
+ this->logger->log(this->logger,CONTROL|MORE,"Could no write payload length into buffer");
return status;
}
break;
/* proposals are stored in a linked list and so accessed */
linked_list_t *proposals = *((linked_list_t **)(this->data_struct + rules[i].offset));
- this->logger->log(this->logger,CONTROL_MORE,"Generate Proposals");
+ this->logger->log(this->logger,CONTROL|MORE,"Generate Proposals");
linked_list_iterator_t *iterator;
/* create forward iterator */
status = proposals->create_iterator(proposals,&iterator,TRUE);
if (status != SUCCESS)
{
- this->logger->log(this->logger,CONTROL_MORE,"Could not iterator of proposals");
+ this->logger->log(this->logger,CONTROL|MORE,"Could not iterator of proposals");
return status;
}
/* every proposal is processed (iterative call )*/
length_of_sa_payload += (after_generate_position_offset - before_generate_position_offset);
}
iterator->destroy(iterator);
- this->logger->log(this->logger,CONTROL_MORE,"Length of Payload is %d, offset is %d",length_of_sa_payload,payload_length_position_offset);
+ this->logger->log(this->logger,CONTROL|MORE,"Length of Payload is %d, offset is %d",length_of_sa_payload,payload_length_position_offset);
int16_val = htons(length_of_sa_payload);
status = this->write_bytes_to_buffer_at_offset(this,&int16_val,sizeof(u_int16_t),payload_length_position_offset);
if (status != SUCCESS)
{
- this->logger->log(this->logger,CONTROL_MORE,"Could no write payload length into buffer");
+ this->logger->log(this->logger,CONTROL|MORE,"Could no write payload length into buffer");
return status;
}
break;
linked_list_t *transforms = *((linked_list_t **)(this->data_struct + rules[i].offset));
linked_list_iterator_t *iterator;
- this->logger->log(this->logger,CONTROL_MORE,"Generate Transforms");
+ this->logger->log(this->logger,CONTROL|MORE,"Generate Transforms");
/* create forward iterator */
status = transforms->create_iterator(transforms,&iterator,TRUE);
iterator->destroy(iterator);
- this->logger->log(this->logger,CONTROL_MORE,"Length of Transform is %d, offset is %d",length_of_proposal,payload_length_position_offset);
+ this->logger->log(this->logger,CONTROL|MORE,"Length of Transform is %d, offset is %d",length_of_proposal,payload_length_position_offset);
int16_val = htons(length_of_proposal);
this->write_bytes_to_buffer_at_offset(this,&int16_val,sizeof(u_int16_t),payload_length_position_offset);
}
case TRANSFORM_ATTRIBUTES:
{
- this->logger->log(this->logger,CONTROL_MORE,"Generate Transform attributes");
+ this->logger->log(this->logger,CONTROL|MORE,"Generate Transform attributes");
/* before iterative generate the transform attributes, store the current length position */
u_int32_t transform_length_position_offset = this->last_payload_length_position_offset;
iterator->destroy(iterator);
- this->logger->log(this->logger,CONTROL_MORE,"Length of Transform is %d, offset is %d",length_of_transform,transform_length_position_offset);
+ this->logger->log(this->logger,CONTROL|MORE,"Length of Transform is %d, offset is %d",length_of_transform,transform_length_position_offset);
int16_val = htons(length_of_transform);
this->write_bytes_to_buffer_at_offset(this,&int16_val,sizeof(u_int16_t),transform_length_position_offset);
case ATTRIBUTE_LENGTH_OR_VALUE:
{
- this->logger->log(this->logger,CONTROL_MORE,"Generate Attribute Length or Value field");
+ this->logger->log(this->logger,CONTROL|MORE,"Generate Attribute Length or Value field");
if (this->attribute_format == FALSE)
{
status = this->generate_u_int_type(this,U_INT_16,rules[i].offset);
{
if (this->attribute_format == FALSE)
{
- this->logger->log(this->logger,CONTROL_MORE,"Attribute value has not fixed size");
+ this->logger->log(this->logger,CONTROL|MORE,"Attribute value has not fixed size");
/* the attribute value is generated */
status = this->generate_from_chunk(this,rules[i].offset);
}
break;
}
default:
- this->logger->log(this->logger,CONTROL_MORE,"Field Type %s is not supported",mapping_find(encoding_type_m,rules[i].type));
+ this->logger->log(this->logger,CONTROL|MORE,"Field Type %s is not supported",mapping_find(encoding_type_m,rules[i].type));
return NOT_SUPPORTED;
}
}
status_t status;
/* @TODO Add Message Processing here */
- this->logger->log(this->logger, CONTROL_MORE, "Process message of exchange type %s",mapping_find(exchange_type_m,message->get_exchange_type(message)));
+ this->logger->log(this->logger, CONTROL|MORE, "Process message of exchange type %s",mapping_find(exchange_type_m,message->get_exchange_type(message)));
/* parse body */
status = message->parse_body(message);
linked_list_iterator_t *iterator;
status_t status;
- this->logger->log(this->logger, CONTROL_MORE, "building sa payload");
+ this->logger->log(this->logger, CONTROL|MORE, "building sa payload");
sa_payload = sa_payload_create();
if (sa_payload == NULL)
chunk_t key_data;
- this->logger->log(this->logger, CONTROL_MORE, "building ke payload");
+ this->logger->log(this->logger, CONTROL|MORE, "building ke payload");
key_data.ptr = "12345";
key_data.len = strlen("12345");
nonce_payload_t *nonce_payload;
chunk_t nonce;
- this->logger->log(this->logger, CONTROL_MORE, "building nonce payload");
+ this->logger->log(this->logger, CONTROL|MORE, "building nonce payload");
if (this->randomizer->allocate_pseudo_random_bytes(this->randomizer, 16, &nonce) != SUCCESS)
{
/* can we give this out to new requesters?*/
if (entry->driveout_new_threads)
{
- this->logger->log(this->logger,CONTROL_MORE,"Drive out new thread for existing IKE_SA");
+ this->logger->log(this->logger,CONTROL|MORE,"Drive out new thread for existing IKE_SA");
/* no we can't */
retval = NOT_FOUND;
}
{
/* we must signal here, others are interested that we leave */
pthread_cond_signal(&(entry->condvar));
- this->logger->log(this->logger,CONTROL_MORE,"Drive out waiting thread for existing IKE_SA");
+ this->logger->log(this->logger,CONTROL|MORE,"Drive out waiting thread for existing IKE_SA");
retval = NOT_FOUND;
}
else
else
{
/* responder set, initiator not: here is something seriously wrong! */
- this->logger->log(this->logger,CONTROL_MORE,"Invalid IKE_SA SPI's");
+ this->logger->log(this->logger,CONTROL|MORE,"Invalid IKE_SA SPI's");
/* DON'T use return, we must unlock the mutex! */
retval = INVALID_ARG;
}
status = iterator->current(iterator,(void **)¤t_payload);
if (status != SUCCESS)
{
- this->logger->log(this->logger, CONTROL_MORE, "Could not get payload from internal list");
+ this->logger->log(this->logger, CONTROL|MORE, "Could not get payload from internal list");
iterator->destroy(iterator);
return status;
}
found_payloads++;
if (found_payloads > max_occurence)
{
- this->logger->log(this->logger, CONTROL_MORE, "Payload of type %s more than %d times (%d) occured in current message",
+ this->logger->log(this->logger, CONTROL|MORE, "Payload of type %s more than %d times (%d) occured in current message",
mapping_find(payload_type_m,current_payload->get_type(current_payload)),max_occurence,found_payloads);
iterator->destroy(iterator);
return NOT_SUPPORTED;
}
if (found_payloads < min_occurence)
{
- this->logger->log(this->logger, CONTROL_MORE, "Payload of type %s not occured %d times",
+ this->logger->log(this->logger, CONTROL|MORE, "Payload of type %s not occured %d times",
mapping_find(payload_type_m,payload_type),min_occurence);
iterator->destroy(iterator);
return NOT_SUPPORTED;
{
payload_t *payload;
iterator->current(iterator, (void**)&payload);
- this->logger->log(this->logger, CONTROL_MORE, "Destroying payload of type %s",
+ this->logger->log(this->logger, CONTROL|MORE, "Destroying payload of type %s",
mapping_find(payload_type_m, payload->get_type(payload)));
payload->destroy(payload);
}
for (rule_number = 0; rule_number < rule_count; rule_number++)
{
rule = &(this->rules[rule_number]);
- this->logger->log(this->logger, CONTROL_MORE, " parsing rule %d %s",
+ this->logger->log(this->logger, CONTROL|MORE, " parsing rule %d %s",
rule_number, mapping_find(encoding_type_m, rule->type));
switch (rule->type)
{
}
this->logger = global_logger_manager->create_logger(global_logger_manager, PARSER, NULL);
- this->logger->enable_level(this->logger, CONTROL|CONTROL_MORE|ERROR|RAW);
+ this->logger->enable_level(this->logger, CONTROL|MORE|ERROR|RAW);
if (this->logger == NULL)
/* cancellation disabled by default */
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);
- this->logger->log(this->logger, CONTROL_MORE, "thread %u started working", pthread_self());
+ this->logger->log(this->logger, CONTROL|MORE, "thread %u started working", pthread_self());
for (;;) {
job_t *job;
global_job_queue->get(global_job_queue, &job);
job_type = job->get_type(job);
- this->logger->log(this->logger, CONTROL_MORE, "thread %u got a job of type %s", pthread_self(),mapping_find(job_type_m,job_type));
+ this->logger->log(this->logger, CONTROL|MORE, "thread %u got a job of type %s", pthread_self(),mapping_find(job_type_m,job_type));
/* process them here */
switch (job_type)
if (incoming_packet_job->get_packet(incoming_packet_job,&packet) != SUCCESS)
{
- this->logger->log(this->logger, CONTROL_MORE, "thread %u: Packet in job of type %s could not be retrieved!", pthread_self(),mapping_find(job_type_m,job_type));
+ this->logger->log(this->logger, CONTROL|MORE, "thread %u: Packet in job of type %s could not be retrieved!", pthread_self(),mapping_find(job_type_m,job_type));
break;
}
message = message_create_from_packet(packet);
if (message == NULL)
{
- this->logger->log(this->logger, CONTROL_MORE, "thread %u: Message could not be created from packet!", pthread_self(),mapping_find(job_type_m,job_type));
+ this->logger->log(this->logger, CONTROL|MORE, "thread %u: Message could not be created from packet!", pthread_self(),mapping_find(job_type_m,job_type));
packet->destroy(packet);
break;
}
status = message->parse_header(message);
if (status != SUCCESS)
{
- this->logger->log(this->logger, CONTROL_MORE, "thread %u: Message header could not be verified!", pthread_self());
+ this->logger->log(this->logger, CONTROL|MORE, "thread %u: Message header could not be verified!", pthread_self());
message->destroy(message);
break;
}
if ((message->get_major_version(message) != IKE_MAJOR_VERSION) || (message->get_minor_version(message) != IKE_MINOR_VERSION))
{
- this->logger->log(this->logger, CONTROL_MORE, "thread %u: IKE Version %d.%d not supported", pthread_self(),message->get_major_version(message),message->get_minor_version(message));
+ this->logger->log(this->logger, CONTROL|MORE, "thread %u: IKE Version %d.%d not supported", pthread_self(),message->get_major_version(message),message->get_minor_version(message));
/* Todo send notify */
}
status = message->get_ike_sa_id(message,&ike_sa_id);
if (status != SUCCESS)
{
- this->logger->log(this->logger, CONTROL_MORE, "thread %u: IKE SA ID of message could not be created!", pthread_self());
+ this->logger->log(this->logger, CONTROL|MORE, "thread %u: IKE SA ID of message could not be created!", pthread_self());
message->destroy(message);
break;
}
status = global_ike_sa_manager->checkout(global_ike_sa_manager,ike_sa_id, &ike_sa);
if (status != SUCCESS)
{
- this->logger->log(this->logger, CONTROL_MORE, "thread %u: IKE SA could not be checked out", pthread_self());
+ this->logger->log(this->logger, CONTROL|MORE, "thread %u: IKE SA could not be checked out", pthread_self());
message->destroy(message);
break;
}
u_int64_t responder;
bool is_initiator;
checked_out_ike_sa_id->get_values(checked_out_ike_sa_id,&initiator,&responder,&is_initiator);
- this->logger->log(this->logger, CONTROL_MORE, "IKE SA with SPI's I:%d, R:%d checked out", initiator,responder);
+ this->logger->log(this->logger, CONTROL|MORE, "IKE SA with SPI's I:%d, R:%d checked out", initiator,responder);
}
status = ike_sa->process_message (ike_sa,message);
if (status != SUCCESS)
{
- this->logger->log(this->logger, CONTROL_MORE, "thread %u: Message could not be processed by IKE SA", pthread_self());
+ this->logger->log(this->logger, CONTROL|MORE, "thread %u: Message could not be processed by IKE SA", pthread_self());
}
status = global_ike_sa_manager->checkin(global_ike_sa_manager,ike_sa);
if (status != SUCCESS){
- this->logger->log(this->logger, CONTROL_MORE, "thread %u: Checkin of IKE SA return errors", pthread_self());
+ this->logger->log(this->logger, CONTROL|MORE, "thread %u: Checkin of IKE SA return errors", pthread_self());
}
message->destroy(message);
ike_sa_id->destroy(ike_sa_id);
}
case RETRANSMIT_REQUEST:
{
- this->logger->log(this->logger, CONTROL_MORE, "thread %u: Job of type %s not supported!", pthread_self(),mapping_find(job_type_m,job_type));
+ this->logger->log(this->logger, CONTROL|MORE, "thread %u: Job of type %s not supported!", pthread_self(),mapping_find(job_type_m,job_type));
break;
}
u_int64_t responder;
bool is_initiator;
ike_sa_id->get_values(ike_sa_id,&initiator,&responder,&is_initiator);
- this->logger->log(this->logger, CONTROL_MORE, "thread %u: Going to delete IKE SA with SPI's I:%d, R:%d", pthread_self(),initiator,responder);
+ this->logger->log(this->logger, CONTROL|MORE, "thread %u: Going to delete IKE SA with SPI's I:%d, R:%d", pthread_self(),initiator,responder);
}
status = global_ike_sa_manager->delete(global_ike_sa_manager, ike_sa_id);
if (status != SUCCESS)
#include "../types.h"
/**
- * Log Levels supported by the logger object
+ * @brief Log Levels supported by the logger object
+ *
+ * Logleves are devided in two types:
+ * - One to specify the type log
+ * - One to specify the detail-level of the log
+ * Use combinations of these to build detailed loglevels, such
+ * 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 {
/**
- * basic control messages
+ * control flow
*/
CONTROL = 1,
/**
- * detailed control messages
+ * error reporting
*/
- CONTROL_MORE = 2,
+ ERROR = 2,
/**
- * raw data dumps not containing private data
+ * raw data dumps
*/
RAW = 4,
/**
* private data dumps
*/
PRIVATE = 8,
+
+ /**
+ * use more detailed output for those above
+ */
+ MORE = 16,
+ /**
+ * use even more detailed output
+ */
+ MOST = MORE + 32,
/**
- * print errors
+ * use full detailed output
*/
- ERROR = 16,
+ ALL = MOST + 64,
/**
- * All Lol Levels
+ * Summary for all types with all detail-levels
*/
- ALL = 255
+ FULL = ALL + CONTROL + ERROR + RAW + PRIVATE
};
/**