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

udp/ntp/ntpclient.h

Committer:
andrewboyson
Date:
2019-01-22
Revision:
113:904b40231907
Parent:
112:f8694d0b8858
Child:
124:6e558721ec1c

File content as of revision 113:904b40231907:

#include <stdbool.h>
#include <stdint.h>
#include "ntp.h"

extern bool     NtpClientTrace;
extern void     NtpClientInit(void);
extern void     NtpClientTimeUpdateSuccessful(void);

extern int      NtpClientReplyOffsetMs;
extern int      NtpClientReplyMaxDelayMs;
extern void     NtpClientReply(void (*traceback)(void), struct NtpHeader* pHeader);

extern char     NtpClientQueryServerName[];
extern int      NtpClientQueryInitialInterval;
extern int      NtpClientQueryNormalInterval;
extern int      NtpClientQueryRetryInterval;

extern bool     NtpClientQuerySendRequestsViaIp4;
extern uint32_t NtpClientQueryServerIp4;
extern char     NtpClientQueryServerIp6[];

extern void     NtpClientQueryStartInterval(int type);
extern int      NtpClientQueryPoll(int type, void* pPacket, int* pSize);

enum {
    NTP_QUERY_INTERVAL_INITIAL,
    NTP_QUERY_INTERVAL_NORMAL,
    NTP_QUERY_INTERVAL_RETRY
};