MCPcopy Index your code
hub / github.com/F-Stack/f-stack / ng_ksocket_constructor

Function ng_ksocket_constructor

freebsd/netgraph/ng_ksocket.c:512–529  ·  view source on GitHub ↗

* Node type constructor * The NODE part is assumed to be all set up. * There is already a reference to the node for us. */

Source from the content-addressed store, hash-verified

510 * There is already a reference to the node for us.
511 */
512static int
513ng_ksocket_constructor(node_p node)
514{
515 priv_p priv;
516
517 /* Allocate private structure */
518 priv = malloc(sizeof(*priv), M_NETGRAPH_KSOCKET, M_NOWAIT | M_ZERO);
519 if (priv == NULL)
520 return (ENOMEM);
521
522 LIST_INIT(&priv->embryos);
523 /* cross link them */
524 priv->node = node;
525 NG_NODE_SET_PRIVATE(node, priv);
526
527 /* Done */
528 return (0);
529}
530
531/*
532 * Give our OK for a hook to be added. The hook name is of the

Callers 1

ng_ksocket_acceptFunction · 0.85

Calls 1

mallocFunction · 0.85

Tested by

no test coverage detected