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

Function rib_subscribe

freebsd/net/route/route_ctl.c:1435–1448  ·  view source on GitHub ↗

* Subscribe for the changes in the routing table specified by @fibnum and * @family. * * Returns pointer to the subscription structure on success. */

Source from the content-addressed store, hash-verified

1433 * Returns pointer to the subscription structure on success.
1434 */
1435struct rib_subscription *
1436rib_subscribe(uint32_t fibnum, int family, rib_subscription_cb_t *f, void *arg,
1437 enum rib_subscription_type type, bool waitok)
1438{
1439 struct rib_head *rnh;
1440 struct epoch_tracker et;
1441
1442 NET_EPOCH_ENTER(et);
1443 KASSERT((fibnum < rt_numfibs), ("%s: bad fibnum", __func__));
1444 rnh = rt_tables_get_rnh(fibnum, family);
1445 NET_EPOCH_EXIT(et);
1446
1447 return (rib_subscribe_internal(rnh, f, arg, type, waitok));
1448}
1449
1450struct rib_subscription *
1451rib_subscribe_internal(struct rib_head *rnh, rib_subscription_cb_t *f, void *arg,

Callers

nothing calls this directly

Calls 2

rt_tables_get_rnhFunction · 0.85
rib_subscribe_internalFunction · 0.85

Tested by

no test coverage detected