diff --git a/interface.c b/interface.c index 7909a5e..460ceb8 100644 --- a/interface.c +++ b/interface.c @@ -6,6 +6,11 @@ */ #include "interface.h" +int interface_get_tsinfo(struct interface *iface) +{ + return sk_get_ts_info(iface->ts_label, &iface->ts_info); +} + const char *interface_label(struct interface *iface) { return iface->ts_label; diff --git a/interface.h b/interface.h index 89f3e94..05cfb10 100644 --- a/interface.h +++ b/interface.h @@ -24,6 +24,13 @@ struct interface { struct sk_ts_info ts_info; }; +/** + * Populate the time stamping information of a given interface. + * @param iface The interface of interest. + * @return zero on success, negative on failure. + */ +int interface_get_tsinfo(struct interface *iface); + /** * Obtain the time stamping label of a network interface. This can be * different from the name of the interface when bonding is in effect.