Asterisk - The Open Source Telephony Project
18.5.0
|
Test security event generation. More...
#include "asterisk.h"
#include "asterisk/module.h"
#include "asterisk/cli.h"
#include "asterisk/utils.h"
#include "asterisk/security_events.h"
#include "asterisk/netsock2.h"
Go to the source code of this file.
Typedefs | |
typedef void(* | evt_generator) (void) |
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
static void | evt_gen_auth_method_not_allowed (void) |
static void | evt_gen_chal_resp_failed (void) |
static void | evt_gen_chal_sent (void) |
static void | evt_gen_failed_acl (void) |
static void | evt_gen_inval_acct_id (void) |
static void | evt_gen_inval_password (void) |
static void | evt_gen_inval_transport (void) |
static void | evt_gen_load_avg (void) |
static void | evt_gen_mem_limit (void) |
static void | evt_gen_req_bad_format (void) |
static void | evt_gen_req_no_support (void) |
static void | evt_gen_req_not_allowed (void) |
static void | evt_gen_session_limit (void) |
static void | evt_gen_successful_auth (void) |
static void | evt_gen_unexpected_addr (void) |
static void | gen_events (struct ast_cli_args *a) |
static char * | handle_cli_sec_evt_test (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static int | load_module (void) |
static int | unload_module (void) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Test Security Event Generation" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .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 struct ast_cli_entry | cli_sec_evt [] |
static const evt_generator | evt_generators [AST_SECURITY_EVENT_NUM_TYPES] |
Test security event generation.
Definition in file test_security_events.c.
typedef void(* evt_generator) (void) |
Definition at line 55 of file test_security_events.c.
|
static |
Definition at line 704 of file test_security_events.c.
|
static |
Definition at line 704 of file test_security_events.c.
struct ast_module* AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 704 of file test_security_events.c.
|
static |
Definition at line 333 of file test_security_events.c.
References ast_copy_string(), AST_MODULE, AST_SEC_EVT, AST_SECURITY_EVENT_AUTH_METHOD_NOT_ALLOWED, AST_SECURITY_EVENT_AUTH_METHOD_NOT_ALLOWED_VERSION, ast_security_event_report(), ast_sockaddr_parse(), AST_TRANSPORT_TCP, ast_tvnow(), ast_security_event_auth_method_not_allowed::common, ast_security_event_common::event_type, and localaddr.
|
static |
Definition at line 491 of file test_security_events.c.
References ast_copy_string(), AST_MODULE, AST_SEC_EVT, AST_SECURITY_EVENT_CHAL_RESP_FAILED, AST_SECURITY_EVENT_CHAL_RESP_FAILED_VERSION, ast_security_event_report(), ast_sockaddr_parse(), AST_TRANSPORT_TCP, ast_tvnow(), ast_security_event_chal_resp_failed::common, ast_security_event_common::event_type, and localaddr.
|
static |
Definition at line 570 of file test_security_events.c.
References ast_copy_string(), AST_MODULE, AST_SEC_EVT, AST_SECURITY_EVENT_CHAL_SENT, AST_SECURITY_EVENT_CHAL_SENT_VERSION, ast_security_event_report(), ast_sockaddr_parse(), AST_TRANSPORT_TCP, ast_tvnow(), ast_security_event_chal_sent::common, ast_security_event_common::event_type, and localaddr.
|
static |
Definition at line 74 of file test_security_events.c.
References ast_copy_string(), AST_MODULE, AST_SEC_EVT, AST_SECURITY_EVENT_FAILED_ACL, AST_SECURITY_EVENT_FAILED_ACL_VERSION, ast_security_event_report(), ast_sockaddr_parse(), AST_TRANSPORT_UDP, ast_tvnow(), ast_security_event_failed_acl::common, ast_security_event_common::event_type, and localaddr.
|
static |
Definition at line 112 of file test_security_events.c.
References ast_copy_string(), AST_MODULE, AST_SEC_EVT, AST_SECURITY_EVENT_INVAL_ACCT_ID, AST_SECURITY_EVENT_INVAL_ACCT_ID_VERSION, ast_security_event_report(), ast_sockaddr_parse(), AST_TRANSPORT_TCP, ast_tvnow(), ast_security_event_inval_acct_id::common, ast_security_event_common::event_type, and localaddr.
|
static |
Definition at line 531 of file test_security_events.c.
References ast_copy_string(), AST_MODULE, AST_SEC_EVT, AST_SECURITY_EVENT_INVAL_PASSWORD, AST_SECURITY_EVENT_INVAL_PASSWORD_VERSION, ast_security_event_report(), ast_sockaddr_parse(), AST_TRANSPORT_TCP, ast_tvnow(), ast_security_event_inval_password::common, ast_security_event_common::event_type, and localaddr.
|
static |
Definition at line 607 of file test_security_events.c.
References ast_copy_string(), AST_MODULE, AST_SEC_EVT, AST_SECURITY_EVENT_INVAL_TRANSPORT, AST_SECURITY_EVENT_INVAL_TRANSPORT_VERSION, ast_security_event_report(), ast_sockaddr_parse(), AST_TRANSPORT_TCP, ast_tvnow(), ast_security_event_inval_transport::common, ast_security_event_common::event_type, and localaddr.
|
static |
Definition at line 220 of file test_security_events.c.
References ast_copy_string(), AST_MODULE, AST_SEC_EVT, AST_SECURITY_EVENT_LOAD_AVG, AST_SECURITY_EVENT_LOAD_AVG_VERSION, ast_security_event_report(), ast_sockaddr_parse(), AST_TRANSPORT_UDP, ast_tvnow(), ast_security_event_load_avg::common, ast_security_event_common::event_type, and localaddr.
|
static |
Definition at line 184 of file test_security_events.c.
References ast_copy_string(), AST_MODULE, AST_SEC_EVT, AST_SECURITY_EVENT_MEM_LIMIT, AST_SECURITY_EVENT_MEM_LIMIT_VERSION, ast_security_event_report(), ast_sockaddr_parse(), AST_TRANSPORT_UDP, ast_tvnow(), ast_security_event_mem_limit::common, ast_security_event_common::event_type, and localaddr.
|
static |
Definition at line 371 of file test_security_events.c.
References ast_copy_string(), AST_MODULE, AST_SEC_EVT, ast_security_event_report(), AST_SECURITY_EVENT_REQ_BAD_FORMAT, AST_SECURITY_EVENT_REQ_BAD_FORMAT_VERSION, ast_sockaddr_parse(), AST_TRANSPORT_TCP, ast_tvnow(), ast_security_event_req_bad_format::common, ast_security_event_common::event_type, and localaddr.
|
static |
Definition at line 256 of file test_security_events.c.
References ast_copy_string(), AST_MODULE, AST_SEC_EVT, ast_security_event_report(), AST_SECURITY_EVENT_REQ_NO_SUPPORT, AST_SECURITY_EVENT_REQ_NO_SUPPORT_VERSION, ast_sockaddr_parse(), AST_TRANSPORT_UDP, ast_tvnow(), ast_security_event_req_no_support::common, ast_security_event_common::event_type, and localaddr.
|
static |
Definition at line 294 of file test_security_events.c.
References ast_copy_string(), AST_MODULE, AST_SEC_EVT, ast_security_event_report(), AST_SECURITY_EVENT_REQ_NOT_ALLOWED, AST_SECURITY_EVENT_REQ_NOT_ALLOWED_VERSION, ast_sockaddr_parse(), AST_TRANSPORT_UDP, ast_tvnow(), ast_security_event_req_not_allowed::common, ast_security_event_common::event_type, and localaddr.
|
static |
Definition at line 148 of file test_security_events.c.
References ast_copy_string(), AST_MODULE, AST_SEC_EVT, ast_security_event_report(), AST_SECURITY_EVENT_SESSION_LIMIT, AST_SECURITY_EVENT_SESSION_LIMIT_VERSION, ast_sockaddr_parse(), AST_TRANSPORT_TLS, ast_tvnow(), ast_security_event_session_limit::common, ast_security_event_common::event_type, and localaddr.
|
static |
Definition at line 410 of file test_security_events.c.
References ast_copy_string(), AST_MODULE, AST_SEC_EVT, ast_security_event_report(), AST_SECURITY_EVENT_SUCCESSFUL_AUTH, AST_SECURITY_EVENT_SUCCESSFUL_AUTH_VERSION, ast_sockaddr_parse(), AST_TRANSPORT_TCP, ast_tvnow(), ast_security_event_successful_auth::common, ast_security_event_common::event_type, and localaddr.
|
static |
Definition at line 446 of file test_security_events.c.
References ast_copy_string(), AST_MODULE, AST_SEC_EVT, ast_security_event_report(), AST_SECURITY_EVENT_UNEXPECTED_ADDR, AST_SECURITY_EVENT_UNEXPECTED_ADDR_VERSION, ast_sockaddr_parse(), AST_TRANSPORT_UDP, ast_tvnow(), ast_security_event_unexpected_addr::common, ast_security_event_common::event_type, and localaddr.
|
static |
Definition at line 644 of file test_security_events.c.
References ARRAY_LEN, ast_cli(), ast_security_event_get_name(), evt_generators, and ast_cli_args::fd.
Referenced by handle_cli_sec_evt_test().
|
static |
Definition at line 667 of file test_security_events.c.
References CLI_FAILURE, CLI_GENERATE, CLI_HANDLER, CLI_INIT, CLI_SUCCESS, ast_cli_entry::command, gen_events(), NULL, and ast_cli_entry::usage.
|
static |
Definition at line 695 of file test_security_events.c.
References ARRAY_LEN, ast_cli_register_multiple, AST_MODULE_LOAD_DECLINE, and AST_MODULE_LOAD_SUCCESS.
|
static |
Definition at line 690 of file test_security_events.c.
References ARRAY_LEN, and ast_cli_unregister_multiple().
|
static |
Definition at line 704 of file test_security_events.c.
|
static |
Definition at line 704 of file test_security_events.c.
|
static |
Definition at line 686 of file test_security_events.c.
|
static |
Definition at line 56 of file test_security_events.c.
Referenced by gen_events().