Bug#558314: eglibc: Add support for NTP API 4
Source: eglibc
Version: 2.10.2-2
Severity: wishlist
Hi,
Could you please provide support for NTP API 4?
The changes in version 4 is the addition of MOD_TAI (ADJ_TAI)
and a tai member in the ntptimeval struct.
The kernel already supports this since 2.6.26 when ADJ_TAI
got added. The current /usr/include/sys/timex.h already
has ADJ_TAI and a tai member in struct timex. The
struct ntptimeval however didn't get changed, since this
is not part of the kernel but implemented only in libc.
>From ntpd's point of view those changes need to be made:
- add "long int tai;" to struct ntptimeval. This is a long in
all known versions I know, but the kernel has an int in
the struct timex (for compatibility reasons with the old
struct?).
- #define NTP_API 4
- Have a MOD_TAI define
- ntp_gettime() should fill in the tai member of struct
ntptimeval.
Note that there is an ADJ_TAI in timex.h, and defines
to change from ADJ_* to MOD_*, but there is no such one
for TAI, NANO or MICRO. The ntp source does not use any of
the ADJ_* names, it only uses MOD_*.
The following defines are missing:
#define MOD_NANO ADJ_NANO
#define MOD_MICRO ADJ_MICRO
#define MOD_TAI ADJ_TAI
(The other 3 ADJ_* defines are not used in ntp.)
Kurt
Reply to: