static struct interface *if_lookup_by_ifindex(ifindex_t ifindex,
vrf_id_t vrf_id);
static struct interface *if_lookup_by_index_all_vrf(ifindex_t ifindex);
-static int if_cmp_func(const struct interface *, const struct interface *);
static int if_cmp_index_func(const struct interface *ifp1,
const struct interface *ifp2);
RB_GENERATE(if_name_head, interface, name_entry, if_cmp_func);
return 0;
}
-static int if_cmp_func(const struct interface *ifp1,
- const struct interface *ifp2)
+int if_cmp_func(const struct interface *ifp1, const struct interface *ifp2)
{
return if_cmp_name_func(ifp1->name, ifp2->name);
}
QOBJ_FIELDS;
};
+extern int if_cmp_func(const struct interface *a, const struct interface *b);
+
RB_HEAD(if_name_head, interface);
RB_PROTOTYPE(if_name_head, interface, name_entry, if_cmp_func)
RB_HEAD(if_index_head, interface);