* Subscribe for the changes in the routing table specified by @fibnum and * @family. * * Returns pointer to the subscription structure on success. */
| 1433 | * Returns pointer to the subscription structure on success. |
| 1434 | */ |
| 1435 | struct rib_subscription * |
| 1436 | rib_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 | |
| 1450 | struct rib_subscription * |
| 1451 | rib_subscribe_internal(struct rib_head *rnh, rib_subscription_cb_t *f, void *arg, |
nothing calls this directly
no test coverage detected