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

Function rib_subscribe_locked

freebsd/net/route/route_ctl.c:1470–1486  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1468}
1469
1470struct rib_subscription *
1471rib_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.

Callers 1

try_setup_fd_instanceFunction · 0.85

Calls 1

allocate_subscriptionFunction · 0.85

Tested by

no test coverage detected