FreeSWITCH API Documentation
1.7.0
|
Go to the source code of this file.
Data Structures | |
struct | switch_core_port_allocator |
Functions | |
switch_status_t | switch_core_port_allocator_new (const char *ip, switch_port_t start, switch_port_t end, switch_port_flag_t flags, switch_core_port_allocator_t **new_allocator) |
static switch_bool_t | test_port (switch_core_port_allocator_t *alloc, int family, int type, switch_port_t port) |
switch_status_t | switch_core_port_allocator_request_port (switch_core_port_allocator_t *alloc, switch_port_t *port_ptr) |
switch_status_t | switch_core_port_allocator_free_port (switch_core_port_allocator_t *alloc, switch_port_t port) |
void | switch_core_port_allocator_destroy (switch_core_port_allocator_t **alloc) |
void switch_core_port_allocator_destroy | ( | switch_core_port_allocator_t ** | alloc | ) |
Definition at line 246 of file switch_core_port_allocator.c.
References pool, and switch_core_destroy_memory_pool.
switch_status_t switch_core_port_allocator_free_port | ( | switch_core_port_allocator_t * | alloc, |
switch_port_t | port | ||
) |
Definition at line 218 of file switch_core_port_allocator.c.
References SPF_EVEN, SPF_ODD, switch_mutex_lock(), switch_mutex_unlock(), SWITCH_STATUS_FALSE, SWITCH_STATUS_GENERR, SWITCH_STATUS_SUCCESS, and switch_test_flag.
switch_status_t switch_core_port_allocator_new | ( | const char * | ip, |
switch_port_t | start, | ||
switch_port_t | end, | ||
switch_port_flag_t | flags, | ||
switch_core_port_allocator_t ** | new_allocator | ||
) |
Definition at line 51 of file switch_core_port_allocator.c.
References switch_core_port_allocator::end, switch_core_port_allocator::flags, switch_core_port_allocator::ip, switch_core_port_allocator::mutex, switch_core_port_allocator::next, switch_core_port_allocator::pool, pool, switch_runtime::port_alloc_flags, runtime, SPF_EVEN, SPF_ODD, switch_core_port_allocator::start, SWITCH_CHANNEL_LOG, switch_core_alloc, switch_core_destroy_memory_pool, switch_core_new_memory_pool, switch_core_strdup, switch_log_printf(), SWITCH_LOG_WARNING, switch_mutex_init(), SWITCH_MUTEX_NESTED, SWITCH_STATUS_MEMERR, SWITCH_STATUS_SUCCESS, switch_test_flag, switch_core_port_allocator::track, and switch_core_port_allocator::track_len.
switch_status_t switch_core_port_allocator_request_port | ( | switch_core_port_allocator_t * | alloc, |
switch_port_t * | port_ptr | ||
) |
Definition at line 143 of file switch_core_port_allocator.c.
References SPF_EVEN, SPF_ODD, SPF_ROBUST_TCP, SPF_ROBUST_UDP, SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, switch_log_printf(), switch_micro_time_now(), switch_mutex_lock(), switch_mutex_unlock(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_test_flag, switch_thread_self(), SWITCH_TRUE, and test_port().
|
static |
Definition at line 118 of file switch_core_port_allocator.c.
References switch_core_port_allocator::ip, pool, switch_core_destroy_memory_pool, switch_core_new_memory_pool, SWITCH_FALSE, switch_sockaddr_info_get(), switch_socket_bind(), switch_socket_close(), switch_socket_create(), SWITCH_STATUS_SUCCESS, SWITCH_TRUE, and SWITCH_UNSPEC.
Referenced by switch_core_port_allocator_request_port().