| 1468 | } |
| 1469 | |
| 1470 | struct rib_subscription * |
| 1471 | rib_subscribe_locked(struct rib_head *rnh, rib_subscription_cb_t *f, void *arg, |
| 1472 | enum rib_subscription_type type) |
| 1473 | { |
| 1474 | struct rib_subscription *rs; |
| 1475 | |
| 1476 | NET_EPOCH_ASSERT(); |
| 1477 | RIB_WLOCK_ASSERT(rnh); |
| 1478 | |
| 1479 | if ((rs = allocate_subscription(f, arg, type, false)) == NULL) |
| 1480 | return (NULL); |
| 1481 | rs->rnh = rnh; |
| 1482 | |
| 1483 | CK_STAILQ_INSERT_HEAD(&rnh->rnh_subscribers, rs, next); |
| 1484 | |
| 1485 | return (rs); |
| 1486 | } |
| 1487 | |
| 1488 | /* |
| 1489 | * Remove rtable subscription @rs from the routing table. |
no test coverage detected