clock: Introduce a method to get the current dataset.
As part of the NetSync Monitor protocol, the port will need to have access to the current data set. This patch adds the appropriate function. Signed-off-by: Richard Cochran <richardcochran@gmail.com>master
parent
9d48046e95
commit
fb2c979182
5
clock.c
5
clock.c
|
@ -760,6 +760,11 @@ struct config *clock_config(struct clock *c)
|
|||
return c->config;
|
||||
}
|
||||
|
||||
struct currentDS *clock_current_dataset(struct clock *c)
|
||||
{
|
||||
return &c->cur;
|
||||
}
|
||||
|
||||
static int clock_add_port(struct clock *c, int phc_index,
|
||||
enum timestamp_type timestamping,
|
||||
struct interface *iface)
|
||||
|
|
7
clock.h
7
clock.h
|
@ -72,6 +72,13 @@ UInteger8 clock_class(struct clock *c);
|
|||
*/
|
||||
struct config *clock_config(struct clock *c);
|
||||
|
||||
/**
|
||||
* Obtains a reference to the current dataset.
|
||||
* @param c The clock instance.
|
||||
* @return A pointer to the current dataset, without fail.
|
||||
*/
|
||||
struct currentDS *clock_current_dataset(struct clock *c);
|
||||
|
||||
/**
|
||||
* Obtains the required time stamping mode.
|
||||
* @param c The clock instance.
|
||||
|
|
Loading…
Reference in New Issue