summaryrefslogtreecommitdiffstats
path: root/sys/netgraph/netgraph.h
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>2001-01-11 19:27:54 +0000
committerjulian <julian@FreeBSD.org>2001-01-11 19:27:54 +0000
commit420cd96845940f5b7d69ecc28843ccc9e95384bd (patch)
tree88cf5483ae4052b5cdda21e1daed26acf6d1250d /sys/netgraph/netgraph.h
parentc24ab624c0b03d3d3a8012d0d57692f8dec8237d (diff)
downloadFreeBSD-src-420cd96845940f5b7d69ecc28843ccc9e95384bd.zip
FreeBSD-src-420cd96845940f5b7d69ecc28843ccc9e95384bd.tar.gz
Add an exported function ng_rmhook_self() that removes a hook
from a node, but does it via the locking queue, thus ensuring that the node is locked when it's hook is removed. Add 'deadnode' and 'deadhook' structures for when a node or hook is invalidated but not yet freed. (not yet freed)
Diffstat (limited to 'sys/netgraph/netgraph.h')
-rw-r--r--sys/netgraph/netgraph.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/netgraph/netgraph.h b/sys/netgraph/netgraph.h
index b98f80ea..396bef3 100644
--- a/sys/netgraph/netgraph.h
+++ b/sys/netgraph/netgraph.h
@@ -106,6 +106,7 @@ struct ng_hook {
#define HK_INVALID 0x0001 /* don't trust it! */
#define HK_QUEUE 0x0002 /* queue for later delivery */
#define HK_FORCE_WRITER 0x0004 /* Incoming data queued as a writer */
+#define HK_DEAD 0x0008 /* This is the dead hook.. don't free */
/*
* Public Methods for hook
@@ -1009,7 +1010,8 @@ item_p ng_package_data(struct mbuf *m, meta_p meta);
item_p ng_package_msg(struct ng_mesg *msg);
item_p ng_package_msg_self(node_p here, hook_p hook, struct ng_mesg *msg);
void ng_replace_retaddr(node_p here, item_p item, ng_ID_t retaddr);
-int ng_rmnode_self(node_p here);
+int ng_rmhook_self(hook_p hook); /* if a node wants to kill a hook */
+int ng_rmnode_self(node_p here); /* if a node wants to suicide */
int ng_snd_item(item_p item, int queue);
/*
OpenPOWER on IntegriCloud