interface: Introduce an access method for the time stamping label.
Many of the users only require a read only reference to the time stamping label of the interface. This patch adds an appropriate method. Signed-off-by: Richard Cochran <richardcochran@gmail.com> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>master
parent
34945679fe
commit
a3c0a88b82
|
@ -6,6 +6,11 @@
|
||||||
*/
|
*/
|
||||||
#include "interface.h"
|
#include "interface.h"
|
||||||
|
|
||||||
|
const char *interface_label(struct interface *iface)
|
||||||
|
{
|
||||||
|
return iface->ts_label;
|
||||||
|
}
|
||||||
|
|
||||||
const char *interface_name(struct interface *iface)
|
const char *interface_name(struct interface *iface)
|
||||||
{
|
{
|
||||||
return iface->name;
|
return iface->name;
|
||||||
|
|
|
@ -24,6 +24,15 @@ struct interface {
|
||||||
struct sk_ts_info ts_info;
|
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.
|
* Obtains the name of a network interface.
|
||||||
* @param iface The interface of interest.
|
* @param iface The interface of interest.
|
||||||
|
|
Loading…
Reference in New Issue