sntp_client.c
error_t sntpClientInit(SntpClientContext *context)
Initialize SNTP client context.
Definition: sntp_client.c:55
void sntpClientCloseConnection(SntpClientContext *context)
Close UDP connection.
Definition: sntp_client_misc.c:81
uint32_t sntpClientGetKissCode(SntpClientContext *context)
Retrieve the kiss code from a Kiss-of-Death message.
Definition: sntp_client.c:231
error_t sntpClientOpenConnection(SntpClientContext *context)
Open UDP connection.
Definition: sntp_client_misc.c:52
#define SNTP_CLIENT_INIT_RETRANSMIT_TIMEOUT
Definition: sntp_client.h:54
error_t sntpClientBindToInterface(SntpClientContext *context, NetInterface *interface)
Bind the SNTP client to a particular network interface.
Definition: sntp_client.c:103
error_t sntpClientGetTimestamp(SntpClientContext *context, NtpTimestamp *timestamp)
Retrieve current time from NTP server.
Definition: sntp_client.c:154
void sntpClientDeinit(SntpClientContext *context)
Release SNTP client context.
Definition: sntp_client.c:257
error_t sntpClientReceiveResponse(SntpClientContext *context)
Wait for NTP server's response.
Definition: sntp_client_misc.c:158
error_t sntpClientParseResponse(SntpClientContext *context, NtpTimestamp *timestamp)
Parse NTP server's response.
Definition: sntp_client_misc.c:301
error_t sntpClientSendRequest(SntpClientContext *context)
Send request to the NTP server.
Definition: sntp_client_misc.c:99
error_t sntpClientSetServerAddr(SntpClientContext *context, const IpAddr *serverIpAddr, uint16_t serverPort)
Specify the IP address of the NTP server.
Definition: sntp_client.c:126
TCP/IP stack core.
SNTP client (Simple Network Time Protocol)
Debugging facilities.
error_t sntpClientSetTimeout(SntpClientContext *context, systime_t timeout)
Set communication timeout.
Definition: sntp_client.c:82
Helper functions for SNTP client.