clock: Introduce a method to obtain the last synchronization time.
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 <richardcochran@gmail.com>master
parent
fb2c979182
commit
36550e415c
5
clock.c
5
clock.c
|
@ -1287,6 +1287,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;
|
||||
|
|
7
clock.h
7
clock.h
|
@ -156,6 +156,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.
|
||||
|
|
Loading…
Reference in New Issue