summaryrefslogtreecommitdiff
path: root/lib/event.h
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2018-09-18 17:29:00 +0200
committerOndrej Zajicek (work) <santiago@crfreenet.org>2018-09-18 17:50:45 +0200
commitc0fc3e67185c1e0ff2d083572c6ad3983ba4ef25 (patch)
tree9fe17603f4fec18b7f9fbd8d8efc1f13a9bef8ee /lib/event.h
parentafa14f1868f2c753efdc81ce8e2c2d44e6bdd80e (diff)
The MRT protocol
The new MRT protocol is responsible for periodic RIB table dumps in the MRT format (RFC 6396). Also the existing code for BGP4MP MRT dumps is refactored and splitted between BGP to MRT protocols, will be more integrated into MRT in the future. Example: protocol mrt { table "*"; filename "%N_%F_%T.mrt"; period 60; } It is partially based on the old MRT code from Pavel Tvrdik.
Diffstat (limited to 'lib/event.h')
-rw-r--r--lib/event.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/event.h b/lib/event.h
index d5975222..14a54730 100644
--- a/lib/event.h
+++ b/lib/event.h
@@ -36,5 +36,14 @@ ev_active(event *e)
return e->n.next != NULL;
}
+static inline event*
+ev_new_set(pool *p, void (*hook)(void *), void *data)
+{
+ event *e = ev_new(p);
+ e->hook = hook;
+ e->data = data;
+ return e;
+}
+
#endif