ntp: make NTP-over-PTP domain configurable

Add ptpdomain directive to set the domain number of transmitted and
accepted NTP-over-PTP messages. It might need to be changed in networks
using a PTP profile with the same domain number. The default domain
number of 123 follows the current NTP-over-PTP specification.
This commit is contained in:
Miroslav Lichvar
2024-06-20 14:31:04 +02:00
parent c46e0549ab
commit 4da088ec2f
6 changed files with 37 additions and 3 deletions

1
ptp.h
View File

@@ -35,7 +35,6 @@
#define PTP_VERSION_2_1 (2 | 1 << 4)
#define PTP_TYPE_SYNC 0
#define PTP_TYPE_DELAY_REQ 1
#define PTP_DOMAIN_NTP 123
#define PTP_FLAG_UNICAST (1 << (2 + 8))
#define PTP_TLV_NTP 0x2023