HomeFreeBSD

routing: provide dedicated function for nhgrp creation and linking.

Description

routing: provide dedicated function for nhgrp creation and linking.

There is a need to store client metadata in nexthops and nexthop groups.
This metadata is immutable and participate in nhop/nhg comparison.

Nexthops KPI already supports its: nexthop creation pattern is

nhop_alloc()
nhop_set_...()
...
nhop_get_nhop()

This change provides a similar pattern for the nexthop groups.
Specifically, it adds nhgrp_alloc(), nhgrp_get_nhgrp() and
nhgrp_set_uidx().

MFC after: 2 weeks

(cherry picked from commit 42f8123a4fa8354f07e3ebce1d3b6c2def7db5a3)

Details

Provenance
melifaroAuthored on Dec 2 2022, 5:58 PM
Parents
rG77afa3132ee9: netinet: pass cred instead of the curthread to ifaddr manipulation funcs.
Branches
Unknown
Tags
Unknown