summaryrefslogtreecommitdiff
path: root/lib/libfrr.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libfrr.h')
-rw-r--r--lib/libfrr.h35
1 files changed, 33 insertions, 2 deletions
diff --git a/lib/libfrr.h b/lib/libfrr.h
index 77d70448a9..7ed7be4d98 100644
--- a/lib/libfrr.h
+++ b/lib/libfrr.h
@@ -118,6 +118,8 @@ struct frr_daemon_info {
bool dryrun;
bool daemon_mode;
bool terminal;
+ bool graceful_restart;
+ int gr_cleanup_time;
enum frr_cli_mode cli_mode;
struct event *read_in;
@@ -188,7 +190,7 @@ extern const char *frr_get_progname(void);
extern enum frr_cli_mode frr_get_cli_mode(void);
extern uint32_t frr_get_fd_limit(void);
extern bool frr_is_startup_fd(int fd);
-
+extern bool frr_is_daemon(void);
/* call order of these hooks is as ordered here */
DECLARE_HOOK(frr_early_init, (struct event_loop * tm), (tm));
DECLARE_HOOK(frr_late_init, (struct event_loop * tm), (tm));
@@ -200,7 +202,7 @@ extern void frr_config_fork(void);
extern void frr_run(struct event_loop *master);
extern void frr_detach(void);
-extern void frr_vty_serv_start(void);
+extern void frr_vty_serv_start(bool check_detach);
extern void frr_vty_serv_stop(void);
extern bool frr_zclient_addr(struct sockaddr_storage *sa, socklen_t *sa_len,
@@ -220,10 +222,39 @@ extern void frr_fini(void);
extern char config_default[512];
extern char frr_zclientpath[512];
+
+/* refer to lib/config_paths.h (generated during ./configure) for build config
+ * values of the following:
+ */
+
+/* sysconfdir is generally /etc/frr/, some BSDs may use /usr/local/etc/frr/.
+ * Will NOT include "pathspace" (namespace) suffix from -N. (libfrr.c handles
+ * pathspace'ing config files.) Has a slash at the end for "historical"
+ * reasons.
+ */
extern const char frr_sysconfdir[];
+
+/* runstatedir is *ephemeral* across reboots. It may either be a ramdisk,
+ * or be wiped during boot. Use only for pid files, sockets, and the like,
+ * not state. Commonly /run/frr or /var/run/frr.
+ * Will include "pathspace" (namespace) suffix from -N.
+ */
extern char frr_runstatedir[256];
+
+/* libstatedir is *persistent*. It's the place to put state like sequence
+ * numbers or databases. Commonly /var/lib/frr.
+ * Will include "pathspace" (namespace) suffix from -N.
+ */
extern char frr_libstatedir[256];
+
+/* moduledir is something along the lines of /usr/lib/frr/modules or
+ * /usr/lib/x86_64-linux-gnu/frr/modules. It is not guaranteed to be a
+ * subdirectory of the directory that the daemon binaries reside in. (e.g.
+ * the "x86_64-linux-gnu" component will be absent from daemon paths.)
+ */
extern const char frr_moduledir[];
+
+/* scriptdir is for Lua scripts, generally ${frr_sysconfdir}/scripts */
extern const char frr_scriptdir[];
extern char frr_protoname[];