| 1448 | } |
| 1449 | |
| 1450 | struct rib_subscription * |
| 1451 | rib_subscribe_internal(struct rib_head *rnh, rib_subscription_cb_t *f, void *arg, |
| 1452 | enum rib_subscription_type type, bool waitok) |
| 1453 | { |
| 1454 | struct rib_subscription *rs; |
| 1455 | struct epoch_tracker et; |
| 1456 | |
| 1457 | if ((rs = allocate_subscription(f, arg, type, waitok)) == NULL) |
| 1458 | return (NULL); |
| 1459 | rs->rnh = rnh; |
| 1460 | |
| 1461 | NET_EPOCH_ENTER(et); |
| 1462 | RIB_WLOCK(rnh); |
| 1463 | CK_STAILQ_INSERT_HEAD(&rnh->rnh_subscribers, rs, next); |
| 1464 | RIB_WUNLOCK(rnh); |
| 1465 | NET_EPOCH_EXIT(et); |
| 1466 | |
| 1467 | return (rs); |
| 1468 | } |
| 1469 | |
| 1470 | struct rib_subscription * |
| 1471 | rib_subscribe_locked(struct rib_head *rnh, rib_subscription_cb_t *f, void *arg, |
no test coverage detected