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

Function ng_send_fn1

freebsd/netgraph/ng_base.c:3703–3723  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3701}
3702
3703int
3704ng_send_fn1(node_p node, hook_p hook, ng_item_fn *fn, void * arg1, int arg2,
3705 int flags)
3706{
3707 item_p item;
3708
3709 if ((item = ng_alloc_item(NGQF_FN, flags)) == NULL) {
3710 return (ENOMEM);
3711 }
3712 item->el_flags |= NGQF_WRITER;
3713 NG_NODE_REF(node); /* and one for the item */
3714 NGI_SET_NODE(item, node);
3715 if (hook) {
3716 NG_HOOK_REF(hook);
3717 NGI_SET_HOOK(item, hook);
3718 }
3719 NGI_FN(item) = fn;
3720 NGI_ARG1(item) = arg1;
3721 NGI_ARG2(item) = arg2;
3722 return(ng_snd_item(item, flags));
3723}
3724
3725/*
3726 * Send ng_item_fn2 function call to the specified node.

Callers 2

ng_ksocket_incomingFunction · 0.70
ng_send_fnFunction · 0.70

Calls 2

ng_alloc_itemFunction · 0.70
ng_snd_itemFunction · 0.70

Tested by

no test coverage detected