* Returns pointer to array of nexthops with weights for * given @nhg. Stores number of items in the array into @pnum_nhops. */
| 684 | * given @nhg. Stores number of items in the array into @pnum_nhops. |
| 685 | */ |
| 686 | struct weightened_nhop * |
| 687 | nhgrp_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 |
| 700 | dump_nhgrp_entry(struct rib_head *rh, const struct nhgrp_priv *nhg_priv, |
no outgoing calls
no test coverage detected