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

Function nhgrp_get_group

freebsd/net/route/nhgrp_ctl.c:564–578  ·  view source on GitHub ↗

* Creates/finds nexthop group based on @wn and @num_nhops. * Returns 0 on success with referenced group in @rnd, or * errno. * * If the error is EAGAIN, then the operation can be retried. */

Source from the content-addressed store, hash-verified

562 * If the error is EAGAIN, then the operation can be retried.
563 */
564int
565nhgrp_get_group(struct rib_head *rh, struct weightened_nhop *wn, int num_nhops,
566 struct route_nhop_data *rnd)
567{
568 struct nh_control *ctl = rh->nh_control;
569 struct nhgrp_priv *nhg_priv;
570 int error;
571
572 nhg_priv = get_nhgrp(ctl, wn, num_nhops, &error);
573 if (nhg_priv != NULL)
574 rnd->rnd_nhgrp = nhg_priv->nhg;
575 rnd->rnd_weight = 0;
576
577 return (error);
578}
579
580/*
581 * Creates new nexthop group based on @src group with the nexthops defined in bitmask

Callers 1

change_mpath_routeFunction · 0.85

Calls 1

get_nhgrpFunction · 0.85

Tested by

no test coverage detected