clock: Add a method to determine whether a clock is free running.
This will be needed by the end-to-end transparent clock code. Signed-off-by: Richard Cochran <richardcochran@gmail.com>master
parent
8feaa8ada8
commit
8f2b1db4fd
5
clock.c
5
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;
|
||||
|
|
7
clock.h
7
clock.h
|
@ -141,6 +141,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.
|
||||
|
|
Loading…
Reference in New Issue