Prosody DTLS processing: API: sm_dtlsrx_status

Prototype Definition

int sm_dtlsrx_status(struct sm_dtlsrx_status_parms *statusp)

Parameters

*statusp
a structure of the following type:
typedef struct sm_dtlsrx_status_parms {
	tSMDTLSrxId dtlsrx;					/* in */
	enum kSMDTLSrxStatus {
		kSMDTLSrxStatusRunning,
		kSMDTLSrxStatusStopped,
		kSMDTLSrxStatusHasPacket,
		kSMDTLSrxStatusOverrun,
	} status;						/* out */
} SM_DTLSRX_STATUS_PARMS;

Description

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

When the event, obtained from sm_dtlsrx_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 DTLS[rx].

Fields

dtlsrx
The DTLS[rx] to interrogate
status
One of these values:
kSMDTLSrxStatusRunning
Indicates that there is nothing significant to report
kSMDTLSrxStatusStopped
Indicates that the DTLS[rx] has stopped processing DTLS and that it can be safely destroyed
kSMDTLSrxStatusHasPacket
Indicates that a DTLS packet is available to be read.
kSMDTLSrxStatusOverrun
Data has been lost because the packet buffer has overflowed.

Returns

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


This function is part of the Prosody DTLS processing API.