Prosody SNTP Client: API: sm_sntp_create
Prototype Definition
int sm_sntp_create(struct sm_sntp_create_parms *createp)
Parameters
- *createp
-
a structure of the following type:
typedef struct sm_sntp_create_parms {
tSMSNTPId sntp; /* out */
tSMModuleId module; /* in */
struct in_addr address; /* in */
} SM_SNTP_CREATE_PARMS;
Description
Creates an SNTP Client.
Fields
- sntp (Only in Prosody version 2 (TiNG))
- The created SNTP client.
- module (Only in Prosody version 2 (TiNG))
- A value obtained from
sm_open_module()
Indicates the module on which the SNTP client is to be created.
- address (Only in Prosody version 2 (TiNG))
- The address on which the SNTP client listens for replies
Returns
0
if call completed successfully, otherwise a standard error such as:
- ERR_SM_DEVERR - device error
- ERR_SM_NO_RESOURCES - if no suitable output channel free
- ERR_SM_NO_SUCH_MODULE - if invalid module identifier specified
This function is part of the Prosody SNTP Client API.