diff --git a/interface.c b/interface.c index 3811679..d7eeb41 100644 --- a/interface.c +++ b/interface.c @@ -28,6 +28,11 @@ const char *interface_name(struct interface *iface) return iface->name; } +void interface_set_label(struct interface *iface, const char *label) +{ + strncpy(iface->ts_label, label, MAX_IFNAME_SIZE); +} + void interface_set_name(struct interface *iface, const char *name) { strncpy(iface->name, name, MAX_IFNAME_SIZE); diff --git a/interface.h b/interface.h index 5f449ae..f416b24 100644 --- a/interface.h +++ b/interface.h @@ -53,6 +53,13 @@ const char *interface_label(struct interface *iface); */ const char *interface_name(struct interface *iface); +/** + * Set the time stamping label of a given interface. + * @param iface The interface of interest. + * @param name The desired label for the interface. + */ +void interface_set_label(struct interface *iface, const char *label); + /** * Set the name of a given interface. * @param iface The interface of interest.