Prosody generic: API: sm_sec_module
Prototype Definition
int sm_sec_module(struct sm_sec_module_parms *module_parmsp)
Parameters
- *module_parmsp
 - 
a structure of the following type:
typedef struct sm_sec_module_parms {
	tSMModuleId module_id;					/* in */
	tSM_INT exclude_data_to_module;				/* in */
	tSM_INT exclude_data_from_module;			/* in */
	tSM_INT key_id;						/* in */
	char *context;						/* in */
	tSMSecCallback encdec;					/* in */
} SM_SEC_MODULE_PARMS;
 
Description
Sets up encrypted communication with module.  Must be used in conjunction 
with a compatible external encryption library, for example
kmlib3des.
If encryption is required, this function must be invoked immediately after 
calling
sm_open_module().
Requires an encryption capable kernel to be running on the module.
Fields
- module_id
 - An id for an open module previously obtained from
sm_open_module()
 - exclude_data_to_module
 - If non-zero causes bulk data (e.g. replay data) sent to module to be 
excluded from encryption.
 - exclude_data_from_module
 - If non-zero causes bulk data (e.g. record data) sent from module to be 
excluded from encryption.
 - key_id
 - An id from an external encryption library used to identify a previously 
agreed key for use with this module.
 - context
 - The context from an external encryption library used by TiNG library in 
callbacks.
 - encdec
 - The callback with type void (*)(tSM_INT,tSM_INT,void*,tSM_UT8*) from an 
external encryption library used by TiNG library to encrypt and decrypt 
messages.
 
Returns
0
 if call completed successfully, otherwise a standard error such as:
- ERR_SM_NO_SUCH_MODULE - if no such module exists
 
This function is part of the Prosody generic API.