Mixe for Privacy and Anonymity in the Internet
|
Go to the source code of this file.
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... | |
#define DOM_ELEMENT_STATE_DESCRIPTION_NAME "StateDescription" |
Definition at line 60 of file monitoringDefs.h.
#define DOM_ELEMENT_STATE_LEVEL_NAME "StateLevel" |
Definition at line 59 of file monitoringDefs.h.
#define DOM_ELEMENT_STATE_NAME "State" |
Definition at line 58 of file monitoringDefs.h.
#define DOM_ELEMENT_STATUS_MESSAGE_NAME "StatusMessage" |
Definition at line 57 of file monitoringDefs.h.
#define ENTRY_STATE 0 |
Definition at line 55 of file monitoringDefs.h.
#define EVENT_DEF | ( | event_array, | |
status_type, | |||
event_type, | |||
description | |||
) | event_array[status_type][event_type]->ev_description = (char *) description; |
Definition at line 421 of file monitoringDefs.h.
#define EVER 1 |
Definition at line 71 of file monitoringDefs.h.
#define FINISH_EVENT_DEFINITIONS | ( | event_array | ) |
Definition at line 226 of file monitoringDefs.h.
#define FINISH_NETWORKING_EVENT_DEFINITIONS | ( | event_array | ) |
Definition at line 271 of file monitoringDefs.h.
#define FINISH_NETWORKING_STATE_DEFINITIONS | ( | state_array | ) |
Definition at line 235 of file monitoringDefs.h.
#define FINISH_PAYMENT_EVENT_DEFINITIONS | ( | event_array | ) |
Definition at line 347 of file monitoringDefs.h.
#define FINISH_PAYMENT_STATE_DEFINITIONS | ( | state_array | ) |
Definition at line 346 of file monitoringDefs.h.
#define FINISH_STATE_DEFINITIONS | ( | state_array | ) |
helper macros for defining states and events:
Definition at line 221 of file monitoringDefs.h.
#define FINISH_SYSTEM_EVENT_DEFINITIONS | ( | event_array | ) |
Definition at line 375 of file monitoringDefs.h.
#define FINISH_SYSTEM_STATE_DEFINITIONS | ( | state_array | ) |
Definition at line 354 of file monitoringDefs.h.
#define FIRST_EVENT 0 |
Definition at line 54 of file monitoringDefs.h.
#define FIRST_STATUS 0 |
Definition at line 53 of file monitoringDefs.h.
#define HTTP_ANSWER_PREFIX_FORMAT "HTTP/1.1 200 OK\nContent-Length: %u\nConnection: close\nContent-Type: text/xml; charset=UTF-8\n\n" |
Definition at line 67 of file monitoringDefs.h.
#define HTTP_ANSWER_PREFIX_MAX_LENGTH 100 |
Definition at line 69 of file monitoringDefs.h.
#define MAX_DESCRIPTION_LENGTH 50 |
Definition at line 62 of file monitoringDefs.h.
#define MONITORING_SERVER_PORT 8080 |
Definition at line 63 of file monitoringDefs.h.
#define NET_EVENT_DEF | ( | event_array, | |
event_type, | |||
description | |||
) | EVENT_DEF(event_array, stat_networking, event_type, description) |
Definition at line 393 of file monitoringDefs.h.
#define NET_STATE_DEF | ( | state_array, | |
state_type, | |||
description, | |||
transitions, | |||
stateLevel | |||
) | STATE_DEF(state_array, stat_networking, state_type, description, transitions, stateLevel) |
Definition at line 390 of file monitoringDefs.h.
#define NETWORKING_STATUS_NAME "NetworkingStatus" |
Definition at line 143 of file monitoringDefs.h.
#define NR_NETWORKING_EVENTS ev_net_overall |
Definition at line 145 of file monitoringDefs.h.
#define NR_NETWORKING_STATES st_net_overall |
Definition at line 144 of file monitoringDefs.h.
#define NR_STATE_LEVELS stl_all |
Definition at line 185 of file monitoringDefs.h.
#define NR_STATUS_TYPES stat_all |
Definition at line 85 of file monitoringDefs.h.
#define NR_SYSTEM_EVENTS ev_sys_overall |
Definition at line 149 of file monitoringDefs.h.
#define NR_SYSTEM_STATES st_sys_overall |
Definition at line 148 of file monitoringDefs.h.
#define PAY_EVENT_DEF | ( | event_array, | |
event_type, | |||
description | |||
) |
Definition at line 404 of file monitoringDefs.h.
#define PAY_STATE_DEF | ( | state_array, | |
state_type, | |||
description, | |||
transitions, | |||
stateLevel | |||
) |
Definition at line 403 of file monitoringDefs.h.
#define STATE_DEF | ( | state_array, | |
status_type, | |||
state_type, | |||
description, | |||
transitions, | |||
stateLevel | |||
) |
Definition at line 416 of file monitoringDefs.h.
#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.
Definition at line 51 of file monitoringDefs.h.
#define SYS_EVENT_DEF | ( | event_array, | |
event_type, | |||
description | |||
) | EVENT_DEF(event_array, stat_system, event_type, description) |
Definition at line 410 of file monitoringDefs.h.
#define SYS_STATE_DEF | ( | state_array, | |
state_type, | |||
description, | |||
transitions, | |||
stateLevel | |||
) | STATE_DEF(state_array, stat_system, state_type, description, transitions, stateLevel) |
Definition at line 407 of file monitoringDefs.h.
#define SYSTEM_STATUS_NAME "SystemStatus" |
Definition at line 147 of file monitoringDefs.h.
#define TRANS_NET_ENTRY |
NETWORKING STATE TRANSITIONS.
Definition at line 440 of file monitoringDefs.h.
#define TRANS_NET_FIRST_MIX_CONNECTED_TO_NEXT |
Definition at line 452 of file monitoringDefs.h.
#define TRANS_NET_FIRST_MIX_INIT |
Definition at line 447 of file monitoringDefs.h.
#define TRANS_NET_FIRST_MIX_ONLINE |
Definition at line 458 of file monitoringDefs.h.
#define TRANS_NET_LAST_MIX_CONNECTED_TO_PREV |
Definition at line 493 of file monitoringDefs.h.
#define TRANS_NET_LAST_MIX_INIT |
Definition at line 488 of file monitoringDefs.h.
#define TRANS_NET_LAST_MIX_ONLINE |
Definition at line 500 of file monitoringDefs.h.
#define TRANS_NET_MIDDLE_MIX_CONNECTED_TO_NEXT |
Definition at line 474 of file monitoringDefs.h.
#define TRANS_NET_MIDDLE_MIX_CONNECTED_TO_PREV |
Definition at line 468 of file monitoringDefs.h.
#define TRANS_NET_MIDDLE_MIX_INIT |
Definition at line 463 of file monitoringDefs.h.
#define TRANS_NET_MIDDLE_MIX_ONLINE |
Definition at line 482 of file monitoringDefs.h.
#define TRANS_SYS_ENTRY |
SYSTEM STATE TRANSITIONS.
Definition at line 571 of file monitoringDefs.h.
#define TRANS_SYS_INITIALIZING |
Definition at line 576 of file monitoringDefs.h.
#define TRANS_SYS_OPERATING |
Definition at line 584 of file monitoringDefs.h.
#define TRANS_SYS_RESTARTING |
Definition at line 592 of file monitoringDefs.h.
#define TRANS_SYS_SHUTTING_DOWN |
Definition at line 600 of file monitoringDefs.h.
#define TRANS_SYS_SHUTTING_DOWN_AFTER_SEG_FAULT (defineTransitions(stat_system, 0)) |
Definition at line 605 of file monitoringDefs.h.
#define XML_STATUS_MESSAGE_MAX_SIZE 3000 |
Definition at line 64 of file monitoringDefs.h.
#define XML_STATUS_MESSAGE_START "<StatusMessage>" |
Definition at line 66 of file monitoringDefs.h.
Definition at line 187 of file monitoringDefs.h.
typedef enum event_type event_type_t |
Definition at line 187 of file monitoringDefs.h.
typedef enum state_level state_level_t |
Definition at line 187 of file monitoringDefs.h.
Definition at line 187 of file monitoringDefs.h.
typedef enum state_type state_type_t |
Definition at line 187 of file monitoringDefs.h.
typedef enum status_type status_type_t |
Definition at line 187 of file monitoringDefs.h.
typedef enum state_type transition_t |
Definition at line 187 of file monitoringDefs.h.
enum event_type |
Definition at line 114 of file monitoringDefs.h.
enum state_level |
Enumerator | |
---|---|
stl_ok | |
stl_warning | |
stl_critical | |
stl_unknown | |
stl_all |
Definition at line 180 of file monitoringDefs.h.
enum state_type |
Definition at line 88 of file monitoringDefs.h.
enum status_type |
Enumerator | |
---|---|
stat_undef | |
stat_networking | |
stat_system | |
stat_all |
Definition at line 74 of file monitoringDefs.h.
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! |