Prosody FMP processing: API: sm_fmprx_create

Prototype Definition

int sm_fmprx_create(struct sm_fmprx_create_parms *fmprxp)

Parameters

*fmprxp
a structure of the following type:
typedef struct sm_fmprx_create_parms {
	tSMFMPrxId fmprx;					/* out */
	tSMModuleId module;					/* in */
	enum kSMFMPrxType {
		kSMFMPrxTypeIPv4,
		kSMFMPrxTypeIPv6,
	} type;							/* in */
	struct in_addr address;					/* in */
	struct in6_addr ipv6_address;				/* in */
} SM_FMPRX_CREATE_PARMS;

Description

Allocates, on a specific module, a new FMP[rx] to receive incoming T.38 data. If the call completes successfully, the parameter fmprx will be set to the identifier for that fmprx.

A FMP[rx] is automatically allocated a port number for incoming RTP data, this information may be obtained by waiting for sm_fmprx_status() to return the port information. The FMP[rx] will discard any incoming packets that do not match it's current configuration settings.

Requires the module fmprx to have been downloaded.

Fields

fmprx
The newly created FMP[rx].
module
A value obtained from sm_open_module() which indicates the module where the FMP[rx] is to be allocated.
type
One of these values:
kSMFMPrxTypeIPv4
The FMP[rx] is to receive IPv4 packets
kSMFMPrxTypeIPv6
The FMP[rx] is to receive IPv6 packets
address
The address on which this FMP[rx] is to listen if type is kSMFMPrxTypeIPv4.
ipv6_address
The address on which this FMP[rx] is to listen if type is kSMFMPrxTypeIPv6.

Returns

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


This function is part of the Prosody FMP processing API.