MCPcopy Create free account
hub / github.com/F-Stack/f-stack / nhgrp_get_nhops

Function nhgrp_get_nhops

freebsd/net/route/nhgrp_ctl.c:686–697  ·  view source on GitHub ↗

* Returns pointer to array of nexthops with weights for * given @nhg. Stores number of items in the array into @pnum_nhops. */

Source from the content-addressed store, hash-verified

684 * given @nhg. Stores number of items in the array into @pnum_nhops.
685 */
686struct weightened_nhop *
687nhgrp_get_nhops(struct nhgrp_object *nhg, uint32_t *pnum_nhops)
688{
689 struct nhgrp_priv *nhg_priv;
690
691 KASSERT(((nhg->nhg_flags & MPF_MULTIPATH) != 0), ("nhop is not mpath"));
692
693 nhg_priv = NHGRP_PRIV(nhg);
694 *pnum_nhops = nhg_priv->nhg_nh_count;
695
696 return (nhg_priv->nhg_nh_weights);
697}
698
699__noinline static int
700dump_nhgrp_entry(struct rib_head *rh, const struct nhgrp_priv *nhg_priv,

Callers 9

destroy_rtentryFunction · 0.70
change_mpath_routeFunction · 0.70
rib_walk_delFunction · 0.70
check_urpfFunction · 0.50
check_urpfFunction · 0.50
select_nhopFunction · 0.50
sysctl_dumpentryFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected