40#define NTP_MAX_MSG_SIZE 68
42#define NTP_UNIX_EPOCH 2208988800U
45#define NTP_KISS_CODE(a, b, c, d) (((a) << 24) | ((b) << 16) | ((c) << 8) | (d))
59 NTP_LI_NO_WARNING = 0,
60 NTP_LI_LAST_MIN_HAS_61_SECS = 1,
61 NTP_LI_LAST_MIN_HAS_59_SECS = 2,
62 NTP_LI_ALARM_CONDITION = 3
85 NTP_MODE_SYMMETRIC_ACTIVE = 1,
86 NTP_MODE_SYMMETRIC_PASSIVE = 2,
89 NTP_MODE_BROADCAST = 5
122#if defined(__CWCC__) || defined(_WIN32)
123 #pragma pack(push, 1)
144#if defined(_CPU_BIG_ENDIAN) && !defined(__ICCRX__)
157 uint32_t rootDispersion;
158 uint32_t referenceId;
159 NtpTimestamp referenceTimestamp;
160 NtpTimestamp originateTimestamp;
161 NtpTimestamp receiveTimestamp;
162 NtpTimestamp transmitTimestamp;
173 uint8_t messageDigest[16];
178#if defined(__CWCC__) || defined(_WIN32)
NtpLeapIndicator
Leap indicator.
Definition ntp_common.h:58
NtpKissCode
Kiss codes.
Definition ntp_common.h:103
@ NTP_KISS_CODE_RMOT
Somebody is tinkering with the association from a remote host running ntpdc.
Definition ntp_common.h:116
@ NTP_KISS_CODE_INIT
The association has not yet synchronized for the first time.
Definition ntp_common.h:112
@ NTP_KISS_CODE_MCST
The association belongs to a manycast server.
Definition ntp_common.h:113
@ NTP_KISS_CODE_CRYP
Cryptographic authentication or identification failed.
Definition ntp_common.h:108
@ NTP_KISS_CODE_RATE
Rate exceeded.
Definition ntp_common.h:115
@ NTP_KISS_CODE_NKEY
No key found.
Definition ntp_common.h:114
@ NTP_KISS_CODE_DROP
Lost peer in symmetric mode.
Definition ntp_common.h:110
@ NTP_KISS_CODE_ACST
The association belongs to a anycast server.
Definition ntp_common.h:104
@ NTP_KISS_CODE_BCST
The association belongs to a broadcast server.
Definition ntp_common.h:107
@ NTP_KISS_CODE_DENY
Access denied by remote server.
Definition ntp_common.h:109
@ NTP_KISS_CODE_RSTR
Access denied due to local policy.
Definition ntp_common.h:111
@ NTP_KISS_CODE_AUTH
Server authentication failed.
Definition ntp_common.h:105
@ NTP_KISS_CODE_STEP
A step change in system time has occurred.
Definition ntp_common.h:117
@ NTP_KISS_CODE_AUTO
Autokey sequence failed.
Definition ntp_common.h:106
NtpVersion
NTP version numbers.
Definition ntp_common.h:71
NtpMode
Protocol modes.
Definition ntp_common.h:84
typedef __packed_struct
NTP timestamp representation.
Definition ntp_common.h:132