summaryrefslogtreecommitdiffstats
path: root/lib/libfrr.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 04:24:32 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 04:24:32 +0000
commit35cadacd2bb9383686753731e31bd7e145fb2506 (patch)
tree4489adbde75a837989533837185b2b8369a0bf68 /lib/libfrr.h
parentAdding debian version 9.1-0.1. (diff)
downloadfrr-35cadacd2bb9383686753731e31bd7e145fb2506.tar.xz
frr-35cadacd2bb9383686753731e31bd7e145fb2506.zip
Merging upstream version 10.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'lib/libfrr.h')
-rw-r--r--lib/libfrr.h56
1 files changed, 53 insertions, 3 deletions
diff --git a/lib/libfrr.h b/lib/libfrr.h
index b260a54..ee436d9 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.
*/
@@ -53,6 +55,49 @@ struct log_arg {
};
DECLARE_DLIST(log_args, struct log_arg, itm);
+/* Registry of daemons' port defaults. Many of these are VTY ports; some
+ * daemons have default ports for other features such as ospfapi, or zebra's
+ * FPM.
+ */
+
+/* default zebra TCP port for zapi; this is currently disabled for security
+ * reasons.
+ */
+#define ZEBRA_TCP_PORT 2600
+
+#define ZEBRA_VTY_PORT 2601
+#define RIP_VTY_PORT 2602
+#define RIPNG_VTY_PORT 2603
+#define OSPF_VTY_PORT 2604
+#define BGP_VTY_PORT 2605
+#define OSPF6_VTY_PORT 2606
+
+/* Default API server port to accept connection request from client-side.
+ * This value could be overridden by "ospfapi" entry in "/etc/services".
+ */
+#define OSPF_API_SYNC_PORT 2607
+
+#define ISISD_VTY_PORT 2608
+#define BABEL_VTY_PORT 2609
+#define NHRP_VTY_PORT 2610
+#define PIMD_VTY_PORT 2611
+#define LDP_VTY_PORT 2612
+#define EIGRP_VTY_PORT 2613
+#define SHARP_VTY_PORT 2614
+#define PBR_VTY_PORT 2615
+#define STATIC_VTY_PORT 2616
+#define BFDD_VTY_PORT 2617
+#define FABRICD_VTY_PORT 2618
+#define VRRP_VTY_PORT 2619
+
+/* default port for FPM connections */
+#define FPM_DEFAULT_PORT 2620
+
+#define PATH_VTY_PORT 2621
+#define PIM6D_VTY_PORT 2622
+#define MGMTD_VTY_PORT 2623
+/* Registry of daemons' port defaults */
+
enum frr_cli_mode {
FRR_CLI_CLASSIC = 0,
FRR_CLI_TRANSACTIONAL,
@@ -85,6 +130,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 +176,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 +206,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 +219,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[];