Prosody FMP processing: API: sm_fmprx_status

Prototype Definition

int sm_fmprx_status(struct sm_fmprx_status_parms *statusp)

Parameters

*statusp
a structure of the following type:
typedef struct sm_fmprx_status_parms {
	tSMFMPrxId fmprx;					/* in */
	enum kSMFMPrxStatus {
		kSMFMPrxStatusRunning,
		kSMFMPrxStatusStopped,
		kSMFMPrxStatusGotPorts,
		kSMFMPrxStatusSource,
		kSMFMPrxStatusGotPortsIPv6,
		kSMFMPrxStatusSourceIPv6,
	} status;						/* out */
	union {
		struct {
			int T38_port;				/* out */
			struct in_addr address;			/* out */
		} port;						/* out */
		struct {
			struct in_addr address;			/* out */
			int port;				/* out */
		} source;					/* out */
		struct {
			int T38_port;				/* out */
			struct in6_addr address;		/* out */
		} port_ipv6;					/* out */
		struct {
			struct in6_addr address;		/* out */
			int port;				/* out */
		} source_ipv6;					/* out */
	} u;							/* out */
} SM_FMPRX_STATUS_PARMS;

Description

Returns the current status of the FMP[rx] or an error to indicate that an error has occurred.

When the event, obtained from sm_fmprx_get_event(), is signalled the user must call this function to determine the nature of the status change. The change in status may indicate that an error occurred whilst processing a user request or it may be notifiying the user of a change to the previous state of the FMP[rx].

Fields

fmprx
The FMP[rx] to interrogate
status
One of these values:
kSMFMPrxStatusRunning
Indicates that there is nothing significant to report
kSMFMPrxStatusStopped
Indicates that the FMP[rx] has stopped processing T.38 and that it can be safely destroyed
kSMFMPrxStatusGotPorts
Indicates that IPv4 port information is available.
kSMFMPrxStatusSource
Indicates that IPv4 source address and port information is available.
kSMFMPrxStatusGotPortsIPv6
Indicates that IPv6 port information is available.
kSMFMPrxStatusSourceIPv6
Indicates that IPv6 source address and port information is available.
u
port
This field is only valid if the status is kSMFMPrxStatusGotPorts.
T38_port
The UDP port number on which this FMP[rx] is listening for T.38 packets
address
The IPv4 address on which this FMP[rx] is listening
source
This field is only valid if the status is kSMFMPrxStatusSource.
address
The IPv4 address from which the T.38 data is being received.
port
The UDP port number from which the T.38 data is being received.
port_ipv6
This field is only valid if the status is kSMFMPrxStatusGotPortsIPv6.
T38_port
The UDP port number on which this FMP[rx] is listening for T.38 packets
address
The IPv6 address on which this FMP[rx] is listening
source_ipv6
This field is only valid if the status is kSMFMPrxStatusSourceIPv6.
address
The IPv6 address from which the T.38 data is being received.
port
The UDP port number from which the T.38 data is being received.

Returns

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


This function is part of the Prosody FMP processing API.