conf: add nocrossts option to hwtimestamp directive

This option disables the use of the PTP_SYS_OFFSET_PRECISE ioctl.
This commit is contained in:
Miroslav Lichvar
2017-01-19 16:23:35 +01:00
parent 31b6a14444
commit 50f99ec5f4
4 changed files with 12 additions and 2 deletions

4
conf.c
View File

@@ -1260,6 +1260,7 @@ parse_hwtimestamp(char *line)
iface = ARR_GetNewElement(hwts_interfaces);
iface->name = Strdup(p);
iface->minpoll = 0;
iface->nocrossts = 0;
iface->precision = 100.0e-9;
iface->tx_comp = 0.0;
iface->rx_comp = 0.0;
@@ -1279,6 +1280,9 @@ parse_hwtimestamp(char *line)
} else if (!strcasecmp(p, "txcomp")) {
if (sscanf(line, "%lf%n", &iface->tx_comp, &n) != 1)
break;
} else if (!strcasecmp(p, "nocrossts")) {
n = 0;
iface->nocrossts = 1;
} else {
break;
}