summaryrefslogtreecommitdiff
path: root/sys/netgraph/netgraph.h
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2005-07-05 17:35:20 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2005-07-05 17:35:20 +0000
commit8afe16d57ba4342c1af786f76697aeab17d598b6 (patch)
tree7c65a2a332dab7cec59b3eb4bdcbf403ceaac133 /sys/netgraph/netgraph.h
parent7906787a5f72aad5315b40024365f5a53e8f911a (diff)
Notes
Diffstat (limited to 'sys/netgraph/netgraph.h')
-rw-r--r--sys/netgraph/netgraph.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/netgraph/netgraph.h b/sys/netgraph/netgraph.h
index a963fc818f98..4304ced5dfe6 100644
--- a/sys/netgraph/netgraph.h
+++ b/sys/netgraph/netgraph.h
@@ -580,6 +580,7 @@ _ng_node_foreach_hook(node_p node, ng_fn_eachhook *fn, void *arg,
*
*/
typedef void ng_item_fn(node_p node, hook_p hook, void *arg1, int arg2);
+typedef void ng_apply_t(void *context, int error);
struct ng_item {
u_long el_flags;
item_p el_next;
@@ -597,6 +598,12 @@ struct ng_item {
int fn_arg2;
} fn;
} body;
+ /*
+ * Optional callback called when item is being applied,
+ * and its context.
+ */
+ ng_apply_t *apply;
+ void *context;
#ifdef NETGRAPH_DEBUG /*----------------------------------------------*/
char *lastfile;
int lastline;
@@ -1084,6 +1091,7 @@ int ng_callout(struct callout *c, node_p node, hook_p hook, int ticks,
#define NG_NOFLAGS 0x00000000 /* no special options */
#define NG_QUEUE 0x00000001 /* enqueue item, don't dispatch */
#define NG_WAITOK 0x00000002 /* use M_WAITOK, etc. */
+#define NG_PROGRESS 0x00000004 /* return EINPROGRESS if queued */
/*
* prototypes the user should DEFINITELY not use directly