This will be needed by the end-to-end transparent clock code.

Signed-off-by: Richard Cochran <[email protected]>
---
 clock.c | 5 +++++
 clock.h | 7 +++++++
 2 files changed, 12 insertions(+)

diff --git a/clock.c b/clock.c
index 08f0c42..30348dd 100644
--- a/clock.c
+++ b/clock.c
@@ -1187,6 +1187,11 @@ void clock_follow_up_info(struct clock *c, struct 
follow_up_info_tlv *f)
               sizeof(c->status.lastGmPhaseChange));
 }
 
+int clock_free_running(struct clock *c)
+{
+       return c->free_running ? 1 : 0;
+}
+
 int clock_gm_capable(struct clock *c)
 {
        return c->grand_master_capable;
diff --git a/clock.h b/clock.h
index d6a79bd..efde27f 100644
--- a/clock.h
+++ b/clock.h
@@ -142,6 +142,13 @@ struct port *clock_first_port(struct clock *c);
 void clock_follow_up_info(struct clock *c, struct follow_up_info_tlv *f);
 
 /**
+ * Determine if a clock is free running or not.
+ * @param c  The clock instance.
+ * @return   One if the clock is free running or zero otherwise.
+ */
+int clock_free_running(struct clock *c);
+
+/**
  * Obtain the gmCapable flag from a clock's default data set.
  * This function is specific to the 802.1AS standard.
  * @param c  The clock instance.
-- 
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to