func (u *NetLinkTopoUpdater) addGenericLinkToTopology(link netlink.Link) *Interface { u.linkCache[link.Attrs().Index] = *link.Attrs() /* create a port, attach it to the current container, then create attach a single interface to this port */ port := u.Container.Topology.NewPort(link.Attrs().Name, u.Container) intf := u.Container.Topology.NewInterface(link.Attrs().Name, port) /* TODO(safchain) Add more metadatas here */ intf.Mac = link.Attrs().HardwareAddr.String() return intf }