The NetSync Monitor protocol will require us to report the time stamp of the last synchronization. This patch adds new the method.
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 61eaa87..08d9d91 100644 --- a/clock.c +++ b/clock.c @@ -1279,6 +1279,11 @@ static void clock_forward_mgmt_msg(struct clock *c, struct port *p, struct ptp_m } } +tmv_t clock_ingress_time(struct clock *c) +{ + return c->ingress_ts; +} + int clock_manage(struct clock *c, struct port *p, struct ptp_message *msg) { int changed = 0, res, answers; diff --git a/clock.h b/clock.h index 64c5131..94d4ad0 100644 --- a/clock.h +++ b/clock.h @@ -157,6 +157,13 @@ struct ClockIdentity clock_identity(struct clock *c); void clock_fda_changed(struct clock *c); /** + * Obtains the time of the latest synchronization. + * @param c The clock instance. + * @return The local time stamp of the last received Sync message. + */ +tmv_t clock_ingress_time(struct clock *c); + +/** * Manage the clock according to a given message. * @param c The clock instance. * @param p The port on which the message arrived. -- 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