summaryrefslogtreecommitdiffstats
path: root/lib/libfrr.h
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2017-12-07 20:31:48 +0100
committerRenato Westphal <renato@opensourcerouting.org>2018-10-27 20:16:12 +0200
commit1c2facd12df7bc27758d7ea674b1e57e401fc234 (patch)
treeb82aeb06586c2c7b380420ddd484964af915aee1 /lib/libfrr.h
parentMerge pull request #3235 from opensourcerouting/buildfoo-20181024 (diff)
downloadfrr-1c2facd12df7bc27758d7ea674b1e57e401fc234.tar.xz
frr-1c2facd12df7bc27758d7ea674b1e57e401fc234.zip
lib: introduce new northbound API
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'lib/libfrr.h')
-rw-r--r--lib/libfrr.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/libfrr.h b/lib/libfrr.h
index db58ff92b..2705397b8 100644
--- a/lib/libfrr.h
+++ b/lib/libfrr.h
@@ -28,6 +28,7 @@
#include "getopt.h"
#include "module.h"
#include "hook.h"
+#include "northbound.h"
/* The following options disable specific command line options that
* are not applicable for a particular daemon.
@@ -45,6 +46,11 @@
*/
#define FRR_DETACH_LATER (1 << 5)
+enum frr_cli_mode {
+ FRR_CLI_CLASSIC = 0,
+ FRR_CLI_TRANSACTIONAL,
+};
+
struct frr_daemon_info {
unsigned flags;
@@ -60,11 +66,15 @@ struct frr_daemon_info {
bool dryrun;
bool daemon_mode;
bool terminal;
+ enum frr_cli_mode cli_mode;
struct thread *read_in;
const char *config_file;
const char *backup_config_file;
const char *pid_file;
+#ifdef HAVE_SQLITE3
+ const char *db_file;
+#endif
const char *vty_path;
const char *module_path;
const char *pathspace;
@@ -80,6 +90,9 @@ struct frr_daemon_info {
size_t n_signals;
struct zebra_privs_t *privs;
+
+ const struct frr_yang_module_info **yang_modules;
+ size_t n_yang_modules;
};
/* execname is the daemon's executable (and pidfile and configfile) name,
@@ -108,6 +121,8 @@ extern int frr_getopt(int argc, char *const argv[], int *longindex);
extern void frr_help_exit(int status);
extern struct thread_master *frr_init(void);
+extern const char *frr_get_progname(void);
+extern enum frr_cli_mode frr_get_cli_mode(void);
DECLARE_HOOK(frr_late_init, (struct thread_master * tm), (tm))
extern void frr_config_fork(void);