Prosody DTLS processing: API: sm_dtlstx_create

Prototype Definition

int sm_dtlstx_create(struct sm_dtlstx_create_parms *dtlstxp)

Parameters

*dtlstxp
a structure of the following type:
typedef struct sm_dtlstx_create_parms {
	tSMDTLStxId dtlstx;					/* out */
	tSMModuleId module;					/* in */
} SM_DTLSTX_CREATE_PARMS;

Description

Allocates, on a specific module, a new DTLS[tx] to transmit DTLS packets to a remote device.

If the call completes successfully, the parameter dtlstx will be set to the identifier for that DTLS[tx].

Requires the module dtlstx to have been downloaded.

Fields

dtlstx
The newly created DTLS[tx].
module
A value obtained from sm_open_module() which indicates the module where the DTLS[tx] 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.