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

Committer:
andrewboyson
Date:
Sun Sep 29 18:51:58 2019 +0000
Revision:
160:6a1d1d368f80
Parent:
139:1f3641abc07f
Corrected some minor bugs

Who changed what in which revision?

UserRevisionLine numberNew contents of line
andrewboyson 112:f8694d0b8858 1 #include <stdbool.h>
andrewboyson 113:904b40231907 2 #include <stdint.h>
andrewboyson 113:904b40231907 3 #include "ntp.h"
andrewboyson 112:f8694d0b8858 4
andrewboyson 113:904b40231907 5 extern bool NtpClientTrace;
andrewboyson 113:904b40231907 6 extern void NtpClientInit(void);
andrewboyson 113:904b40231907 7 extern void NtpClientTimeUpdateSuccessful(void);
andrewboyson 113:904b40231907 8
andrewboyson 124:6e558721ec1c 9 extern int32_t NtpClientReplyOffsetMs;
andrewboyson 124:6e558721ec1c 10 extern int32_t NtpClientReplyMaxDelayMs;
andrewboyson 138:5ff0c7069300 11 extern void NtpClientReply(void (*traceback)(void), char* pPacket);
andrewboyson 112:f8694d0b8858 12
andrewboyson 139:1f3641abc07f 13 extern uint64_t NtpClientQueryTime;
andrewboyson 139:1f3641abc07f 14
andrewboyson 113:904b40231907 15 extern char NtpClientQueryServerName[];
andrewboyson 160:6a1d1d368f80 16 extern int32_t NtpClientQueryInitialInterval;
andrewboyson 160:6a1d1d368f80 17 extern int32_t NtpClientQueryNormalInterval;
andrewboyson 160:6a1d1d368f80 18 extern int32_t NtpClientQueryRetryInterval;
andrewboyson 113:904b40231907 19
andrewboyson 113:904b40231907 20 extern bool NtpClientQuerySendRequestsViaIp4;
andrewboyson 113:904b40231907 21 extern uint32_t NtpClientQueryServerIp4;
andrewboyson 113:904b40231907 22 extern char NtpClientQueryServerIp6[];
andrewboyson 112:f8694d0b8858 23
andrewboyson 113:904b40231907 24 extern void NtpClientQueryStartInterval(int type);
andrewboyson 138:5ff0c7069300 25 extern int NtpClientQueryPoll(int type, char* pPacket, int* pSize);
andrewboyson 112:f8694d0b8858 26
andrewboyson 113:904b40231907 27 enum {
andrewboyson 113:904b40231907 28 NTP_QUERY_INTERVAL_INITIAL,
andrewboyson 113:904b40231907 29 NTP_QUERY_INTERVAL_NORMAL,
andrewboyson 113:904b40231907 30 NTP_QUERY_INTERVAL_RETRY
andrewboyson 113:904b40231907 31 };