Asterisk - The Open Source Telephony Project GIT-master-d856a3e
|
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... | |
const 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... | |
const 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... | |
struct stasis_message_type * | ast_security_event_type (void) |
A stasis_message_type for security events. More... | |
int | ast_security_stasis_init (void) |
initializes stasis topic/event types for ast_security_topic and ast_security_event_type More... | |
struct stasis_topic * | ast_security_topic (void) |
A stasis_topic which publishes messages for security related issues. 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 895 of file main/security_events.c.
References check_event_type(), NULL, and sec_events.
Referenced by add_json_object(), ast_security_event_report(), gen_events(), security_event_stasis_cb(), and security_event_to_ami_blob().
const 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 914 of file main/security_events.c.
References check_event_type(), NULL, and sec_events.
Referenced by handle_security_event(), security_event_stasis_cb(), and security_event_to_ami_blob().
const 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 904 of file main/security_events.c.
References check_event_type(), NULL, and sec_events.
Referenced by handle_security_event(), security_event_stasis_cb(), and security_event_to_ami_blob().
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 1171 of file main/security_events.c.
References ast_log, ast_security_event_get_name(), 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 ast_sip_report_auth_challenge_sent(), ast_sip_report_auth_failed_challenge_response(), ast_sip_report_auth_success(), ast_sip_report_failed_acl(), ast_sip_report_invalid_endpoint(), ast_sip_report_mem_limit(), ast_sip_report_req_no_support(), evt_gen_auth_method_not_allowed(), evt_gen_chal_resp_failed(), evt_gen_chal_sent(), evt_gen_failed_acl(), evt_gen_inval_acct_id(), evt_gen_inval_password(), evt_gen_inval_transport(), evt_gen_load_avg(), evt_gen_mem_limit(), evt_gen_req_bad_format(), evt_gen_req_no_support(), evt_gen_req_not_allowed(), evt_gen_session_limit(), evt_gen_successful_auth(), evt_gen_unexpected_addr(), 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 871 of file main/security_events.c.
References ARRAY_LEN, NULL, severities, and severity.
Referenced by alloc_security_event_json_object().
struct stasis_message_type * ast_security_event_type | ( | void | ) |
A stasis_message_type for security events.
NULL | on error |
int ast_security_stasis_init | ( | void | ) |
initializes stasis topic/event types for ast_security_topic and ast_security_event_type
0 | on success |
-1 | on failure |
Definition at line 483 of file main/security_events.c.
References ast_register_cleanup(), security_stasis_cleanup(), security_topic, STASIS_MESSAGE_TYPE_INIT, and stasis_topic_create().
Referenced by asterisk_daemon().
struct stasis_topic * ast_security_topic | ( | void | ) |
A stasis_topic which publishes messages for security related issues.
NULL | on error |
Definition at line 380 of file main/security_events.c.
References security_topic.
Referenced by acl_change_stasis_subscribe(), ast_res_pjsip_initialize_configuration(), common_config_load(), handle_security_event(), load_module(), manager_subscriptions_init(), publish_acl_change(), and rtp_reload().