/* Translate a link name to the corresponding interface index  */
int rtnl_link_name2i(struct nl_cache *cache, const char *name)
/* Translate a link name to the corresponding interface index  */
int rtnl_link_name2i(struct nl_cache *cache, const char *name)
{
	int ifindex = 0;
	struct rtnl_link *link;
	link = rtnl_link_get_by_name(cache, name);
	if (link) {
		ifindex = link->l_index;
		rtnl_link_put(link);
	}
	return ifindex;
}