Port Allocation
[Core Library]

Collaboration diagram for Port Allocation:

Functions

switch_status_t switch_core_port_allocator_new (_In_ switch_port_t start, _In_ switch_port_t end, _In_ switch_port_flag_t flags, _Out_ switch_core_port_allocator_t **new_allocator)
 Initilize the port allocator.
switch_status_t switch_core_port_allocator_request_port (_In_ switch_core_port_allocator_t *alloc, _Out_ switch_port_t *port_ptr)
 Get a port from the port allocator.
switch_status_t switch_core_port_allocator_free_port (_In_ switch_core_port_allocator_t *alloc, _In_ switch_port_t port)
 Return unused port to the port allocator.
void switch_core_port_allocator_destroy (_Inout_ switch_core_port_allocator_t **alloc)
 destroythe port allocator


Function Documentation

void switch_core_port_allocator_destroy ( _Inout_ switch_core_port_allocator_t **  alloc  ) 

destroythe port allocator

Parameters:
alloc the allocator object

Referenced by switch_rtp_shutdown().

switch_status_t switch_core_port_allocator_free_port ( _In_ switch_core_port_allocator_t alloc,
_In_ switch_port_t  port 
)

Return unused port to the port allocator.

Parameters:
alloc the allocator object
port the port
Returns:
SUCCESS

Referenced by switch_rtp_release_port().

switch_status_t switch_core_port_allocator_new ( _In_ switch_port_t  start,
_In_ switch_port_t  end,
_In_ switch_port_flag_t  flags,
_Out_ switch_core_port_allocator_t **  new_allocator 
)

Initilize the port allocator.

Parameters:
start the starting port
end the ending port
flags flags to change allocator behaviour (e.g. only even/odd portnumbers)
new_allocator new pointer for the return value
Returns:
SWITCH_STATUS_SUCCESS if the operation was a success

Referenced by switch_rtp_request_port().

switch_status_t switch_core_port_allocator_request_port ( _In_ switch_core_port_allocator_t alloc,
_Out_ switch_port_t port_ptr 
)

Get a port from the port allocator.

Parameters:
alloc the allocator object
port_ptr a pointer to the port
Returns:
SUCCESS

Referenced by switch_rtp_request_port().


Generated on Wed May 16 04:00:18 2012 for FreeSWITCH API Documentation by  doxygen 1.4.7