diff --git a/clock.c b/clock.c index 1569108..a47e1e9 100644 --- a/clock.c +++ b/clock.c @@ -755,6 +755,11 @@ UInteger8 clock_class(struct clock *c) return c->dds.clockQuality.clockClass; } +struct config *clock_config(struct clock *c) +{ + return c->config; +} + 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 1e6cd98..d7377fe 100644 --- a/clock.h +++ b/clock.h @@ -57,6 +57,13 @@ struct port *clock_best_port(struct clock *c); */ UInteger8 clock_class(struct clock *c); +/** + * Obtains a reference to the configuration database. + * @param c The clock instance. + * @return A pointer to the configuration, without fail. + */ +struct config *clock_config(struct clock *c); + /** * Create a clock instance. There can only be one clock in any system, * so subsequent calls will destroy the previous clock instance.