mirror of
https://gitlab.com/chrony/chrony.git
synced 2026-01-20 21:00:20 -05:00
ntp: update NTP-over-PTP support
Update the support for NTP over PTP to the latest specification (currently in the RFC editor queue). Switch the NTP TLV to the organization-specific TLV using the IANA OUI and assigned TLV subtype 0x1. The Network Correction extension field has been assigned type 0x10A. The extfield option accepts F324 as an alias for 10A to not break existing configurations. Drop the experimental status.
This commit is contained in:
21
ntp.h
21
ntp.h
@@ -115,11 +115,17 @@ typedef struct {
|
||||
|
||||
/* Non-authentication extension fields and corresponding internal flags */
|
||||
|
||||
#define NTP_EF_NET_CORRECTION 0x010A
|
||||
#define NTP_EF_EXP_MONO_ROOT 0xF323
|
||||
#define NTP_EF_EXP_NET_CORRECTION 0xF324
|
||||
|
||||
#define NTP_EF_FLAG_EXP_MONO_ROOT 0x1
|
||||
#define NTP_EF_FLAG_EXP_NET_CORRECTION 0x2
|
||||
#define NTP_EF_FLAG_NET_CORRECTION 0x1
|
||||
#define NTP_EF_FLAG_EXP_MONO_ROOT 0x2
|
||||
|
||||
/* Network Correction extension field */
|
||||
typedef struct {
|
||||
NTP_int64 correction;
|
||||
uint32_t pad[4];
|
||||
} NTP_EFNetCorrection;
|
||||
|
||||
/* Pre-NTPv5 experimental extension field */
|
||||
typedef struct {
|
||||
@@ -132,15 +138,6 @@ typedef struct {
|
||||
|
||||
#define NTP_EF_EXP_MONO_ROOT_MAGIC 0xF5BEDD9AU
|
||||
|
||||
/* Experimental extension field to provide PTP corrections */
|
||||
typedef struct {
|
||||
uint32_t magic;
|
||||
NTP_int64 correction;
|
||||
uint32_t reserved[3];
|
||||
} NTP_EFExpNetCorrection;
|
||||
|
||||
#define NTP_EF_EXP_NET_CORRECTION_MAGIC 0x07AC2CEBU
|
||||
|
||||
/* Authentication extension fields */
|
||||
|
||||
#define NTP_EF_NTS_UNIQUE_IDENTIFIER 0x0104
|
||||
|
||||
Reference in New Issue
Block a user