Always send timevals in cmdmon protocol in 64-bit format

This is to avoid incompatibility between 64/32-bit client/server.
While at it, convert all time values in the protocol to timeval
to avoid Y2K38 problem.
This commit is contained in:
Miroslav Lichvar
2009-10-09 15:31:59 +02:00
parent 8265ff2890
commit a7892a1a15
8 changed files with 93 additions and 42 deletions

4
util.h
View File

@@ -35,6 +35,7 @@
#include "addressing.h"
#include "ntp.h"
#include "candm.h"
/* Convert a timeval into a floating point number of seconds */
extern void UTI_TimevalToDouble(struct timeval *a, double *b);
@@ -96,6 +97,9 @@ extern void UTI_TimevalToInt64(struct timeval *src, NTP_int64 *dest);
extern void UTI_Int64ToTimeval(NTP_int64 *src, struct timeval *dest);
extern void UTI_TimevalNetworkToHost(Timeval *src, struct timeval *dest);
extern void UTI_TimevalHostToNetwork(struct timeval *src, Timeval *dest);
#if defined (INLINE_UTILITIES)
#define INLINE_STATIC inline static
#include "util.c"