Prosody DTLS processing: API: sm_dtlstx_config

Prototype Definition

int sm_dtlstx_config(struct sm_dtlstx_config_parms *configp)

Parameters

*configp
a structure of the following type:
typedef struct sm_dtlstx_config_parms {
	tSMDTLStxId dtlstx;					/* in */
	SOCKADDR_IN destination;				/* in */
	SOCKADDR_IN source;					/* in */
} SM_DTLSTX_CONFIG_PARMS;

Description

Configures a DTLS[tx] to send DTLS packets to a device with the specified IPv4 address.

Fields

dtlstx
The DTLS[tx] to configure
destination
The SOCKADDR_IN structure specifying the destination IP address and port for the DTLS packets. A struct SOCKADDR_IN must be configured with an address family, an IP address and a port. Note that most operating systems define this structure such that fields are in network byte order. The structure must be correctly cast such that an IP V4 address is specified.
source
The SOCKADDR_IN structure allows you to specify the source IP address and port for the DTLS data. A struct SOCKADDR_IN must be configured with an address family. The IP address may be specified, or the value INADDR_ANY may be used to indicate that any suitable address may be used. The port number may be specified, or the value zero may be used to indicate that a suitable port number is to be automatically allocated and used. Note that most operating systems define this structure such that fields are in network byte order. The structure must be correctly cast such that an IP V4 address is specified.

Returns

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


This function is part of the Prosody DTLS processing API.