Security Event Reporting API. More...
Go to the source code of this file.
Data Structures | |
struct | ast_security_event_ie_type |
Functions | |
const char * | ast_security_event_get_name (const enum ast_security_event_type event_type) |
Get the name of a security event sub-type. More... | |
struct ast_security_event_ie_type * | ast_security_event_get_optional_ies (const enum ast_security_event_type event_type) |
Get the list of optional IEs for a given security event sub-type. More... | |
struct ast_security_event_ie_type * | ast_security_event_get_required_ies (const enum ast_security_event_type event_type) |
Get the list of required IEs for a given security event sub-type. More... | |
int | ast_security_event_report (const struct ast_security_event_common *sec) |
Report a security event. More... | |
const char * | ast_security_event_severity_get_name (const enum ast_security_event_severity severity) |
Get the name of a security event severity. More... | |
Security Event Reporting API.
Definition in file security_events.h.
const char* ast_security_event_get_name | ( | const enum ast_security_event_type | event_type | ) |
Get the name of a security event sub-type.
[in] | event_type | security event sub-type |
NULL | if event_type is invalid |
non-NULL | the name of the security event type |
Definition at line 387 of file security_events.c.
References check_event_type(), and sec_events.
Referenced by security_event_cb().
struct ast_security_event_ie_type* ast_security_event_get_optional_ies | ( | const enum ast_security_event_type | event_type | ) |
Get the list of optional IEs for a given security event sub-type.
[in] | event_type | security event sub-type |
NULL | invalid event_type |
non-NULL | An array terminated with the value AST_EVENT_IE_END |
Definition at line 406 of file security_events.c.
References check_event_type(), and sec_events.
Referenced by handle_security_event(), and security_event_cb().
struct ast_security_event_ie_type* ast_security_event_get_required_ies | ( | const enum ast_security_event_type | event_type | ) |
Get the list of required IEs for a given security event sub-type.
[in] | event_type | security event sub-type |
NULL | invalid event_type |
non-NULL | An array terminated with the value AST_EVENT_IE_END |
Definition at line 396 of file security_events.c.
References check_event_type(), and sec_events.
Referenced by handle_security_event(), and security_event_cb().
int ast_security_event_report | ( | const struct ast_security_event_common * | sec | ) |
Report a security event.
[in] | sec | security event data. Callers of this function should never declare an instance of ast_security_event_common directly. The argument should be an instance of a specific security event descriptor which has ast_security_event_common at the very beginning. |
0 | success |
non-zero | failure |
Definition at line 625 of file security_events.c.
References ast_log(), AST_SECURITY_EVENT_NUM_TYPES, ast_security_event_common::event_type, handle_security_event(), LOG_ERROR, LOG_WARNING, sec_events, and ast_security_event_common::version.
Referenced by report_auth_success(), report_failed_acl(), report_failed_challenge_response(), report_inval_password(), report_invalid_user(), report_req_bad_format(), report_req_not_allowed(), and report_session_limit().
const char* ast_security_event_severity_get_name | ( | const enum ast_security_event_severity | severity | ) |
Get the name of a security event severity.
[in] | severity | security event severity |
NULL | if severity is invalid |
non-NULL | the name of the security event severity |
Definition at line 363 of file security_events.c.
References ARRAY_LEN, and severities.
Referenced by alloc_event().