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

Function allocate_subscription

freebsd/net/route/route_ctl.c:1411–1427  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1409}
1410
1411static struct rib_subscription *
1412allocate_subscription(rib_subscription_cb_t *f, void *arg,
1413 enum rib_subscription_type type, bool waitok)
1414{
1415 struct rib_subscription *rs;
1416 int flags = M_ZERO | (waitok ? M_WAITOK : M_NOWAIT);
1417
1418 rs = malloc(sizeof(struct rib_subscription), M_RTABLE, flags);
1419 if (rs == NULL)
1420 return (NULL);
1421
1422 rs->func = f;
1423 rs->arg = arg;
1424 rs->type = type;
1425
1426 return (rs);
1427}
1428
1429/*
1430 * Subscribe for the changes in the routing table specified by @fibnum and

Callers 2

rib_subscribe_internalFunction · 0.85
rib_subscribe_lockedFunction · 0.85

Calls 1

mallocFunction · 0.85

Tested by

no test coverage detected