diff --git a/interface.c b/interface.c index 1231db96..7909a5ee 100644 --- a/interface.c +++ b/interface.c @@ -6,6 +6,11 @@ */ #include "interface.h" +const char *interface_label(struct interface *iface) +{ + return iface->ts_label; +} + const char *interface_name(struct interface *iface) { return iface->name; diff --git a/interface.h b/interface.h index 94d5b8fd..89f3e94b 100644 --- a/interface.h +++ b/interface.h @@ -24,6 +24,15 @@ struct interface { struct sk_ts_info ts_info; }; +/** + * Obtain the time stamping label of a network interface. This can be + * different from the name of the interface when bonding is in effect. + * + * @param iface The interface of interest. + * @return The time stamping device name of the network interface. + */ +const char *interface_label(struct interface *iface); + /** * Obtains the name of a network interface. * @param iface The interface of interest.