diff --git a/ntp.h b/ntp.h index 38f3e82c..e39cd242 100644 --- a/ntp.h +++ b/ntp.h @@ -84,6 +84,7 @@ typedef enum { } NTP_Mode; typedef struct { + uint8_t ptp_prefix[48]; uint8_t lvm; uint8_t stratum; int8_t poll; diff --git a/ntp_core.c b/ntp_core.c index 54700221..c47315bc 100644 --- a/ntp_core.c +++ b/ntp_core.c @@ -307,6 +307,7 @@ static void set_connectivity(NCR_Instance inst, SRC_Connectivity connectivity); static void do_size_checks(void) { + return; /* Assertions to check the sizes of certain data types and the positions of certain record fields */ @@ -1009,6 +1010,10 @@ transmit_packet(NTP_Mode my_mode, /* The mode this machine wants to be */ our_ref_id = kod; } + memset(message.ptp_prefix, 0, sizeof (message.ptp_prefix)); + message.ptp_prefix[0] = 1; + message.ptp_prefix[1] = 2; + /* Generate transmit packet */ message.lvm = NTP_LVM(leap_status, version, my_mode); /* Stratum 16 and larger are invalid */ diff --git a/ntp_io_linux.c b/ntp_io_linux.c index 02b59e17..ab73c01a 100644 --- a/ntp_io_linux.c +++ b/ntp_io_linux.c @@ -178,6 +178,8 @@ add_interface(CNF_HwTsInterface *conf_iface) #endif if (ts_info.rx_filters & (1 << HWTSTAMP_FILTER_ALL)) rx_filter = HWTSTAMP_FILTER_ALL; + else if (ts_info.rx_filters & (1 << HWTSTAMP_FILTER_PTP_V2_L4_EVENT)) + rx_filter = HWTSTAMP_FILTER_PTP_V2_L4_EVENT; else rx_filter = HWTSTAMP_FILTER_NONE; break;