diff --git a/clock.c b/clock.c index 5f13a5a..742a7cb 100644 --- a/clock.c +++ b/clock.c @@ -760,6 +760,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 @@ -72,6 +72,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.