/* Look up link by interface index in the provided cache  */
struct rtnl_link* rtnl_link_get(struct nl_cache *cache, int ifindex)
/* Look up link by interface index in the provided cache  */
struct rtnl_link* rtnl_link_get(struct nl_cache *cache, int ifindex)
{
	struct rtnl_link *link;
	if (cache->c_ops != &rtnl_link_ops)
		return NULL;
	nl_list_for_each_entry(link, &cache->c_items, ce_list) {
		if (link->l_index == ifindex) {
			nl_object_get((struct nl_object *) link);
			return link;
		}
	}
	return NULL;
}