Mixes for Privacy and Anonymity in the Internet
|
Classes | |
struct | event |
struct | state |
Macros | |
#define | STATUS_FLAG(status_type) (1<<(unsigned int)status_type) |
All state and transition definitions can be found here The server monitoring observes different states for multiple status types. More... | |
#define | FIRST_STATUS 0 |
#define | FIRST_EVENT 0 |
#define | ENTRY_STATE 0 |
#define | DOM_ELEMENT_STATUS_MESSAGE_NAME "StatusMessage" |
#define | DOM_ELEMENT_STATE_NAME "State" |
#define | DOM_ELEMENT_STATE_LEVEL_NAME "StateLevel" |
#define | DOM_ELEMENT_STATE_DESCRIPTION_NAME "StateDescription" |
#define | MAX_DESCRIPTION_LENGTH 50 |
#define | MONITORING_SERVER_PORT 8080 |
#define | XML_STATUS_MESSAGE_MAX_SIZE 3000 |
#define | XML_STATUS_MESSAGE_START "<StatusMessage>" |
#define | HTTP_ANSWER_PREFIX_FORMAT "HTTP/1.1 200 OK\nContent-Length: %u\nConnection: close\nContent-Type: text/xml; charset=UTF-8\n\n" |
#define | HTTP_ANSWER_PREFIX_MAX_LENGTH 100 |
#define | EVER 1 |
#define | NR_STATUS_TYPES stat_all |
#define | NETWORKING_STATUS_NAME "NetworkingStatus" |
#define | NR_NETWORKING_STATES st_net_overall |
#define | NR_NETWORKING_EVENTS ev_net_overall |
#define | SYSTEM_STATUS_NAME "SystemStatus" |
#define | NR_SYSTEM_STATES st_sys_overall |
#define | NR_SYSTEM_EVENTS ev_sys_overall |
#define | NR_STATE_LEVELS stl_all |
#define | FINISH_STATE_DEFINITIONS(state_array) |
helper macros for defining states and events: More... | |
#define | FINISH_EVENT_DEFINITIONS(event_array) |
#define | FINISH_NETWORKING_STATE_DEFINITIONS(state_array) |
#define | FINISH_NETWORKING_EVENT_DEFINITIONS(event_array) |
#define | FINISH_PAYMENT_STATE_DEFINITIONS(state_array) |
#define | FINISH_PAYMENT_EVENT_DEFINITIONS(event_array) |
#define | FINISH_SYSTEM_STATE_DEFINITIONS(state_array) |
#define | FINISH_SYSTEM_EVENT_DEFINITIONS(event_array) |
#define | NET_STATE_DEF(state_array, state_type, description, transitions, stateLevel) STATE_DEF(state_array, stat_networking, state_type, description, transitions, stateLevel) |
#define | NET_EVENT_DEF(event_array, event_type, description) EVENT_DEF(event_array, stat_networking, event_type, description) |
#define | PAY_STATE_DEF(state_array, state_type, description, transitions, stateLevel) |
#define | PAY_EVENT_DEF(event_array, event_type, description) |
#define | SYS_STATE_DEF(state_array, state_type, description, transitions, stateLevel) STATE_DEF(state_array, stat_system, state_type, description, transitions, stateLevel) |
#define | SYS_EVENT_DEF(event_array, event_type, description) EVENT_DEF(event_array, stat_system, event_type, description) |
#define | STATE_DEF(state_array, status_type, state_type, description, transitions, stateLevel) |
#define | EVENT_DEF(event_array, status_type, event_type, description) event_array[status_type][event_type]->ev_description = (char *) description; |
#define | TRANS_NET_ENTRY |
NETWORKING STATE TRANSITIONS. More... | |
#define | TRANS_NET_FIRST_MIX_INIT |
#define | TRANS_NET_FIRST_MIX_CONNECTED_TO_NEXT |
#define | TRANS_NET_FIRST_MIX_ONLINE |
#define | TRANS_NET_MIDDLE_MIX_INIT |
#define | TRANS_NET_MIDDLE_MIX_CONNECTED_TO_PREV |
#define | TRANS_NET_MIDDLE_MIX_CONNECTED_TO_NEXT |
#define | TRANS_NET_MIDDLE_MIX_ONLINE |
#define | TRANS_NET_LAST_MIX_INIT |
#define | TRANS_NET_LAST_MIX_CONNECTED_TO_PREV |
#define | TRANS_NET_LAST_MIX_ONLINE |
#define | TRANS_SYS_ENTRY |
SYSTEM STATE TRANSITIONS. More... | |
#define | TRANS_SYS_INITIALIZING |
#define | TRANS_SYS_OPERATING |
#define | TRANS_SYS_RESTARTING |
#define | TRANS_SYS_SHUTTING_DOWN |
#define | TRANS_SYS_SHUTTING_DOWN_AFTER_SEG_FAULT (defineTransitions(stat_system, 0)) |
Typedefs | |
typedef enum state_type | state_type_t |
typedef enum status_type | status_type_t |
typedef enum state_type | transition_t |
typedef enum event_type | event_type_t |
typedef enum state_level | state_level_t |
typedef struct state | state_t |
typedef struct event | event_t |
Functions | |
transition_t * | defineTransitions (status_type_t s_type, int transitionCount,...) |
a convenience function for easily defining state transitions More... | |
Variables | |
static const char * | STATUS_NAMES [NR_STATUS_TYPES] |
static const int | EVENT_COUNT [NR_STATUS_TYPES] |
static const int | STATE_COUNT [NR_STATUS_TYPES] |
static const char * | STATUS_LEVEL_NAMES [NR_STATE_LEVELS] |
#define DOM_ELEMENT_STATE_DESCRIPTION_NAME "StateDescription" |
#define DOM_ELEMENT_STATE_LEVEL_NAME "StateLevel" |
#define DOM_ELEMENT_STATE_NAME "State" |
#define DOM_ELEMENT_STATUS_MESSAGE_NAME "StatusMessage" |
#define ENTRY_STATE 0 |
#define EVENT_DEF | ( | event_array, | |
status_type, | |||
event_type, | |||
description | |||
) | event_array[status_type][event_type]->ev_description = (char *) description; |
#define EVER 1 |
#define FINISH_EVENT_DEFINITIONS | ( | event_array | ) |
#define FINISH_NETWORKING_EVENT_DEFINITIONS | ( | event_array | ) |
#define FINISH_NETWORKING_STATE_DEFINITIONS | ( | state_array | ) |
#define FINISH_PAYMENT_EVENT_DEFINITIONS | ( | event_array | ) |
#define FINISH_PAYMENT_STATE_DEFINITIONS | ( | state_array | ) |
#define FINISH_STATE_DEFINITIONS | ( | state_array | ) |
helper macros for defining states and events:
#define FINISH_SYSTEM_EVENT_DEFINITIONS | ( | event_array | ) |
#define FINISH_SYSTEM_STATE_DEFINITIONS | ( | state_array | ) |
#define FIRST_EVENT 0 |
#define FIRST_STATUS 0 |
#define HTTP_ANSWER_PREFIX_FORMAT "HTTP/1.1 200 OK\nContent-Length: %u\nConnection: close\nContent-Type: text/xml; charset=UTF-8\n\n" |
#define HTTP_ANSWER_PREFIX_MAX_LENGTH 100 |
#define MAX_DESCRIPTION_LENGTH 50 |
#define MONITORING_SERVER_PORT 8080 |
#define NET_EVENT_DEF | ( | event_array, | |
event_type, | |||
description | |||
) | EVENT_DEF(event_array, stat_networking, event_type, description) |
#define NET_STATE_DEF | ( | state_array, | |
state_type, | |||
description, | |||
transitions, | |||
stateLevel | |||
) | STATE_DEF(state_array, stat_networking, state_type, description, transitions, stateLevel) |
#define NETWORKING_STATUS_NAME "NetworkingStatus" |
#define NR_NETWORKING_EVENTS ev_net_overall |
#define NR_NETWORKING_STATES st_net_overall |
#define NR_STATE_LEVELS stl_all |
#define NR_STATUS_TYPES stat_all |
#define NR_SYSTEM_EVENTS ev_sys_overall |
#define NR_SYSTEM_STATES st_sys_overall |
#define PAY_EVENT_DEF | ( | event_array, | |
event_type, | |||
description | |||
) |
#define PAY_STATE_DEF | ( | state_array, | |
state_type, | |||
description, | |||
transitions, | |||
stateLevel | |||
) |
#define STATE_DEF | ( | state_array, | |
status_type, | |||
state_type, | |||
description, | |||
transitions, | |||
stateLevel | |||
) |
#define STATUS_FLAG | ( | status_type | ) | (1<<(unsigned int)status_type) |
All state and transition definitions can be found here The server monitoring observes different states for multiple status types.
The status types are currently:
"System" reflects general information about the actual state of the mix process.
A state has a level that shows if the current state of a mix is ok, unknown or critical. To realize a state machine events can be defined here. The events can be linked with states to realize transitions from one state to another if an event is fired.
Several macros can be found here for the definition of status types, states and events. Transitions can also be realized via macros.
#define SYS_EVENT_DEF | ( | event_array, | |
event_type, | |||
description | |||
) | EVENT_DEF(event_array, stat_system, event_type, description) |
#define SYS_STATE_DEF | ( | state_array, | |
state_type, | |||
description, | |||
transitions, | |||
stateLevel | |||
) | STATE_DEF(state_array, stat_system, state_type, description, transitions, stateLevel) |
#define SYSTEM_STATUS_NAME "SystemStatus" |
#define TRANS_NET_ENTRY |
NETWORKING STATE TRANSITIONS.
#define TRANS_NET_FIRST_MIX_CONNECTED_TO_NEXT |
#define TRANS_NET_FIRST_MIX_INIT |
#define TRANS_NET_FIRST_MIX_ONLINE |
#define TRANS_NET_LAST_MIX_CONNECTED_TO_PREV |
#define TRANS_NET_LAST_MIX_INIT |
#define TRANS_NET_LAST_MIX_ONLINE |
#define TRANS_NET_MIDDLE_MIX_CONNECTED_TO_NEXT |
#define TRANS_NET_MIDDLE_MIX_CONNECTED_TO_PREV |
#define TRANS_NET_MIDDLE_MIX_INIT |
#define TRANS_NET_MIDDLE_MIX_ONLINE |
#define TRANS_SYS_ENTRY |
SYSTEM STATE TRANSITIONS.
#define TRANS_SYS_INITIALIZING |
#define TRANS_SYS_OPERATING |
#define TRANS_SYS_RESTARTING |
#define TRANS_SYS_SHUTTING_DOWN |
#define TRANS_SYS_SHUTTING_DOWN_AFTER_SEG_FAULT (defineTransitions(stat_system, 0)) |
#define XML_STATUS_MESSAGE_MAX_SIZE 3000 |
#define XML_STATUS_MESSAGE_START "<StatusMessage>" |
typedef enum event_type event_type_t |
typedef enum state_level state_level_t |
typedef enum state_type state_type_t |
typedef enum status_type status_type_t |
typedef enum state_type transition_t |
enum event_type |
enum state_level |
enum state_type |
enum status_type |
transition_t* defineTransitions | ( | status_type_t | s_type, |
int | transitionCount, | ||
... | |||
) |
a convenience function for easily defining state transitions
s_type | the status type of the state for which the transitions are to be defined |
transitionCount | the number of transitions to define |
... | an event_type (of type event_type_t) followed by a state transition (of type transition_t) IMPORTANT: an event type MUST be followed by a state transition! |
|
static |
|
static |
|
static |
|
static |