Changeset View
Changeset View
Standalone View
Standalone View
sys/net/route/nhop.c
Show First 20 Lines • Show All 356 Lines • ▼ Show 20 Lines | unlink_nhop(struct nh_control *ctl, struct nhop_priv *nh_priv_del) | ||||
else | else | ||||
DPRINTF("Unlinked nhop %p priv idx %d", priv_ret, idx); | DPRINTF("Unlinked nhop %p priv idx %d", priv_ret, idx); | ||||
consider_resize(ctl, num_buckets_new, num_items_new); | consider_resize(ctl, num_buckets_new, num_items_new); | ||||
return (priv_ret); | return (priv_ret); | ||||
} | } | ||||
bool | |||||
is_nhop_linked(struct nhop_priv *nh_priv) | |||||
{ | |||||
return (nh_priv->nh_idx != 0); | |||||
} | |||||
/* | /* | ||||
* Searches for the nexthop by data specifcied in @nh_priv. | * Searches for the nexthop by data specifcied in @nh_priv. | ||||
* Returns referenced nexthop or NULL. | * Returns referenced nexthop or NULL. | ||||
*/ | */ | ||||
struct nhop_priv * | struct nhop_priv * | ||||
find_nhop(struct nh_control *ctl, const struct nhop_priv *nh_priv) | find_nhop(struct nh_control *ctl, const struct nhop_priv *nh_priv) | ||||
{ | { | ||||
struct nhop_priv *nh_priv_ret; | struct nhop_priv *nh_priv_ret; | ||||
Show All 13 Lines |