Prosody DTLS processing: API: sm_dtlsrx_create

Prototype Definition

int sm_dtlsrx_create(struct sm_dtlsrx_create_parms *dtlsrxp)

Parameters

*dtlsrxp
a structure of the following type:
typedef struct sm_dtlsrx_create_parms {
	tSMDTLSrxId dtlsrx;					/* out */
	tSMModuleId module;					/* in */
} SM_DTLSRX_CREATE_PARMS;

Description

Allocates, on a specific module, a new DTLS[rx] to process incoming DTLS packets. If the call completes successfully, the parameter dtlsrx will be set to the identifier for that dtlsrx.

Requires the module dtlsrx to have been downloaded.

Fields

dtlsrx
The newly created DTLS[rx].
module
A value obtained from sm_open_module() which indicates the module where the DTLS[rx] is to be allocated.

Returns

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


This function is part of the Prosody DTLS processing API.