Networking_SntpServer_Start Function
Header: #include <applibs/networking.h>
Registers and starts an SNTP server for a network interface.
int Networking_SntpServer_Start(const char *networkInterfaceName, const Networking_SntpServerConfig *sntpServerConfig);
Parameters
networkInterfaceName
The name of the network interface to configure.sntpServerConfig
A pointer to the Networking_SntpServerConfig struct that represents the SNTP server configuration.
Errors
Returns -1 if an error is encountered and sets errno
to the error value.
EACCES: the calling application doesn't have the SntpService capability.
EFAULT: the
networkInterfaceName
parameter is NULL.EFAULT: the
sntpServerConfig
parameter is NULL.ENOENT: the
networkInterfaceName
parameter refers to an interface that does not exist..EPERM: this operation is not allowed on the network interface.
EAGAIN: the networking stack isn't ready.
Any other errno
may also be specified; such errors aren't deterministic and the same behavior might not 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.
Remarks
If the SNTP server is already running and attached to the interface, this function returns success. If the networkInterfaceName interface is down or disabled, the SNTP server is registered for the interface but server isn't started.
Application manifest requirements
The application manifest must include the SntpService capability.