1 /* SPDX-License-Identifier: GPL-2.0+ */
9 #define NTP_SERVICE_PORT 123
10 #define SNTP_PACKET_LEN 48
13 #define NTP_LI_NOLEAP 0x0
14 #define NTP_LI_61SECS 0x1
15 #define NTP_LI_59SECS 0x2
16 #define NTP_LI_ALARM 0x3
23 #define NTP_MODE_RESERVED 0
24 #define NTP_MODE_SYMACTIVE 1 /* Symmetric Active */
25 #define NTP_MODE_SYMPASSIVE 2 /* Symmetric Passive */
26 #define NTP_MODE_CLIENT 3
27 #define NTP_MODE_SERVER 4
28 #define NTP_MODE_BROADCAST 5
29 #define NTP_MODE_NTPCTRL 6 /* Reserved for NTP control message */
30 #define NTP_MODE_PRIVATE 7 /* Reserved for private use */
48 unsigned long long reference_timestamp;
49 unsigned long long originate_timestamp;
50 unsigned long long receive_timestamp;
51 unsigned long long transmit_timestamp;
52 } __attribute__((packed));
54 int sntp_prereq(void *data);
55 int sntp_start(void *data); /* Begin SNTP */
57 #endif /* __SNTP_H__ */