Prosody RTP processing: API: sm_vmprx_get_ports

Prototype Definition

int sm_vmprx_get_ports(struct sm_vmprx_port_parms *portp)

Parameters

*portp
a structure of the following type:
typedef struct sm_vmprx_port_parms {
	tSMVMPrxId vmprx;					/* in */
	int RTP_port;						/* out */
	int RTCP_port;						/* out */
	struct in_addr address;					/* out */
	struct in6_addr ipv6_address;				/* out */
	tSM_UT32 nowait;					/* in */
} SM_VMPRX_PORT_PARMS;

Description

Retrieves the RTP and RTCP port numbers which have been allocated by this VMP[rx] and on which it is listening.

If the call completes successfully, RTP_port will contain the port number where RTP packets should be directed for this VMP[rx]. Similarly, RTCP_port will contain the port number where RTCP packets should be directed.

Fields

vmprx
The VMP[rx] to be interrogated
RTP_port
The UDP port number on which this VMP[rx] is listening for RTP
RTCP_port
The UDP port number on which this VMP[rx] is listening for RTCP
address
The address on which this VMP[rx] is listening if this is a IPv4 VMP[rx].
ipv6_address
The address on which this VMP[rx] is listening if this is a IPv6 VMP[rx].
nowait
Selects blocking or non-blocking mode for this API call. In non-blocking mode the API call may return without the requested information. It is recommended that users wait for sm_vmprx_status() to inform the application that the port and address information is available, rather than using this API call. If the nowait flag is clear, the API call will block until the desired information is available, otherwise the API call will return immediately.

Returns

0 if call completed successfully, otherwise a standard error such as:


This function is part of the Prosody RTP processing API.