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

Function rib_subscribe_internal

freebsd/net/route/route_ctl.c:1450–1468  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1448}
1449
1450struct rib_subscription *
1451rib_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
1470struct rib_subscription *
1471rib_subscribe_locked(struct rib_head *rnh, rib_subscription_cb_t *f, void *arg,

Callers 2

in6_initheadFunction · 0.85
rib_subscribeFunction · 0.85

Calls 1

allocate_subscriptionFunction · 0.85

Tested by

no test coverage detected