* 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. */
| 562 | * If the error is EAGAIN, then the operation can be retried. |
| 563 | */ |
| 564 | int |
| 565 | nhgrp_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 |
no test coverage detected