Lines Matching defs:node
87 static struct mtx ng_nodelist_mtx; /* protects global node/hook lists */
202 /* Method to find a node.. used twice so do it here */
204 #define NG_IDHASH_FIND(ID, node) \
207 LIST_FOREACH(node, &V_ng_ID_hash[NG_IDHASH_FN(ID)], \
209 if (NG_NODE_IS_VALID(node) \
210 && (NG_NODE_ID(node) == ID)) { \
223 static int ng_add_hook(node_p node, const char *name, hook_p * hookp);
227 static void ng_worklist_add(node_p node);
229 static int ng_apply_item(node_p node, item_p item, int rw);
230 static void ng_flush_input_queue(node_p node);
232 static int ng_con_nodes(item_p item, node_p node, const char *name,
234 static int ng_con_part2(node_p node, item_p item, hook_p hook);
235 static int ng_con_part3(node_p node, item_p item, hook_p hook);
236 static int ng_mkpeer(node_p node, const char *name, const char *name2,
246 int ng_path_parse(char *addr, char **node, char **path, char **hook);
247 void ng_rmnode(node_p node, hook_p dummy1, void *dummy2, int dummy3);
248 void ng_unname(node_p node);
256 "netgraph node structures");
264 #define _NG_ALLOC_NODE(node) \
265 node = malloc(sizeof(*node), M_NETGRAPH_NODE, M_NOWAIT | M_ZERO)
323 node_p node;
326 node = LIST_FIRST(&ng_freenodes);
327 if (node) {
328 LIST_REMOVE(node, nd_nodes);
329 bcopy(&node->nd_all, &temp, sizeof(temp));
330 bzero(node, sizeof(struct ng_node));
331 bcopy(&temp, &node->nd_all, sizeof(temp));
333 node->nd_magic = ND_MAGIC;
336 _NG_ALLOC_NODE(node);
337 if (node) {
338 node->nd_magic = ND_MAGIC;
340 SLIST_INSERT_HEAD(&ng_allnodes, node, nd_all);
344 return (node);
348 #define NG_ALLOC_NODE(node) do { (node) = ng_alloc_node(); } while (0)
358 #define NG_FREE_NODE(node) \
361 LIST_INSERT_HEAD(&ng_freenodes, node, nd_nodes); \
362 node->nd_magic = 0; \
369 #define NG_ALLOC_NODE(node) _NG_ALLOC_NODE(node)
372 #define NG_FREE_NODE(node) do { free((node), M_NETGRAPH_NODE); } while (0)
592 * Instantiate a node of the requested type
606 /* Locate the node type. If we fail we return. Do not try to load
613 * If we have a constructor, then make the node and
637 * Generic node creation. Called by node initialisation for externally
639 * The returned node has a reference count of 1.
644 node_p node;
646 /* Require the node type to have been already installed */
652 /* Make a node and try attach it to the type */
653 NG_ALLOC_NODE(node);
654 if (node == NULL) {
658 node->nd_type = type;
660 node->nd_vnet = curvnet;
662 NG_NODE_REF(node); /* note reference */
665 NG_QUEUE_LOCK_INIT(&node->nd_input_queue);
666 STAILQ_INIT(&node->nd_input_queue.queue);
667 node->nd_input_queue.q_flags = 0;
669 /* Initialize hook list for new node */
670 LIST_INIT(&node->nd_hooks);
676 node->nd_ID = V_nextID++; /* 137/sec for 1 year before wrap */
679 NG_IDHASH_FIND(node->nd_ID, node2); /* already taken? */
680 if ((node->nd_ID != 0) && (node2 == NULL)) {
687 LIST_INSERT_HEAD(&V_ng_ID_hash[NG_IDHASH_FN(node->nd_ID)], node,
692 *nodepp = node;
697 * Forceably start the shutdown process on a node. Either call
705 * Persistent node types must have a type-specific method which
706 * allocates a new node in which case, this one is irretrievably going away,
707 * or cleans up anything it needs, and just makes the node valid again,
708 * in which case we allow the node to survive.
710 * XXX We need to think of how to tell a persistent node that we
715 ng_rmnode(node_p node, hook_p dummy1, void *dummy2, int dummy3)
720 if ((node->nd_flags & NGF_CLOSING) != 0)
723 if (node == &ng_deadnode) {
729 NG_NODE_REF(node);
737 node->nd_flags |= NGF_INVALID|NGF_CLOSING;
739 /* If node has its pre-shutdown method, then call it first*/
740 if (node->nd_type && node->nd_type->close)
741 (*node->nd_type->close)(node);
744 while ((hook = LIST_FIRST(&node->nd_hooks)) != NULL)
754 ng_flush_input_queue(node);
757 if (node->nd_type && node->nd_type->shutdown) {
758 (*node->nd_type->shutdown)(node);
759 if (NG_NODE_IS_VALID(node)) {
761 * Well, blow me down if the node code hasn't declared
763 * Presumably it is a persistent node.
768 node->nd_flags &= ~(NGF_INVALID|NGF_CLOSING);
769 NG_NODE_UNREF(node); /* Assume they still have theirs */
773 NG_NODE_UNREF(node);
776 ng_unname(node); /* basically a NOP these days */
781 * timeout callouts, but theoretically the node's supposed to
785 NG_NODE_UNREF(node);
789 * Remove a reference to the node, possibly the last.
793 ng_unref_node(node_p node)
796 if (node == &ng_deadnode)
799 CURVNET_SET(node->nd_vnet);
801 if (refcount_release(&node->nd_refs)) { /* we were the last */
803 node->nd_type->refs--; /* XXX maybe should get types lock? */
805 if (NG_NODE_HAS_NAME(node)) {
807 LIST_REMOVE(node, nd_nodes);
813 LIST_REMOVE(node, nd_idnodes);
816 mtx_destroy(&node->nd_input_queue.q_mtx);
817 NG_FREE_NODE(node);
828 node_p node;
831 NG_IDHASH_FIND(ID, node);
832 if (node)
833 NG_NODE_REF(node);
835 return(node);
839 ng_node2ID(node_cp node)
841 return (node ? NG_NODE_ID(node) : 0);
849 * Assign a node a name.
852 ng_name_node(node_p node, const char *name)
859 if (strcmp(NG_NODE_NAME(node), name) == 0)
889 if (NG_NODE_HAS_NAME(node))
890 LIST_REMOVE(node, nd_nodes);
894 strlcpy(NG_NODE_NAME(node), name, NG_NODESIZ);
896 LIST_INSERT_HEAD(&V_ng_name_hash[hash], node, nd_nodes);
903 * Find a node by absolute name. The name should NOT end with ':'
904 * The name "." means "this node" and "[xxx]" means "the node
907 * Returns the node if found, else NULL.
909 * Note it acquires a reference on the node so you can be sure it's still
915 node_p node;
919 /* "." means "this node" */
930 /* Find node by name. */
933 LIST_FOREACH(node, &V_ng_name_hash[hash], nd_nodes)
934 if (NG_NODE_IS_VALID(node) &&
935 (strcmp(NG_NODE_NAME(node), name) == 0)) {
936 NG_NODE_REF(node);
941 return (node);
969 * Remove a name from a node. This should only be called
970 * when shutting down and removing the node.
973 ng_unname(node_p node)
986 node_p node, node2;
995 LIST_FOREACH_SAFE(node, &V_ng_name_hash[i], nd_nodes, node2) {
997 LIST_REMOVE(node, nd_nodes);
999 hash = hash32_str(NG_NODE_NAME(node), HASHINIT) & hmask;
1000 LIST_INSERT_HEAD(&new[hash], node, nd_nodes);
1017 node_p node, node2;
1026 LIST_FOREACH_SAFE(node, &V_ng_ID_hash[i], nd_idnodes, node2) {
1028 LIST_REMOVE(node, nd_idnodes);
1030 hash = (node->nd_ID % (hmask + 1));
1031 LIST_INSERT_HEAD(&new[hash], node, nd_idnodes);
1064 * Add an unconnected hook to a node. Only used internally.
1065 * Assumes node is locked. (XXX not yet true )
1068 ng_add_hook(node_p node, const char *name, hook_p *hookp)
1078 if (ng_findhook(node, name) != NULL) {
1092 hook->hk_node = node;
1093 NG_NODE_REF(node); /* each hook counts as a reference */
1099 * Check if the node type code has something to say about it
1100 * If it fails, the unref of the hook will also unref the node.
1102 if (node->nd_type->newhook != NULL) {
1103 if ((error = (*node->nd_type->newhook)(node, hook, name))) {
1112 LIST_INSERT_HEAD(&node->nd_hooks, hook, hk_hooks);
1113 node->nd_numhooks++;
1114 NG_HOOK_REF(hook); /* one for the node */
1129 ng_findhook(node_p node, const char *name)
1133 if (node->nd_type->findhook != NULL)
1134 return (*node->nd_type->findhook)(node, name);
1135 LIST_FOREACH(hook, &node->nd_hooks, hk_hooks) {
1153 * the peer hook and node are still going to exist until
1154 * we are finished there as the hook holds a ref on the node.
1165 node_p node;
1181 node = NG_HOOK_NODE(hook);
1193 * If it's already divorced from a node,
1209 * Remove the hook from the node's list to avoid possible recursion
1210 * in case the disconnection results in node shutdown.
1212 if (node == &ng_deadnode) { /* happens if called from ng_con_nodes() */
1216 node->nd_numhooks--;
1217 if (node->nd_type->disconnect) {
1219 * The type handler may elect to destroy the node so don't
1224 (*node->nd_type->disconnect) (hook);
1228 * Note that because we will point to ng_deadnode, the original node
1232 NG_NODE_UNREF(node); /* We no longer point to it so adjust count */
1233 NG_HOOK_UNREF(hook); /* Account for linkage (in list) to node */
1237 * Take two hooks on a node and merge the connection so that the given node
1345 ng_con_part3(node_p node, item_p item, hook_p hook)
1350 * When we run, we know that the node 'node' is locked for us.
1352 * Our caller has a reference on the node.
1355 * We are all set up except for the final call to the node, and
1360 * The node must have been freed again since we last visited
1379 * should only set flags on hooks we have locked under our node.
1388 ng_con_part2(node_p node, item_p item, hook_p hook)
1394 * When we run, we know that the node 'node' is locked for us.
1396 * Our caller has a reference on the node.
1399 * our node pointer points to the 'dead' node.
1403 if (ng_findhook(node, NG_HOOK_NAME(hook)) != NULL) {
1410 * Check if the node type code has something to say about it
1411 * If it fails, the unref of the hook will also unref the attached node,
1412 * however since that node is 'ng_deadnode' this will do nothing.
1415 if (node->nd_type->newhook != NULL) {
1416 if ((error = (*node->nd_type->newhook)(node, hook,
1428 hook->hk_node = node; /* just overwrite ng_deadnode */
1429 NG_NODE_REF(node); /* each hook counts as a reference */
1430 LIST_INSERT_HEAD(&node->nd_hooks, hook, hk_hooks);
1431 node->nd_numhooks++;
1432 NG_HOOK_REF(hook); /* one for the node */
1441 * node locked, but we need to queue the remote one.
1478 * Connect this node with another node. We assume that this node is
1482 ng_con_nodes(item_p item, node_p node, const char *name,
1492 if ((error = ng_add_hook(node, name, &hook))) /* gives us a ref */
1514 * the other node.
1529 * We assume that the local node is locked.
1530 * The new node probably doesn't need a lock until
1534 * The problem may come if the other node also fires up
1539 * to add ability to remove the node when failing. (Not hard, just
1540 * make arg1 point to the node to remove).
1542 * an unconnected node?
1545 ng_mkpeer(node_p node, const char *name, const char *name2, char *type)
1555 if ((error = ng_add_hook(node, name, &hook1))) { /* gives us a ref */
1577 /* Give each node the opportunity to veto the pending connection */
1606 /* Shut this node down as soon as everyone is clear of it */
1609 ng_rmnode_self(node_p node)
1613 if (node == &ng_deadnode)
1615 node->nd_flags |= NGF_INVALID;
1616 if (node->nd_flags & NGF_CLOSING)
1619 error = ng_send_fn(node, NULL, &ng_rmnode, NULL, 0);
1624 ng_rmhook_part2(node_p node, hook_p hook, void *arg1, int arg2)
1634 node_p node = NG_HOOK_NODE(hook);
1636 if (node == &ng_deadnode)
1639 error = ng_send_fn(node, hook, &ng_rmhook_part2, NULL, 0);
1646 * Such a string can refer to a specific node or a specific hook
1647 * on a specific node, depending on how you look at it. In the
1661 char *node, *path, *hook;
1669 node = addr; /* Here's the NODE */
1673 if (!*node)
1677 if (strcmp(node, ".") != 0) {
1678 for (k = 0; node[k]; k++)
1679 if (node[k] == '.')
1683 node = NULL; /* No absolute NODE */
1715 *nodep = node;
1724 * Given a path, which may be absolute or relative, and a starting node,
1725 * return the destination node.
1733 node_p node, oldnode;
1746 /* Parse out node and sequence of hooks */
1753 * For an absolute address, jump to the starting node.
1754 * Note that this holds a reference on the node for us.
1758 node = ng_name2noderef(here, nodename);
1759 if (node == NULL) {
1768 node = here;
1769 NG_NODE_REF(node);
1775 *destp = node;
1804 hook = ng_findhook(node, segment);
1812 NG_NODE_UNREF(node);
1818 * Hop on over to the next node
1824 oldnode = node;
1825 if ((node = NG_PEER_NODE(hook)))
1826 NG_NODE_REF(node); /* XXX RACE */
1828 if (NG_NODE_NOT_VALID(node)) {
1829 NG_NODE_UNREF(node); /* XXX more races */
1844 *destp = node;
1853 * All activities are submitted to the node via the input queue
1860 static __inline void ng_queue_rw(node_p node, item_p item, int rw);
1861 static __inline item_p ng_dequeue(node_p node, int *rw);
1862 static __inline item_p ng_acquire_read(node_p node, item_p item);
1863 static __inline item_p ng_acquire_write(node_p node, item_p item);
1864 static __inline void ng_leave_read(node_p node);
1865 static __inline void ng_leave_write(node_p node);
1941 * Taking into account the current state of the queue and node, possibly take
1944 * because the node was in a state where it cannot yet process the next item
1948 ng_dequeue(node_p node, int *rw)
1951 struct ng_queue *ngq = &node->nd_input_queue;
1958 CTR4(KTR_NET, "%20s: node [%x] (%p) queue empty; "
1960 node->nd_ID, node, ngq->q_flags);
1967 * the current state of the node.
1974 CTR4(KTR_NET, "%20s: node [%x] (%p) queued "
1976 __func__, node->nd_ID, node, t);
1984 /* We have got reader lock for the node. */
1988 /* We have got writer lock for the node. */
1992 CTR4(KTR_NET, "%20s: node [%x] (%p) queued writer can't "
1993 "proceed; queue flags 0x%lx", __func__, node->nd_ID, node,
2006 CTR6(KTR_NET, "%20s: node [%x] (%p) returning item %p as %s; queue "
2007 "flags 0x%lx", __func__, node->nd_ID, node, item, *rw ? "WRITER" :
2014 * If the queue could be run now, add node to the queue handler's worklist.
2017 ng_queue_rw(node_p node, item_p item, int rw)
2019 struct ng_queue *ngq = &node->nd_input_queue;
2031 CTR5(KTR_NET, "%20s: node [%x] (%p) queued item %p as %s", __func__,
2032 node->nd_ID, node, item, rw ? "WRITER" : "READER" );
2035 * We can take the worklist lock with the node locked
2039 ng_worklist_add(node);
2043 /* Acquire reader lock on node. If node is busy, queue the packet. */
2045 ng_acquire_read(node_p node, item_p item)
2047 KASSERT(node != &ng_deadnode,
2050 /* Reader needs node without writer and pending items. */
2052 long t = node->nd_input_queue.q_flags;
2055 if (atomic_cmpset_acq_int(&node->nd_input_queue.q_flags, t,
2057 /* Successfully grabbed node */
2058 CTR4(KTR_NET, "%20s: node [%x] (%p) acquired item %p",
2059 __func__, node->nd_ID, node, item);
2066 ng_queue_rw(node, item, NGQRW_R);
2071 /* Acquire writer lock on node. If node is busy, queue the packet. */
2073 ng_acquire_write(node_p node, item_p item)
2075 KASSERT(node != &ng_deadnode,
2078 /* Writer needs completely idle node. */
2079 if (atomic_cmpset_acq_int(&node->nd_input_queue.q_flags, 0,
2081 /* Successfully grabbed node */
2082 CTR4(KTR_NET, "%20s: node [%x] (%p) acquired item %p",
2083 __func__, node->nd_ID, node, item);
2088 ng_queue_rw(node, item, NGQRW_W);
2095 ng_upgrade_write(node_p node, item_p item)
2097 struct ng_queue *ngq = &node->nd_input_queue;
2098 KASSERT(node != &ng_deadnode,
2121 ng_apply_item(node, item, 0);
2143 CTR3(KTR_NET, "%20s: node [%x] (%p) set OP_PENDING", __func__,
2144 node->nd_ID, node);
2147 CTR4(KTR_NET, "%20s: node [%x] (%p) requeued item %p as WRITER",
2148 __func__, node->nd_ID, node, item );
2153 ng_worklist_add(node);
2162 ng_leave_read(node_p node)
2164 atomic_subtract_rel_int(&node->nd_input_queue.q_flags, READER_INCREMENT);
2169 ng_leave_write(node_p node)
2171 atomic_clear_rel_int(&node->nd_input_queue.q_flags, WRITER_ACTIVE);
2174 /* Purge node queue. Called on node shutdown. */
2176 ng_flush_input_queue(node_p node)
2178 struct ng_queue *ngq = &node->nd_input_queue;
2210 * reference to destination node.
2217 * ID of original sender node. (return address)
2230 node_p node;
2246 node = NGI_NODE(item);
2248 KASSERT(node != NULL, ("ng_snd_item: node is NULL"));
2260 * If the item or the node specifies single threading, force
2261 * writer semantics. Similarly, the node may say one hook always
2265 (node->nd_flags & NGF_FORCE_WRITER) ||
2296 ((node->nd_flags & NGF_HI_STACK) || (hook &&
2302 /* Put it on the queue for that node*/
2303 ng_queue_rw(node, item, rw);
2312 item = ng_acquire_read(node, item);
2314 item = ng_acquire_write(node, item);
2320 NGI_GET_NODE(item, node); /* zaps stored node */
2323 error = ng_apply_item(node, item, rw); /* drops r/w lock when done */
2326 ngq = &node->nd_input_queue;
2330 ng_worklist_add(node);
2336 * Whatever we do, DO NOT access the node again!
2338 NG_NODE_UNREF(node);
2360 * to run it on the appropriate node/hook.
2364 ng_apply_item(node_p node, item_p item, int rw)
2373 KASSERT(node != NULL, ("ng_apply_item: node is NULL"));
2391 NG_NODE_NOT_VALID(node)) {
2419 * Similarly, if the node is a zombie there is
2422 if (NG_NODE_NOT_VALID(node)) {
2434 * reference a node or hook that has just been
2440 error = ng_generic_msg(node, item, hook);
2444 (!(rcvmsg = node->nd_type->rcvmsg))) {
2450 error = (*rcvmsg)(node, item, hook);
2456 * even if the node is invalid.
2458 if (NG_NODE_NOT_VALID(node) &&
2477 (*NGI_FN(item))(node, hook, NGI_ARG1(item),
2481 error = (*NGI_FN2(item))(node, item, hook);
2493 ng_leave_read(node);
2495 ng_leave_write(node);
2604 /* Fill in node info */
2630 /* Fill in node info */
2665 node_p node;
2682 LIST_FOREACH(node, &V_ng_ID_hash[i], nd_idnodes) {
2686 if (NG_NODE_NOT_VALID(node))
2688 if (NG_NODE_HAS_NAME(node))
2689 strcpy(np->name, NG_NODE_NAME(node));
2690 strcpy(np->type, node->nd_type->name);
2691 np->id = ng_node2ID(node);
2692 np->hooks = node->nd_numhooks;
2704 node_p node;
2721 LIST_FOREACH(node, &V_ng_name_hash[i], nd_nodes) {
2725 if (NG_NODE_NOT_VALID(node))
2727 strcpy(np->name, NG_NODE_NAME(node));
2728 strcpy(np->type, node->nd_type->name);
2729 np->id = ng_node2ID(node);
2730 np->hooks = node->nd_numhooks;
2928 * actual node, even though it is a generic type command.
3038 /* If we still have a node or hook referenced... */
3088 * Handle the loading/unloading of a netgraph node type module
3099 /* Register new netgraph node type */
3155 node_p node = NULL, last_killed = NULL;
3159 /* Find a node to kill */
3162 LIST_FOREACH(node, &V_ng_ID_hash[i], nd_idnodes) {
3163 if (node != &ng_deadnode) {
3164 NG_NODE_REF(node);
3168 if (node != NULL)
3173 /* Attempt to kill it only if it is a regular node */
3174 if (node != NULL) {
3175 if (node == last_killed) {
3176 if (node->nd_flags & NGF_REALLY_DIE)
3177 panic("ng node %s won't die",
3178 node->nd_name);
3179 /* The node persisted itself. Try again. */
3180 node->nd_flags |= NGF_REALLY_DIE;
3182 ng_rmnode(node, NULL, NULL, 0);
3183 NG_NODE_UNREF(node);
3184 last_killed = node;
3186 } while (node != NULL);
3279 dumpnode(node_p node, char *file, int line)
3281 printf("node: ID [%x]: type '%s', %d hooks, flags 0x%x, %d refs, %s:\n",
3282 _NG_NODE_ID(node), node->nd_type->name,
3283 node->nd_numhooks, node->nd_flags,
3284 node->nd_refs, node->nd_name);
3286 node->lastfile, node->lastline);
3329 printf("node %p ([%x])\n",
3349 node_p node;
3352 SLIST_FOREACH(node, &ng_allnodes, nd_all) {
3354 dumpnode(node, NULL, 0);
3400 * Pick a node off the list of nodes with work,
3401 * try get an item to process off it. Remove the node from the list.
3408 node_p node;
3410 /* Get node from the worklist. */
3412 while ((node = STAILQ_FIRST(&ng_worklist)) == NULL)
3416 CURVNET_SET(node->nd_vnet);
3417 CTR3(KTR_NET, "%20s: node [%x] (%p) taken off worklist",
3418 __func__, node->nd_ID, node);
3420 * We have the node. We also take over the reference
3425 * that lets us be sure that the node still exists.
3433 NG_QUEUE_LOCK(&node->nd_input_queue);
3434 item = ng_dequeue(node, &rw);
3436 node->nd_input_queue.q_flags2 &= ~NGQ2_WORKQ;
3437 NG_QUEUE_UNLOCK(&node->nd_input_queue);
3438 break; /* go look for another node */
3440 NG_QUEUE_UNLOCK(&node->nd_input_queue);
3441 NGI_GET_NODE(item, node); /* zaps stored node */
3452 ng_apply_item(node, item, rw);
3455 ng_apply_item(node, item, rw);
3458 NG_NODE_UNREF(node);
3462 NG_NODE_UNREF(node);
3473 ng_worklist_add(node_p node)
3476 mtx_assert(&node->nd_input_queue.q_mtx, MA_OWNED);
3478 if ((node->nd_input_queue.q_flags2 & NGQ2_WORKQ) == 0) {
3483 node->nd_input_queue.q_flags2 |= NGQ2_WORKQ;
3484 NG_NODE_REF(node); /* XXX safe in mutex? */
3486 STAILQ_INSERT_TAIL(&ng_worklist, node, nd_input_queue.q_work);
3488 CTR3(KTR_NET, "%20s: node [%x] (%p) put on worklist", __func__,
3489 node->nd_ID, node);
3492 CTR3(KTR_NET, "%20s: node [%x] (%p) already on worklist",
3493 __func__, node->nd_ID, node);
3505 printf("item already has node"); \
3506 kdb_enter(KDB_WHY_NETGRAPH, "has node"); \
3521 * Hook and node references will be removed when the item is dequeued.
3523 * (XXX) Unsafe because no reference held by peer on remote node.
3524 * remote node might go away in this timescale.
3551 * Hook and node references will be removed when the item is dequeued.
3604 * Since a hook holds a reference on its node, once we know
3606 * that the peer node is present, though maybe invalid.
3642 * on the node for us if it finds one. So we don't have to.
3664 * Find the target node.
3680 * special case to send a message to self (e.g. destroy node)
3690 * Find the target node.
3713 * Send ng_item_fn function call to the specified node.
3717 ng_send_fn(node_p node, hook_p hook, ng_item_fn *fn, void * arg1, int arg2)
3720 return ng_send_fn1(node, hook, fn, arg1, arg2, NG_NOFLAGS);
3724 ng_send_fn1(node_p node, hook_p hook, ng_item_fn *fn, void * arg1, int arg2,
3733 NG_NODE_REF(node); /* and one for the item */
3734 NGI_SET_NODE(item, node);
3746 * Send ng_item_fn2 function call to the specified node.
3754 ng_send_fn2(node_p node, hook_p hook, item_p pitem, ng_item_fn2 *fn, void *arg1,
3777 NG_NODE_REF(node); /* and one for the item */
3778 NGI_SET_NODE(item, node);
3806 ng_callout(struct callout *c, node_p node, hook_p hook, int ticks,
3815 NG_NODE_REF(node); /* and one for the item */
3816 NGI_SET_NODE(item, node);
3837 ng_uncallout_internal(struct callout *c, node_p node)
3843 (item != NULL) && (NGI_NODE(item) == node)) {
3857 ng_uncallout(struct callout *c, node_p node)
3870 ng_uncallout_internal(c, node);
3877 ng_uncallout_drain(struct callout *c, node_p node)
3883 ng_uncallout_internal(c, node);
3889 * Set the address, if none given, give the node here.