Asterisk - The Open Source Telephony Project GIT-master-f36a736
|
#include "asterisk.h"
#include <math.h>
#include <pjsip.h>
#include <pjlib.h>
#include "asterisk/res_pjsip.h"
#include "asterisk/res_pjsip_cli.h"
#include "asterisk/logger.h"
#include "asterisk/astobj2.h"
#include "asterisk/sorcery.h"
#include "asterisk/acl.h"
#include "asterisk/utils.h"
#include "include/res_pjsip_private.h"
#include "asterisk/http_websocket.h"
Go to the source code of this file.
Data Structures | |
struct | internal_state |
Macros | |
#define | BIND_DELAY_US 100000 |
#define | BIND_TRIES 3 |
#define | DEFAULT_STATE_BUCKETS 53 |
Default number of state container buckets. More... | |
#define | MAX_POINTER_STRING 33 |
Functions | |
static void | __init_temp_state_store (void) |
static int | allow_wildcard_certs_to_str (const void *obj, const intptr_t *args, char **buf) |
int | ast_sip_destroy_sorcery_transport (void) |
struct ast_sip_transport_state * | ast_sip_get_transport_state (const char *transport_id) |
Retrieve transport state. More... | |
struct ao2_container * | ast_sip_get_transport_states (void) |
Retrieves all transport states. More... | |
int | ast_sip_initialize_sorcery_transport (void) |
Initialize sorcery with transport support. More... | |
void | ast_sip_message_apply_transport (const char *transport_name, pjsip_tx_data *tdata) |
Apply the configuration for a transport to an outgoing message. More... | |
struct ast_sip_service_route_vector * | ast_sip_service_route_vector_alloc (void) |
Allocate a vector of service routes. More... | |
void | ast_sip_service_route_vector_destroy (struct ast_sip_service_route_vector *service_routes) |
Destroy a vector of service routes. More... | |
int | ast_sip_transport_state_set_preferred_identity (const char *transport_name, const char *identity) |
Sets the P-Preferred-Identity on a child transport. More... | |
int | ast_sip_transport_state_set_service_routes (const char *transport_name, struct ast_sip_service_route_vector *service_routes) |
Sets the service routes on a child transport. More... | |
int | ast_sip_transport_state_set_transport (const char *transport_name, pjsip_transport *transport) |
Sets the PJSIP transport on a child transport. More... | |
static int | ca_list_file_to_str (const void *obj, const intptr_t *args, char **buf) |
static int | ca_list_path_to_str (const void *obj, const intptr_t *args, char **buf) |
static int | cert_file_to_str (const void *obj, const intptr_t *args, char **buf) |
static struct ao2_container * | cli_get_container (const char *regex) |
static int | cli_iterate (void *container, ao2_callback_fn callback, void *args) |
static int | cli_print_body (void *obj, void *arg, int flags) |
static int | cli_print_header (void *obj, void *arg, int flags) |
static void * | cli_retrieve_by_id (const char *id) |
static void | copy_state_to_transport (struct ast_sip_transport *transport) |
static int | destroy_sip_transport_state (void *data) |
static struct internal_state * | find_internal_state_by_transport (const struct ast_sip_transport *transport) |
static struct ast_sip_transport_state * | find_or_create_temporary_state (struct ast_sip_transport *transport) |
static struct ast_sip_transport_state * | find_state_by_transport (const struct ast_sip_transport *transport) |
static struct ast_sip_transport_state * | find_temporary_state (struct ast_sip_transport *transport) |
static int | format_ami_endpoint_transport (const struct ast_sip_endpoint *endpoint, struct ast_sip_ami *ami) |
static int | has_state_changed (struct ast_sip_transport_state *a, struct ast_sip_transport_state *b) |
static struct internal_state * | internal_state_alloc (struct ast_sip_transport *transport) |
static int | internal_state_cmp (void *obj, void *arg, int flags) |
comparator function for state objects More... | |
static void | internal_state_destroy (void *obj) |
Destructor for ast_sip_transport state information. More... | |
static int | internal_state_hash (const void *obj, const int flags) |
hashing function for state objects More... | |
static int | localnet_to_str (const void *obj, const intptr_t *args, char **buf) |
static int | localnet_to_vl (const void *obj, struct ast_variable **fields) |
static void | localnet_to_vl_append (struct ast_variable **head, struct ast_ha *ha) |
static int | populate_transport_states (void *obj, void *arg, int flags) |
static int | privkey_file_to_str (const void *obj, const intptr_t *args, char **buf) |
static int | remove_temporary_state (void) |
static int | require_client_cert_to_str (const void *obj, const intptr_t *args, char **buf) |
static void | set_qos (struct ast_sip_transport *transport, pj_qos_params *qos) |
static void * | sip_transport_alloc (const char *name) |
Allocator for transport. More... | |
static void | sip_transport_destroy (void *obj) |
Destructor for transport. More... | |
static void | sip_transport_state_destroy (void *obj) |
Destructor for ast_sip_transport state information. More... | |
static int | sip_transport_to_ami (const struct ast_sip_transport *transport, struct ast_str **buf) |
static void | states_cleanup (void *states) |
static void | temp_state_store_cleanup (void *data) |
static int | tls_method_to_str (const void *obj, const intptr_t *args, char **buf) |
static int | tos_to_str (const void *obj, const intptr_t *args, char **buf) |
static int | transport_apply (const struct ast_sorcery *sorcery, void *obj) |
Apply handler for transports. More... | |
static int | transport_bind_handler (const struct aco_option *opt, struct ast_variable *var, void *obj) |
Custom handler for turning a string bind into a pj_sockaddr. More... | |
static int | transport_bind_to_str (const void *obj, const intptr_t *args, char **buf) |
static int | transport_localnet_handler (const struct aco_option *opt, struct ast_variable *var, void *obj) |
Custom handler for localnet setting. More... | |
static int | transport_protocol_handler (const struct aco_option *opt, struct ast_variable *var, void *obj) |
Custom handler for turning a string protocol into an enum. More... | |
static int | transport_protocol_to_str (const void *obj, const intptr_t *args, char **buf) |
static int | transport_state_cmp (void *obj, void *arg, int flags) |
comparator function for state objects More... | |
static int | transport_state_hash (const void *obj, const int flags) |
hashing function for state objects More... | |
static int | transport_state_init (const struct aco_option *opt, struct ast_variable *var, void *obj) |
Custom handler for type just makes sure the state is created. More... | |
static int | transport_tls_bool_handler (const struct aco_option *opt, struct ast_variable *var, void *obj) |
Custom handler for TLS boolean settings. More... | |
static int | transport_tls_file_handler (const struct aco_option *opt, struct ast_variable *var, void *obj) |
Custom handler for TLS method setting. More... | |
static int | transport_tls_method_handler (const struct aco_option *opt, struct ast_variable *var, void *obj) |
Custom handler for TLS method setting. More... | |
static int | transport_tos_handler (const struct aco_option *opt, struct ast_variable *var, void *obj) |
Custom handler for TOS setting. More... | |
static int | verify_client_to_str (const void *obj, const intptr_t *args, char **buf) |
static int | verify_server_to_str (const void *obj, const intptr_t *args, char **buf) |
Variables | |
static struct ast_cli_entry | cli_commands [] |
static struct ast_sip_cli_formatter_entry * | cli_formatter |
struct ast_sip_endpoint_formatter | endpoint_transport_formatter |
static struct ast_threadstorage | temp_state_store = { .once = PTHREAD_ONCE_INIT , .key_init = __init_temp_state_store , .custom_init = NULL , } |
static const char * | tls_method_map [] |
static struct ao2_container * | transport_states |
static const char * | transport_types [] |
#define BIND_DELAY_US 100000 |
#define BIND_TRIES 3 |
#define DEFAULT_STATE_BUCKETS 53 |
Default number of state container buckets.
Definition at line 39 of file config_transport.c.
#define MAX_POINTER_STRING 33 |
Definition at line 36 of file config_transport.c.
|
static |
Definition at line 60 of file config_transport.c.
|
static |
Definition at line 1269 of file config_transport.c.
References ao2_ref, ast_strdup, AST_YESNO, buf, and find_state_by_transport().
Referenced by ast_sip_initialize_sorcery_transport().
int ast_sip_destroy_sorcery_transport | ( | void | ) |
Definition at line 1877 of file config_transport.c.
References ao2_ref, ARRAY_LEN, ast_cli_unregister_multiple(), ast_sip_unregister_cli_formatter(), ast_sip_unregister_endpoint_formatter(), cli_commands, cli_formatter, endpoint_transport_formatter, NULL, and transport_states.
Referenced by ast_res_pjsip_destroy_configuration().
struct ast_sip_transport_state * ast_sip_get_transport_state | ( | const char * | transport_id | ) |
Retrieve transport state.
transport_id |
transport_state |
Definition at line 1744 of file config_transport.c.
References ao2_bump, ao2_find, ao2_lock, ao2_ref, ao2_unlock, ast_sip_transport_state::flow, NULL, OBJ_SEARCH_KEY, ast_sip_transport_state::transport, and transport_states.
Referenced by ast_sip_message_apply_transport(), ast_sip_set_tpselector_from_transport(), ast_sip_transport_state_set_preferred_identity(), ast_sip_transport_state_set_service_routes(), ast_sip_transport_state_set_transport(), change_outgoing_sdp_stream_media_address(), create_rtp(), session_outgoing_nat_hook(), t38_initialize_session(), and transport_tls_verify().
struct ao2_container * ast_sip_get_transport_states | ( | void | ) |
Retrieves all transport states.
ao2_container |
Definition at line 1784 of file config_transport.c.
References AO2_ALLOC_OPT_LOCK_MUTEX, ao2_callback, ao2_container_alloc_hash, DEFAULT_STATE_BUCKETS, NULL, OBJ_MULTIPLE, OBJ_NODATA, populate_transport_states(), transport_state_cmp(), transport_state_hash(), and transport_states.
Referenced by anonymous_identify(), ast_sip_find_transport_state_in_use(), find_endpoint(), get_udp_transport(), and get_write_timeout().
int ast_sip_initialize_sorcery_transport | ( | void | ) |
Initialize sorcery with transport support.
Definition at line 1798 of file config_transport.c.
References allow_wildcard_certs_to_str(), ao2_alloc, AO2_ALLOC_OPT_LOCK_MUTEX, ao2_cleanup, ao2_container_alloc_hash, ARRAY_LEN, ast_cli_register_multiple, AST_DEFAULT_WEBSOCKET_WRITE_TIMEOUT_STR, ast_log, AST_RETRIEVE_FLAG_ALL, AST_RETRIEVE_FLAG_MULTIPLE, ast_sip_get_sorcery(), ast_sip_register_cli_formatter(), ast_sip_register_endpoint_formatter(), ast_sorcery_apply_default, ast_sorcery_object_field_register, ast_sorcery_object_field_register_custom, ast_sorcery_object_get_id(), ast_sorcery_object_register, ast_sorcery_retrieve_by_fields(), ca_list_file_to_str(), ca_list_path_to_str(), cert_file_to_str(), cli_commands, cli_formatter, cli_get_container(), cli_iterate(), cli_print_body(), cli_print_header(), cli_retrieve_by_id(), cos, DEFAULT_STATE_BUCKETS, endpoint_transport_formatter, FLDSET, ast_sip_cli_formatter_entry::get_container, ast_sip_cli_formatter_entry::get_id, internal_state_cmp(), internal_state_hash(), ast_sip_cli_formatter_entry::iterate, localnet_to_str(), localnet_to_vl(), LOG_ERROR, ast_sip_cli_formatter_entry::name, NULL, OPT_BOOL_T, OPT_INT_T, OPT_STRINGFIELD_T, OPT_UINT_T, PARSE_IN_RANGE, ast_sip_cli_formatter_entry::print_body, ast_sip_cli_formatter_entry::print_header, privkey_file_to_str(), require_client_cert_to_str(), ast_sip_cli_formatter_entry::retrieve_by_id, sip_transport_alloc(), sorcery, STRFLDSET, tls_method_to_str(), tos_to_str(), transport_apply(), transport_bind_handler(), transport_bind_to_str(), transport_localnet_handler(), transport_protocol_handler(), transport_protocol_to_str(), transport_state_init(), transport_states, transport_tls_bool_handler(), transport_tls_file_handler(), transport_tls_method_handler(), transport_tos_handler(), verify_client_to_str(), and verify_server_to_str().
Referenced by ast_res_pjsip_initialize_configuration().
void ast_sip_message_apply_transport | ( | const char * | transport_name, |
pjsip_tx_data * | tdata | ||
) |
Apply the configuration for a transport to an outgoing message.
transport_name | The name of the transport to apply configuration from |
tdata | The SIP message |
Definition at line 301 of file config_transport.c.
References ao2_lock, ao2_ref, ao2_unlock, ast_sip_add_header(), ast_sip_get_transport_state(), ast_strlen_zero(), AST_VECTOR_GET, AST_VECTOR_SIZE, ast_sip_transport_state::flow, ast_sip_transport_state::preferred_identity, and ast_sip_transport_state::service_routes.
Referenced by ast_sip_send_out_of_dialog_request(), handle_outgoing_request(), handle_outgoing_response(), and supplement_outgoing_response().
struct ast_sip_service_route_vector * ast_sip_service_route_vector_alloc | ( | void | ) |
Allocate a vector of service routes.
non-NULL | success |
NULL | failure |
Definition at line 352 of file config_transport.c.
References ast_calloc, AST_VECTOR_INIT, and NULL.
Referenced by save_response_fields_to_transport().
void ast_sip_service_route_vector_destroy | ( | struct ast_sip_service_route_vector * | service_routes | ) |
Destroy a vector of service routes.
service_routes | A vector of service routes |
Definition at line 366 of file config_transport.c.
References ast_free, and AST_VECTOR_CALLBACK_VOID.
Referenced by ast_sip_transport_state_set_service_routes(), and save_response_fields_to_transport().
int ast_sip_transport_state_set_preferred_identity | ( | const char * | transport_name, |
const char * | identity | ||
) |
Sets the P-Preferred-Identity on a child transport.
transport_name | The name of the transport to be set on |
identity | The P-Preferred-Identity to use on requests on this transport |
0 | success |
-1 | failure |
Definition at line 242 of file config_transport.c.
References ao2_lock, ao2_ref, ao2_unlock, ast_free, ast_sip_get_transport_state(), ast_strdup, ast_strlen_zero(), ast_sip_transport_state::flow, and ast_sip_transport_state::preferred_identity.
Referenced by save_response_fields_to_transport().
int ast_sip_transport_state_set_service_routes | ( | const char * | transport_name, |
struct ast_sip_service_route_vector * | service_routes | ||
) |
Sets the service routes on a child transport.
transport_name | The name of the transport to be set on |
service_routes | A vector of service routes |
0 | success |
-1 | failure |
Definition at line 270 of file config_transport.c.
References ao2_lock, ao2_ref, ao2_unlock, ast_sip_get_transport_state(), ast_sip_service_route_vector_destroy(), ast_strlen_zero(), ast_sip_transport_state::flow, and ast_sip_transport_state::service_routes.
Referenced by save_response_fields_to_transport().
int ast_sip_transport_state_set_transport | ( | const char * | transport_name, |
pjsip_transport * | transport | ||
) |
Sets the PJSIP transport on a child transport.
transport_name | The name of the transport to be updated |
transport | The PJSIP transport |
0 | success |
-1 | failure |
Definition at line 206 of file config_transport.c.
References ao2_lock, ao2_ref, ao2_unlock, ast_sip_get_transport_state(), ast_strlen_zero(), ast_sip_transport_state::flow, and ast_sip_transport_state::transport.
Referenced by save_response_fields_to_transport().
|
static |
Definition at line 1075 of file config_transport.c.
References ast_strdup, buf, and ast_sip_transport::ca_list_file.
Referenced by ast_sip_initialize_sorcery_transport().
|
static |
Definition at line 1084 of file config_transport.c.
References ast_strdup, buf, and ast_sip_transport::ca_list_path.
Referenced by ast_sip_initialize_sorcery_transport().
|
static |
Definition at line 1093 of file config_transport.c.
References ast_strdup, buf, and ast_sip_transport::cert_file.
Referenced by ast_sip_initialize_sorcery_transport().
|
static |
Definition at line 1634 of file config_transport.c.
References AO2_ALLOC_OPT_LOCK_NOLOCK, ao2_cleanup, ao2_container_alloc_list, ao2_container_dup(), ao2_ref, ast_sip_get_sorcery(), ast_sorcery_object_id_compare(), ast_sorcery_object_id_sort(), ast_sorcery_retrieve_by_regex(), container, NULL, RAII_VAR, and regex().
Referenced by ast_sip_initialize_sorcery_transport().
|
static |
Definition at line 1659 of file config_transport.c.
References args, ast_sip_get_sorcery(), ast_sorcery_retrieve_by_id(), container, and ast_sip_endpoint::transport.
Referenced by ast_sip_initialize_sorcery_transport().
|
static |
Definition at line 1692 of file config_transport.c.
References ao2_cleanup, ARRAY_IN_BOUNDS, ast_assert, ast_sip_cli_print_sorcery_objectset(), ast_sorcery_object_get_id(), ast_str_append(), CLI_INDENT_TO_SPACES, voicemailpwcheck::context, ast_sip_transport::cos, find_state_by_transport(), NULL, RAII_VAR, ast_sip_transport::tos, transport_types, and ast_sip_transport::type.
Referenced by ast_sip_initialize_sorcery_transport().
|
static |
Definition at line 1677 of file config_transport.c.
References ast_assert, ast_str_append(), CLI_HEADER_FILLER, CLI_INDENT_TO_SPACES, CLI_MAX_WIDTH, voicemailpwcheck::context, and NULL.
Referenced by ast_sip_initialize_sorcery_transport().
|
static |
Definition at line 1672 of file config_transport.c.
References ast_sip_get_sorcery(), and ast_sorcery_retrieve_by_id().
Referenced by ast_sip_initialize_sorcery_transport().
|
static |
Definition at line 568 of file config_transport.c.
References ast_assert, and ast_sip_transport_state::transport.
Referenced by transport_apply().
|
static |
Definition at line 415 of file config_transport.c.
References ast_dnsmgr_release(), ast_free, ast_free_ha(), ast_sip_transport_state::external_media_address_refresher, ast_sip_transport_state::external_signaling_address_refresher, ast_sip_transport_state::id, ast_sip_transport_state::localnet, and ast_sip_transport_state::transport.
Referenced by sip_transport_state_destroy().
|
static |
Definition at line 453 of file config_transport.c.
References ao2_find, ast_sorcery_object_get_id(), OBJ_NOLOCK, OBJ_SEARCH_KEY, internal_state::transport, and transport_states.
Referenced by find_state_by_transport(), and transport_apply().
|
static |
Definition at line 534 of file config_transport.c.
References ao2_alloc, ao2_ref, ast_sorcery_object_get_id(), ast_strdup, ast_threadstorage_get(), ast_sip_transport_state::ciphers, find_temporary_state(), ast_sip_transport_state::id, NULL, sip_transport_state_destroy(), state, temp_state_store, ast_sip_transport_state::tls, ast_sip_transport_state::transport, and ast_sip_transport_state::type.
Referenced by transport_bind_handler(), transport_localnet_handler(), transport_protocol_handler(), transport_state_init(), transport_tls_bool_handler(), transport_tls_file_handler(), and transport_tls_method_handler().
|
static |
Definition at line 460 of file config_transport.c.
References ao2_bump, ao2_ref, find_internal_state_by_transport(), NULL, state, and ast_sip_transport_state::transport.
Referenced by allow_wildcard_certs_to_str(), cli_print_body(), localnet_to_str(), localnet_to_vl(), require_client_cert_to_str(), tls_method_to_str(), transport_bind_to_str(), verify_client_to_str(), and verify_server_to_str().
|
static |
Definition at line 489 of file config_transport.c.
References ao2_ref, ast_threadstorage_get(), NULL, state, and temp_state_store.
Referenced by find_or_create_temporary_state(), and internal_state_alloc().
|
static |
Definition at line 168 of file config_transport.c.
References ao2_cleanup, ast_free, ast_sip_create_ami_event(), ast_sip_get_sorcery(), ast_sorcery_object_get_id(), ast_sorcery_retrieve_by_id(), ast_str_append(), ast_str_buffer(), ast_strlen_zero(), astman_append(), astman_send_error_va(), buf, ast_sip_ami::count, ast_sip_ami::m, NULL, RAII_VAR, ast_sip_ami::s, sip_transport_to_ami(), ast_sip_transport_state::transport, and ast_sip_endpoint::transport.
|
static |
Definition at line 596 of file config_transport.c.
References a, ast_sockaddr_cmp(), and b.
Referenced by transport_apply().
|
static |
Definition at line 502 of file config_transport.c.
References ao2_alloc, ao2_bump, ao2_cleanup, ast_sorcery_object_get_id(), ast_strdup, find_temporary_state(), internal_state::id, internal_state_destroy(), NULL, remove_temporary_state(), ast_sip_transport::state, internal_state::state, and internal_state::transport.
Referenced by transport_apply().
|
static |
comparator function for state objects
Definition at line 84 of file config_transport.c.
References ast_assert, CMP_MATCH, internal_state::id, OBJ_SEARCH_KEY, OBJ_SEARCH_MASK, OBJ_SEARCH_OBJECT, and OBJ_SEARCH_PARTIAL_KEY.
Referenced by ast_sip_initialize_sorcery_transport().
|
static |
Destructor for ast_sip_transport state information.
Definition at line 444 of file config_transport.c.
References ao2_cleanup, and ast_free.
Referenced by internal_state_alloc().
|
static |
hashing function for state objects
Definition at line 63 of file config_transport.c.
References ast_assert, ast_str_hash(), OBJ_SEARCH_KEY, OBJ_SEARCH_MASK, and OBJ_SEARCH_OBJECT.
Referenced by ast_sip_initialize_sorcery_transport().
|
static |
Definition at line 1583 of file config_transport.c.
References ao2_cleanup, ast_free, ast_ha_join(), ast_str_buffer(), ast_str_create, ast_strdup, buf, find_state_by_transport(), MAX_OBJECT_FIELD, RAII_VAR, and str.
Referenced by ast_sip_initialize_sorcery_transport().
|
static |
Definition at line 1561 of file config_transport.c.
References ao2_cleanup, find_state_by_transport(), localnet_to_vl_append(), ast_ha::next, NULL, and RAII_VAR.
Referenced by ast_sip_initialize_sorcery_transport().
|
static |
Definition at line 1551 of file config_transport.c.
References ast_ha::addr, AST_SENSE_ALLOW, ast_sockaddr_stringify_addr(), ast_strdupa, ast_variable_list_append, ast_variable_new, MAX_OBJECT_FIELD, ast_ha::netmask, ast_ha::sense, and str.
Referenced by localnet_to_vl().
|
static |
Definition at line 1774 of file config_transport.c.
References ao2_link, CMP_MATCH, and container.
Referenced by ast_sip_get_transport_states().
|
static |
Definition at line 1102 of file config_transport.c.
References ast_strdup, buf, and ast_sip_transport::privkey_file.
Referenced by ast_sip_initialize_sorcery_transport().
|
static |
Definition at line 475 of file config_transport.c.
References ao2_cleanup, ast_threadstorage_get(), NULL, state, and temp_state_store.
Referenced by internal_state_alloc().
|
static |
Definition at line 1255 of file config_transport.c.
References ao2_cleanup, ast_strdup, AST_YESNO, buf, find_state_by_transport(), and RAII_VAR.
Referenced by ast_sip_initialize_sorcery_transport().
|
static |
Definition at line 376 of file config_transport.c.
References ast_sip_transport::cos, qos, and ast_sip_transport::tos.
Referenced by transport_apply().
|
static |
Allocator for transport.
Definition at line 399 of file config_transport.c.
References ao2_cleanup, ast_sorcery_generic_alloc(), ast_string_field_init, NULL, and sip_transport_destroy().
Referenced by ast_sip_initialize_sorcery_transport().
|
static |
Destructor for transport.
Definition at line 391 of file config_transport.c.
References ast_string_field_free_memory.
Referenced by sip_transport_alloc().
|
static |
Destructor for ast_sip_transport state information.
Definition at line 436 of file config_transport.c.
References ast_sip_push_task_wait_servant(), destroy_sip_transport_state(), and NULL.
Referenced by find_or_create_temporary_state().
|
static |
Definition at line 162 of file config_transport.c.
References ast_sip_sorcery_object_to_ami(), buf, and ast_sip_transport_state::transport.
Referenced by format_ami_endpoint_transport().
|
static |
Definition at line 646 of file config_transport.c.
References ao2_unlock.
Referenced by transport_apply().
|
static |
Definition at line 52 of file config_transport.c.
References ao2_cleanup, and ast_free.
|
static |
Definition at line 1341 of file config_transport.c.
References ao2_cleanup, ARRAY_IN_BOUNDS, ast_strdup, buf, find_state_by_transport(), RAII_VAR, and tls_method_map.
Referenced by ast_sip_initialize_sorcery_transport().
|
static |
Definition at line 1624 of file config_transport.c.
References ast_asprintf, buf, and ast_sip_transport::tos.
Referenced by ast_sip_initialize_sorcery_transport().
|
static |
Apply handler for transports.
Definition at line 654 of file config_transport.c.
References ast_sip_transport::allow_reload, ao2_cleanup, ao2_link_flags, ao2_replace, ao2_unlink_flags, ao2_wrlock, ast_compare_versions(), ast_debug, ast_dnsmgr_lookup(), ast_log, ast_sip_get_pjsip_endpoint(), AST_SIP_X_AST_TXP, AST_SIP_X_AST_TXP_LEN, ast_sorcery_diff(), ast_sorcery_object_get_id(), ast_strlen_zero(), AST_TRANSPORT_TCP, AST_TRANSPORT_TLS, AST_TRANSPORT_UDP, AST_TRANSPORT_WS, AST_TRANSPORT_WSS, ast_variables_destroy(), ast_sip_transport::async_operations, BIND_DELAY_US, BIND_TRIES, ast_sip_transport::ca_list_file, ast_sip_transport::ca_list_path, ast_sip_transport::cert_file, copy_state_to_transport(), ast_sip_transport::cos, ast_sip_transport::external_media_address, ast_sip_transport::external_signaling_address, find_internal_state_by_transport(), ast_sip_transport::flow, has_state_changed(), internal_state_alloc(), LOG_DEBUG, LOG_ERROR, LOG_NOTICE, LOG_WARNING, MAX, MAX_OBJECT_FIELD, NULL, OBJ_NOLOCK, ast_sip_transport::password, ast_sip_transport::privkey_file, RAII_VAR, set_qos(), sorcery, ast_sip_transport::state, states_cleanup(), ast_sip_transport::tcp_keepalive_enable, ast_sip_transport::tcp_keepalive_idle_time, ast_sip_transport::tcp_keepalive_interval_time, ast_sip_transport::tcp_keepalive_probe_count, ast_sip_transport_state::tls, ast_sip_transport::tos, transport_states, and ast_sip_transport::type.
Referenced by ast_sip_initialize_sorcery_transport().
|
static |
Custom handler for turning a string bind into a pj_sockaddr.
Definition at line 1167 of file config_transport.c.
References ao2_cleanup, buf, find_or_create_temporary_state(), RAII_VAR, and var.
Referenced by ast_sip_initialize_sorcery_transport().
|
static |
Definition at line 1183 of file config_transport.c.
References ao2_cleanup, ast_calloc, buf, find_state_by_transport(), MAX_OBJECT_FIELD, and RAII_VAR.
Referenced by ast_sip_initialize_sorcery_transport().
|
static |
Custom handler for localnet setting.
Definition at line 1526 of file config_transport.c.
References ao2_cleanup, ast_append_ha(), ast_free_ha(), ast_strlen_zero(), error(), find_or_create_temporary_state(), NULL, RAII_VAR, and var.
Referenced by ast_sip_initialize_sorcery_transport().
|
static |
Custom handler for turning a string protocol into an enum.
Definition at line 1112 of file config_transport.c.
References ao2_cleanup, AST_TRANSPORT_TCP, AST_TRANSPORT_TLS, AST_TRANSPORT_UDP, AST_TRANSPORT_WS, AST_TRANSPORT_WSS, find_or_create_temporary_state(), ast_sip_transport::flow, RAII_VAR, ast_sip_transport::type, and var.
Referenced by ast_sip_initialize_sorcery_transport().
|
static |
Definition at line 1153 of file config_transport.c.
References ARRAY_IN_BOUNDS, ast_strdup, buf, ast_sip_transport::flow, transport_types, and ast_sip_transport::type.
Referenced by ast_sip_initialize_sorcery_transport().
|
static |
comparator function for state objects
Definition at line 134 of file config_transport.c.
References ast_assert, CMP_MATCH, ast_sip_transport_state::id, OBJ_SEARCH_KEY, OBJ_SEARCH_MASK, OBJ_SEARCH_OBJECT, and OBJ_SEARCH_PARTIAL_KEY.
Referenced by ast_sip_get_transport_states().
|
static |
hashing function for state objects
Definition at line 113 of file config_transport.c.
References ast_assert, ast_str_hash(), OBJ_SEARCH_KEY, OBJ_SEARCH_MASK, and OBJ_SEARCH_OBJECT.
Referenced by ast_sip_get_transport_states().
|
static |
Custom handler for type just makes sure the state is created.
Definition at line 1006 of file config_transport.c.
References ao2_cleanup, find_or_create_temporary_state(), and ast_sip_transport_state::transport.
Referenced by ast_sip_initialize_sorcery_transport().
|
static |
Custom handler for TLS boolean settings.
Definition at line 1203 of file config_transport.c.
References ao2_cleanup, ast_true(), find_or_create_temporary_state(), RAII_VAR, and var.
Referenced by ast_sip_initialize_sorcery_transport().
|
static |
Custom handler for TLS method setting.
Definition at line 1017 of file config_transport.c.
References ao2_cleanup, ast_file_is_readable(), ast_log, ast_sorcery_object_get_id(), ast_sorcery_object_set_has_dynamic_contents(), ast_string_field_set, ast_strlen_zero(), ast_sip_transport::ca_list_file, ast_sip_transport::ca_list_path, ast_sip_transport::cert_file, errno, find_or_create_temporary_state(), LOG_ERROR, LOG_WARNING, ast_sip_transport::privkey_file, RAII_VAR, and var.
Referenced by ast_sip_initialize_sorcery_transport().
|
static |
Custom handler for TLS method setting.
Definition at line 1284 of file config_transport.c.
References ao2_cleanup, ast_strlen_zero(), find_or_create_temporary_state(), RAII_VAR, and var.
Referenced by ast_sip_initialize_sorcery_transport().
|
static |
Custom handler for TOS setting.
Definition at line 1599 of file config_transport.c.
References ast_log, ast_sorcery_object_get_id(), ast_str2tos(), LOG_ERROR, LOG_WARNING, ast_sip_transport::tos, value, and var.
Referenced by ast_sip_initialize_sorcery_transport().
|
static |
Definition at line 1241 of file config_transport.c.
References ao2_cleanup, ast_strdup, AST_YESNO, buf, find_state_by_transport(), and RAII_VAR.
Referenced by ast_sip_initialize_sorcery_transport().
|
static |
Definition at line 1227 of file config_transport.c.
References ao2_cleanup, ast_strdup, AST_YESNO, buf, find_state_by_transport(), and RAII_VAR.
Referenced by ast_sip_initialize_sorcery_transport().
|
static |
Definition at line 1722 of file config_transport.c.
Referenced by ast_sip_destroy_sorcery_transport(), and ast_sip_initialize_sorcery_transport().
|
static |
Definition at line 1742 of file config_transport.c.
Referenced by ast_sip_destroy_sorcery_transport(), and ast_sip_initialize_sorcery_transport().
struct ast_sip_endpoint_formatter endpoint_transport_formatter |
Definition at line 202 of file config_transport.c.
Referenced by ast_sip_destroy_sorcery_transport(), and ast_sip_initialize_sorcery_transport().
|
static |
Definition at line 60 of file config_transport.c.
Referenced by find_or_create_temporary_state(), find_temporary_state(), and remove_temporary_state().
|
static |
Definition at line 1324 of file config_transport.c.
Referenced by tls_method_to_str().
|
static |
Definition at line 40 of file config_transport.c.
Referenced by anonymous_identify(), ast_sip_destroy_sorcery_transport(), ast_sip_find_transport_state_in_use(), ast_sip_get_transport_state(), ast_sip_get_transport_states(), ast_sip_initialize_sorcery_transport(), find_endpoint(), find_internal_state_by_transport(), get_udp_transport(), get_write_timeout(), and transport_apply().
|
static |
Definition at line 1145 of file config_transport.c.
Referenced by cli_print_body(), and transport_protocol_to_str().