On Tue, Apr 12, 2022 at 01:43:35PM +0200, Martin Pecka wrote: > As discussed on linuxptp-users ("Config section for /var/log/ptp4lro creates > an additional port"), configuring different file modes via port sections in > config file does not work as intended. So I instead chose the way of passing > the required information all the way down to uds_transport_create(), which > is not easy as the differentiation between RW and RO ports lives only in > clock.c, and uds_transport_create() does not have access to either the port > instance or its config. I don't say this solution is nice, but it works. Any > ideas how to make it nicer are welcome.
See clock_create() : uds_ifname = config_get_string(config, NULL, "uds_ro_address"); c->uds_ro_if = interface_create(uds_ifname); So all you have to do is look up "uds_ro_address" in uds_open, and if there is a match, then look up the file mode and apply it. Thanks, Richard _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel