| Asterisk - The Open Source Telephony Project GIT-master-27fb039
    | 
Security Event Logging. More...
#include "asterisk.h"#include "asterisk/module.h"#include "asterisk/logger.h"#include "asterisk/threadstorage.h"#include "asterisk/strings.h"#include "asterisk/security_events.h"#include "asterisk/stasis.h"#include "asterisk/json.h"
Go to the source code of this file.
| Enumerations | |
| enum | ie_required { NOT_REQUIRED , REQUIRED } | 
| Functions | |
| static void | __reg_module (void) | 
| static void | __unreg_module (void) | 
| static void | append_json (struct ast_str **str, struct ast_json *json, const struct ast_security_event_ie_type *ies, enum ie_required required) | 
| static void | append_json_single (struct ast_str **str, struct ast_json *json, const enum ast_event_ie_type ie_type, enum ie_required required) | 
| struct ast_module * | AST_MODULE_SELF_SYM (void) | 
| AST_THREADSTORAGE_CUSTOM_SCOPE (security_event_buf, NULL, ast_free_ptr, static) | |
| static int | load_module (void) | 
| static void | security_event_stasis_cb (struct ast_json *json) | 
| static void | security_stasis_cb (void *data, struct stasis_subscription *sub, struct stasis_message *message) | 
| static int | unload_module (void) | 
| Variables | |
| static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Security Event Logging" , .key = ASTERISK_GPL_KEY , .buildopt_sum = AST_BUILDOPT_SUM, .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_DEFAULT, .support_level = AST_MODULE_SUPPORT_CORE, } | 
| static const struct ast_module_info * | ast_module_info = &__mod_info | 
| static int | LOG_SECURITY | 
| static const char | LOG_SECURITY_NAME [] = "SECURITY" | 
| static const size_t | SECURITY_EVENT_BUF_INIT_LEN = 256 | 
| static struct stasis_subscription * | security_stasis_sub | 
Security Event Logging.
Make informational security events optional
Escape quotes in string payload IE contents
Definition in file res_security_log.c.
| enum ie_required | 
| Enumerator | |
|---|---|
| NOT_REQUIRED | |
| REQUIRED | |
Definition at line 53 of file res_security_log.c.
| 
 | static | 
Definition at line 165 of file res_security_log.c.
| 
 | static | 
Definition at line 165 of file res_security_log.c.
| 
 | static | 
Definition at line 80 of file res_security_log.c.
References append_json_single(), AST_EVENT_IE_END, ast_security_event_ie_type::ie_type, and str.
Referenced by security_event_stasis_cb().
| 
 | static | 
Definition at line 58 of file res_security_log.c.
References ast_assert, ast_event_get_ie_type_name(), ast_json_object_get(), ast_json_string_get(), ast_str_append(), NULL, and str.
Referenced by append_json().
| struct ast_module * AST_MODULE_SELF_SYM | ( | void | ) | 
Definition at line 165 of file res_security_log.c.
| AST_THREADSTORAGE_CUSTOM_SCOPE | ( | security_event_buf | , | 
| NULL | , | ||
| ast_free_ptr | , | ||
| static | |||
| ) | 
| 
 | static | 
Definition at line 133 of file res_security_log.c.
References ast_logger_register_level(), ast_logger_unregister_level(), AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, ast_security_topic(), ast_verb, LOG_SECURITY, LOG_SECURITY_NAME, NULL, security_stasis_cb(), security_stasis_sub, stasis_subscribe, stasis_subscription_accept_message_type(), STASIS_SUBSCRIPTION_FILTER_SELECTIVE, and stasis_subscription_set_filter().
| 
 | static | 
Definition at line 90 of file res_security_log.c.
References append_json(), ast_assert, ast_json_integer_get(), ast_json_object_get(), ast_log_dynamic_level, ast_security_event_get_name(), ast_security_event_get_optional_ies(), ast_security_event_get_required_ies(), AST_SECURITY_EVENT_NUM_TYPES, ast_str_buffer(), ast_str_set(), ast_str_thread_get(), LOG_SECURITY, NOT_REQUIRED, REQUIRED, SECURITY_EVENT_BUF_INIT_LEN, and str.
Referenced by security_stasis_cb().
| 
 | static | 
Definition at line 117 of file res_security_log.c.
References ast_json_payload::json, security_event_stasis_cb(), and stasis_message_data().
Referenced by load_module().
| 
 | static | 
Definition at line 152 of file res_security_log.c.
References ast_logger_unregister_level(), ast_verb, LOG_SECURITY_NAME, security_stasis_sub, and stasis_unsubscribe_and_join().
| 
 | static | 
Definition at line 165 of file res_security_log.c.
| 
 | static | 
Definition at line 165 of file res_security_log.c.
| 
 | static | 
Definition at line 46 of file res_security_log.c.
Referenced by load_module(), and security_event_stasis_cb().
| 
 | static | 
Definition at line 44 of file res_security_log.c.
Referenced by load_module(), and unload_module().
| 
 | static | 
Definition at line 51 of file res_security_log.c.
Referenced by security_event_stasis_cb().
| 
 | static | 
Definition at line 48 of file res_security_log.c.
Referenced by load_module(), and unload_module().