As part of the NetSync Monitor protocol, the port will need to have access to the current data set. This patch adds the appropriate function.
Signed-off-by: Richard Cochran <richardcoch...@gmail.com> --- clock.c | 5 +++++ clock.h | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/clock.c b/clock.c index 41c8f81..61eaa87 100644 --- a/clock.c +++ b/clock.c @@ -764,6 +764,11 @@ struct config *clock_config(struct clock *c) return c->config; } +struct currentDS *clock_current_dataset(struct clock *c) +{ + return &c->cur; +} + static int clock_add_port(struct clock *c, int phc_index, enum timestamp_type timestamping, struct interface *iface) diff --git a/clock.h b/clock.h index 986d363..64c5131 100644 --- a/clock.h +++ b/clock.h @@ -73,6 +73,13 @@ UInteger8 clock_class(struct clock *c); struct config *clock_config(struct clock *c); /** + * Obtains a reference to the current dataset. + * @param c The clock instance. + * @return A pointer to the current dataset, without fail. + */ +struct currentDS *clock_current_dataset(struct clock *c); + +/** * Obtains the required time stamping mode. * @param c The clock instance. * @return The value of required time stamping mode, which is a bit mask -- 2.11.0 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel