A stack which works with or without an Mbed os library. Provides IPv4 or IPv6 with a full 1500 byte buffer.

Dependents:   oldheating gps motorhome heating

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers ntpclient.h Source File

ntpclient.h

00001 #include <stdbool.h>
00002 #include <stdint.h>
00003 #include "ntp.h"
00004 
00005 extern bool     NtpClientTrace;
00006 extern void     NtpClientInit(void);
00007 extern void     NtpClientTimeUpdateSuccessful(void);
00008 
00009 extern int32_t  NtpClientReplyOffsetMs;
00010 extern int32_t  NtpClientReplyMaxDelayMs;
00011 extern void     NtpClientReply(void (*traceback)(void), char* pPacket);
00012 
00013 extern uint64_t NtpClientQueryTime;
00014 
00015 extern char     NtpClientQueryServerName[];
00016 extern int32_t  NtpClientQueryInitialInterval;
00017 extern int32_t  NtpClientQueryNormalInterval;
00018 extern int32_t  NtpClientQueryRetryInterval;
00019 
00020 extern bool     NtpClientQuerySendRequestsViaIp4;
00021 extern uint32_t NtpClientQueryServerIp4;
00022 extern char     NtpClientQueryServerIp6[];
00023 
00024 extern void     NtpClientQueryStartInterval(int type);
00025 extern int      NtpClientQueryPoll(int type, char* pPacket, int* pSize);
00026 
00027 enum {
00028     NTP_QUERY_INTERVAL_INITIAL,
00029     NTP_QUERY_INTERVAL_NORMAL,
00030     NTP_QUERY_INTERVAL_RETRY
00031 };