summaryrefslogtreecommitdiffstats
path: root/lib/libfrr.h
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2017-08-06 08:28:16 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2017-08-15 13:25:44 +0200
commit03951374770da5be620e48768588928fbd809c83 (patch)
treee2234dd2ace2aa632646729dc5956901426d7f19 /lib/libfrr.h
parentlib: hooks: support priority ordering & reversing (diff)
downloadfrr-03951374770da5be620e48768588928fbd809c83.tar.xz
frr-03951374770da5be620e48768588928fbd809c83.zip
*: centralize some exit cleanup into libfrr
Start creating a counterpart to frr_init and frr_late_init. Unfortunately, some daemons don't do any exit handling, this doesn't change that just yet. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'lib/libfrr.h')
-rw-r--r--lib/libfrr.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/libfrr.h b/lib/libfrr.h
index 1710fc9a8..8a15d168a 100644
--- a/lib/libfrr.h
+++ b/lib/libfrr.h
@@ -104,6 +104,14 @@ extern void frr_run(struct thread_master *master);
extern bool frr_zclient_addr(struct sockaddr_storage *sa, socklen_t *sa_len,
const char *path);
+/* these two are before the protocol daemon does its own shutdown
+ * it's named this way being the counterpart to frr_late_init */
+DECLARE_KOOH(frr_early_fini, (), ())
+extern void frr_early_fini(void);
+/* and these two are after the daemon did its own cleanup */
+DECLARE_KOOH(frr_fini, (), ())
+extern void frr_fini(void);
+
extern char config_default[256];
extern char frr_zclientpath[256];
extern const char frr_sysconfdir[];