Lines Matching full:hook
90 hook_p hook; /* the hook for this proto */ member
121 static void cisco_keepalive(node_p node, hook_p hook, void *arg1, int arg2);
195 /* Initialise the varous protocol hook holders */ in cisco_constructor()
205 * Check new hook
208 cisco_newhook(node_p node, hook_p hook, const char *name) in cisco_newhook() argument
213 sc->downstream.hook = hook; in cisco_newhook()
214 NG_HOOK_SET_PRIVATE(hook, &sc->downstream); in cisco_newhook()
220 sc->inet.hook = hook; in cisco_newhook()
221 NG_HOOK_SET_PRIVATE(hook, &sc->inet); in cisco_newhook()
223 sc->inet6.hook = hook; in cisco_newhook()
224 NG_HOOK_SET_PRIVATE(hook, &sc->inet6); in cisco_newhook()
226 sc->atalk.hook = hook; in cisco_newhook()
227 NG_HOOK_SET_PRIVATE(hook, &sc->atalk); in cisco_newhook()
229 sc->ipx.hook = hook; in cisco_newhook()
230 NG_HOOK_SET_PRIVATE(hook, &sc->ipx); in cisco_newhook()
232 NG_HOOK_SET_PRIVATE(hook, NULL); /* unimplemented */ in cisco_newhook()
338 cisco_rcvdata(hook_p hook, item_p item) in cisco_rcvdata() argument
340 const sc_p sc = NG_NODE_PRIVATE(NG_HOOK_NODE(hook)); in cisco_rcvdata()
346 if ((pep = NG_HOOK_PRIVATE(hook)) == NULL) in cisco_rcvdata()
385 NG_FWD_NEW_DATA(error, item, sc->downstream.hook, m); in cisco_rcvdata()
408 * Disconnection of a hook
413 cisco_disconnect(hook_p hook) in cisco_disconnect() argument
415 const sc_p sc = NG_NODE_PRIVATE(NG_HOOK_NODE(hook)); in cisco_disconnect()
418 /* Check it's not the debug hook */ in cisco_disconnect()
419 if ((pep = NG_HOOK_PRIVATE(hook))) { in cisco_disconnect()
420 pep->hook = NULL; in cisco_disconnect()
422 /* If it is the downstream hook, stop the timers */ in cisco_disconnect()
423 ng_uncallout(&sc->handle, NG_HOOK_NODE(hook)); in cisco_disconnect()
427 if ((NG_NODE_NUMHOOKS(NG_HOOK_NODE(hook)) == 0) in cisco_disconnect()
428 && (NG_NODE_IS_VALID(NG_HOOK_NODE(hook)))) in cisco_disconnect()
429 ng_rmnode_self(NG_HOOK_NODE(hook)); in cisco_disconnect()
517 if (sc->inet.hook == NULL) in cisco_input()
524 sc->node, msg, sc->inet.hook, 0); in cisco_input()
563 if (pep->hook == NULL) in cisco_input()
565 NG_FWD_NEW_DATA(error, item, pep->hook, m); in cisco_input()
577 cisco_keepalive(node_p node, hook_p hook, void *arg1, int arg2) in cisco_keepalive() argument
624 NG_SEND_DATA_ONLY(error, sc->downstream.hook, m); in cisco_send()
637 if (sc->inet.hook == NULL) /* nothing to notify */ in cisco_notify()
642 NG_SEND_MSG_HOOK(dummy_error, sc->node, msg, sc->inet.hook, 0); in cisco_notify()