Lines Matching full:hook
69 /* Per hook info */
71 hook_p hook; member
167 * Add a hook
170 ng_tee_newhook(node_p node, hook_p hook, const char *name) in ng_tee_newhook() argument
202 hinfo->hook = hook; in ng_tee_newhook()
204 NG_HOOK_SET_PRIVATE(hook, hinfo); in ng_tee_newhook()
264 if (lasthook == sc->left.hook || lasthook == sc->right.hook) { in ng_tee_rcvmsg()
268 NG_FWD_ITEM_HOOK(error, item, hinfo->dest->hook); in ng_tee_rcvmsg()
284 * Receive data on a hook
290 * on through the appropriate destination hook as if it had come
294 ng_tee_rcvdata(hook_p hook, item_p item) in ng_tee_rcvdata() argument
296 const hi_p hinfo = NG_HOOK_PRIVATE(hook); in ng_tee_rcvdata()
303 /* Update stats on incoming hook */ in ng_tee_rcvdata()
316 NG_SEND_DATA_ONLY(error, h->hook, m2); in ng_tee_rcvdata()
323 /* Deliver frame out destination hook */ in ng_tee_rcvdata()
328 NG_FWD_ITEM_HOOK(error, item, h->hook); in ng_tee_rcvdata()
337 * If we have both a left and right hook, then we probably want to extricate
346 if (privdata->left.hook && privdata->right.hook) in ng_tee_close()
347 ng_bypass(privdata->left.hook, privdata->right.hook); in ng_tee_close()
367 * Hook disconnection
370 ng_tee_disconnect(hook_p hook) in ng_tee_disconnect() argument
372 sc_p sc = NG_NODE_PRIVATE(NG_HOOK_NODE(hook)); in ng_tee_disconnect()
373 hi_p const hinfo = NG_HOOK_PRIVATE(hook); in ng_tee_disconnect()
376 hinfo->hook = NULL; in ng_tee_disconnect()
394 /* Die when last hook disconnected. */ in ng_tee_disconnect()
395 if ((NG_NODE_NUMHOOKS(NG_HOOK_NODE(hook)) == 0) && in ng_tee_disconnect()
396 NG_NODE_IS_VALID(NG_HOOK_NODE(hook))) in ng_tee_disconnect()
397 ng_rmnode_self(NG_HOOK_NODE(hook)); in ng_tee_disconnect()