Networking_TimeSync_EnableCustomNTP function
Header: #include <applibs/networking.h>
Instructs the device to use the NTP server addresses provided by the user. Up to two host names or IP addresses may be specified and up to three will be attempted if the default server is enabled.
int Networking_TimeSync_EnableCustomNtp(const char *primaryNtpServer, const char *secondaryNtpServer, Networking_NtpOption option);
Parameters
primaryNtpServerThe primary NTP server address to use.secondaryNtpServerThe secondary NTP server address to use. This can be set to NULL.optionEnables or disables the default NTP server.
Errors
Returns -1 if an error is encountered and sets errno to the error value.
EFAULT: the
primaryNtpServeris NULL.EACCES: the calling application doesn't have the TimeSyncConfig capability.
ERANGE: the
primaryNtpServerorsecondaryNtpServerlength is greater than the maximum FQDN length or is not null-terminated.
Any other errno may also be specified; such errors aren't deterministic, and there is no guarantee that the same behavior will be retained through system updates.
Return value
Returns 0 for success, or -1 for failure, in which case errno will be set to the error value.
Concepts and samples
Povratne informacije
Pošalјite i prikažite povratne informacije za