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@124:6e558721ec1c, 2019-02-22 (annotated)
- Committer:
- andrewboyson
- Date:
- Fri Feb 22 08:41:47 2019 +0000
- Revision:
- 124:6e558721ec1c
- Parent:
- 113:904b40231907
- Child:
- 138:5ff0c7069300
Moved NTP conversion routines from clock library
Who changed what in which revision?
User | Revision | Line number | New 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 | 113:904b40231907 | 11 | extern void NtpClientReply(void (*traceback)(void), struct NtpHeader* pHeader); |
andrewboyson | 112:f8694d0b8858 | 12 | |
andrewboyson | 113:904b40231907 | 13 | extern char NtpClientQueryServerName[]; |
andrewboyson | 113:904b40231907 | 14 | extern int NtpClientQueryInitialInterval; |
andrewboyson | 113:904b40231907 | 15 | extern int NtpClientQueryNormalInterval; |
andrewboyson | 113:904b40231907 | 16 | extern int NtpClientQueryRetryInterval; |
andrewboyson | 113:904b40231907 | 17 | |
andrewboyson | 113:904b40231907 | 18 | extern bool NtpClientQuerySendRequestsViaIp4; |
andrewboyson | 113:904b40231907 | 19 | extern uint32_t NtpClientQueryServerIp4; |
andrewboyson | 113:904b40231907 | 20 | extern char NtpClientQueryServerIp6[]; |
andrewboyson | 112:f8694d0b8858 | 21 | |
andrewboyson | 113:904b40231907 | 22 | extern void NtpClientQueryStartInterval(int type); |
andrewboyson | 113:904b40231907 | 23 | extern int NtpClientQueryPoll(int type, void* pPacket, int* pSize); |
andrewboyson | 112:f8694d0b8858 | 24 | |
andrewboyson | 113:904b40231907 | 25 | enum { |
andrewboyson | 113:904b40231907 | 26 | NTP_QUERY_INTERVAL_INITIAL, |
andrewboyson | 113:904b40231907 | 27 | NTP_QUERY_INTERVAL_NORMAL, |
andrewboyson | 113:904b40231907 | 28 | NTP_QUERY_INTERVAL_RETRY |
andrewboyson | 113:904b40231907 | 29 | }; |