cmdmon: report offset after manual timestamp as float

Modify the protocol to report the offset as seconds in floating point
instead of integer number of centiseconds.
This commit is contained in:
Miroslav Lichvar
2017-07-25 10:53:48 +02:00
parent 6ec3dc1650
commit 01a29c7a11
6 changed files with 20 additions and 19 deletions

10
candm.h
View File

@@ -362,8 +362,9 @@ typedef struct {
domain socket.
Version 6 (no authentication) : changed format of client accesses by index
(using new request/reply types), new fields and flags in NTP source request
and report, new commands: ntpdata, refresh, serverstats
(using new request/reply types) and manual timestamp, new fields and flags
in NTP source request and report, new commands: ntpdata, refresh,
serverstats
*/
#define PROTO_VERSION_NUMBER 6
@@ -461,7 +462,8 @@ typedef struct {
#define RPY_SERVER_STATS 14
#define RPY_CLIENT_ACCESSES_BY_INDEX2 15
#define RPY_NTP_DATA 16
#define N_REPLY_TYPES 17
#define RPY_MANUAL_TIMESTAMP2 17
#define N_REPLY_TYPES 18
/* Status codes */
#define STT_SUCCESS 0
@@ -569,7 +571,7 @@ typedef struct {
} RPY_Rtc;
typedef struct {
uint32_t centiseconds;
Float offset;
Float dfreq_ppm;
Float new_afreq_ppm;
int32_t EOR;