Let each interface use its own transport.
This will allow running a boundary clock that bridges different kinds of PTP networks. Signed-off-by: Richard Cochran <richardcochran@gmail.com>master
parent
433b6f635e
commit
59f00b5061
5
ptp4l.c
5
ptp4l.c
|
@ -108,7 +108,9 @@ int main(int argc, char *argv[])
|
||||||
break;
|
break;
|
||||||
case 'i':
|
case 'i':
|
||||||
if (nports < MAX_PORTS) {
|
if (nports < MAX_PORTS) {
|
||||||
iface[nports++].name = optarg;
|
iface[nports].name = optarg;
|
||||||
|
iface[nports].transport = transport;
|
||||||
|
nports++;
|
||||||
} else {
|
} else {
|
||||||
fprintf(stderr, "too many interfaces\n");
|
fprintf(stderr, "too many interfaces\n");
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -156,7 +158,6 @@ int main(int argc, char *argv[])
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
for (i = 0; i < nports; i++) {
|
for (i = 0; i < nports; i++) {
|
||||||
iface[i].transport = transport;
|
|
||||||
iface[i].timestamping = timestamping;
|
iface[i].timestamping = timestamping;
|
||||||
}
|
}
|
||||||
if (timestamping == TS_SOFTWARE || timestamping == TS_LEGACY_HW) {
|
if (timestamping == TS_SOFTWARE || timestamping == TS_LEGACY_HW) {
|
||||||
|
|
Loading…
Reference in New Issue