#include <haka/types.h>
#include <haka/time.h>
#include <haka/container/list.h>
Go to the source code of this file.
#define ALERT |
( |
|
name, |
|
|
|
nsrc, |
|
|
|
ntgt |
|
) |
| |
Value: sources: nsrc==0 ? NULL : _sources, \
targets: ntgt==0 ? NULL : _targets,
Utility macro to create a new alert.
- Parameters
-
name | Name of the variable that will be created. |
nsrc | Number of sources. |
ntgt | Number of targets. |
#define ALERT_METHOD_REF |
( |
|
alert, |
|
|
|
... |
|
) |
| |
Value:char *_method_ref[] = { __VA_ARGS__, NULL };
\ alert.method_ref = _method_ref
uint64 alert(const struct alert *alert)
Definition: alert.c:142
Add method references.
- Parameters
-
alert | Alert name. |
... | List of strings. |
#define ALERT_NODE |
( |
|
alert, |
|
|
|
name, |
|
|
|
index, |
|
|
|
type, |
|
|
|
... |
|
) |
| |
Value: alert.name[index] = &_node##name##index; \
char *_node##name##index_list[] = { __VA_ARGS__, NULL }; \
_node##name##index.
list = _node##name##index_list
alert_node_type type
Definition: alert.h:56
uint64 alert(const struct alert *alert)
Definition: alert.c:142
char ** list
Definition: alert.h:57
Create an alert node.
- Parameters
-
alert | Alert name. |
name | sources or target . |
index | Index of the node. |
type | Type of node (see :c:type:alert_node_type ). |
... | List of strings. |
#define ALERT_REF |
( |
|
alert, |
|
|
|
count, |
|
|
|
... |
|
) |
| |
Value:uint64 _alert_ref[count] = { __VA_ARGS__ };
\ alert.alert_ref_count = count;
\ alert.alert_ref = _alert_ref
uint64 alert(const struct alert *alert)
Definition: alert.c:142
unsigned HAKA_64BIT_TYPE uint64
Definition: types.h:30
Add alert references.
- Parameters
-
alert | Alert name. |
count | Number of references. |
... | List of alert ids. |
Finish the alert creation.
Alert completion.
Enumerator |
---|
HAKA_ALERT_COMPLETION_NONE |
Unset value.
|
HAKA_ALERT_FAILED |
The attack failed.
|
HAKA_ALERT_SUCCESSFUL |
The attach was successful.
|
HAKA_ALERT_COMPLETION_LAST |
Last alert completion value.
|
Alert level.
Enumerator |
---|
HAKA_ALERT_LEVEL_NONE |
Unset value.
|
HAKA_ALERT_LOW |
Low level.
|
HAKA_ALERT_MEDIUM |
Medium level.
|
HAKA_ALERT_HIGH |
High level.
|
HAKA_ALERT_NUMERIC |
Numeric level stored in the alert structure.
|
HAKA_ALERT_LEVEL_LAST |
Last alert level.
|
Alert node type.
Enumerator |
---|
HAKA_ALERT_NODE_ADDRESS |
Address node.
|
HAKA_ALERT_NODE_SERVICE |
Service node.
|
HAKA_ALERT_NODE_LAST |
Last alert node type.
|
Raise a new alert.
- Returns
- The alert unique id.
Convert alert completion to human readable string.
Convert alert level to human readable string.
Convert alert node to human readable string.
const char* alert_tostring |
( |
uint64 |
id, |
|
|
const struct time * |
time, |
|
|
const struct alert * |
alert, |
|
|
const char * |
header, |
|
|
const char * |
indent, |
|
|
bool |
color |
|
) |
| |
Convert an alert to a string.
Update an existing alert.
void enable_stdout_alert |
( |
bool |
enable | ) |
|
Enable display of alerts on stdout.
Remove an alert listener.
void remove_all_alerter |
( |
| ) |
|
Remove all alert listener.