summaryrefslogtreecommitdiff
path: root/lib/libfrr.h
diff options
context:
space:
mode:
authorDonald Sharp <donaldsharp72@gmail.com>2024-01-28 14:30:28 -0500
committerGitHub <noreply@github.com>2024-01-28 14:30:28 -0500
commit259e3d4dac2da37b9abad9f84e41f90c81325a60 (patch)
tree33292e442296b1b4a04b7753e3055706bfd6c7e5 /lib/libfrr.h
parent4d92badcde7573b97d2acc2228d0ca5fe7168e1e (diff)
parentbbd858935fad9a469b5b339948e1215b347b05c0 (diff)
Merge pull request #15243 from opensourcerouting/autoconf-dir-mess
*: fix a pile of directory and/or state retention related issues
Diffstat (limited to 'lib/libfrr.h')
-rw-r--r--lib/libfrr.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/libfrr.h b/lib/libfrr.h
index b260a54dfe..27b877da18 100644
--- a/lib/libfrr.h
+++ b/lib/libfrr.h
@@ -22,6 +22,8 @@
extern "C" {
#endif
+#define ZAPI_SOCK_NAME "%s/zserv.api", frr_runstatedir
+
/* The following options disable specific command line options that
* are not applicable for a particular daemon.
*/
@@ -85,6 +87,7 @@ struct frr_daemon_info {
const char *vty_path;
const char *module_path;
const char *script_path;
+ char **state_paths;
const char *pathspace;
bool zpathspace;
@@ -130,7 +133,6 @@ struct frr_daemon_info {
.version = FRR_VERSION, ); \
MACRO_REQUIRE_SEMICOLON() /* end */
-extern void frr_init_vtydir(void);
extern void frr_preinit(struct frr_daemon_info *daemon, int argc, char **argv);
extern void frr_opt_add(const char *optstr, const struct option *longopts,
const char *helpstr);
@@ -161,6 +163,10 @@ extern void frr_vty_serv_stop(void);
extern bool frr_zclient_addr(struct sockaddr_storage *sa, socklen_t *sa_len,
const char *path);
+struct json_object;
+extern struct json_object *frr_daemon_state_load(void);
+extern void frr_daemon_state_save(struct json_object **statep);
+
/* 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, (), ());
@@ -170,9 +176,10 @@ DECLARE_KOOH(frr_fini, (), ());
extern void frr_fini(void);
extern char config_default[512];
-extern char frr_zclientpath[256];
+extern char frr_zclientpath[512];
extern const char frr_sysconfdir[];
-extern char frr_vtydir[256];
+extern char frr_runstatedir[256];
+extern char frr_libstatedir[256];
extern const char frr_moduledir[];
extern const char frr_scriptdir[];