summaryrefslogtreecommitdiffstats
path: root/vtysh
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-05-08 13:58:32 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2018-07-29 18:37:24 +0200
commit7e24fdf333e8ffe78403788d824eae110c6e65bf (patch)
tree08564ff89be16bb9928acb85ffdd05d7e31a196f /vtysh
parentzebra: Allow a static daemon to connect (diff)
downloadfrr-7e24fdf333e8ffe78403788d824eae110c6e65bf.tar.xz
frr-7e24fdf333e8ffe78403788d824eae110c6e65bf.zip
staticd: Start the addition of a staticd
This is the start of separating out the static handling code from zebra -> staticd. This will help simplify the zebra code and isolate static route handling to it's own code base. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'vtysh')
-rw-r--r--vtysh/Makefile.am4
-rw-r--r--vtysh/vtysh.c1
-rw-r--r--vtysh/vtysh.h3
3 files changed, 7 insertions, 1 deletions
diff --git a/vtysh/Makefile.am b/vtysh/Makefile.am
index 5d6f890e9..6d0b4a8fd 100644
--- a/vtysh/Makefile.am
+++ b/vtysh/Makefile.am
@@ -146,6 +146,10 @@ vtysh_scan += $(top_srcdir)/pbrd/pbr_vty.c
vtysh_scan += $(top_srcdir)/pbrd/pbr_debug.c
endif
+if STATICD
+vtysh_scan += $(top_srcdir)/staticd/static_vty.c
+endif
+
vtysh_cmd_FILES = $(vtysh_scan) \
$(top_srcdir)/lib/keychain.c $(top_srcdir)/lib/routemap.c \
$(top_srcdir)/lib/filter.c $(top_srcdir)/lib/plist.c \
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
index b56eaa899..e25a57692 100644
--- a/vtysh/vtysh.c
+++ b/vtysh/vtysh.c
@@ -133,6 +133,7 @@ struct vtysh_client vtysh_client[] = {
{.fd = -1, .name = "sharpd", .flag = VTYSH_SHARPD, .next = NULL},
{.fd = -1, .name = "watchfrr", .flag = VTYSH_WATCHFRR, .next = NULL},
{.fd = -1, .name = "pbrd", .flag = VTYSH_PBRD, .next = NULL},
+ {.fd = -1, .name = "staticd", .flag = VTYSH_STATICD, .next = NULL},
};
enum vtysh_write_integrated vtysh_write_integrated =
diff --git a/vtysh/vtysh.h b/vtysh/vtysh.h
index 6fa61dd88..e6ed5659c 100644
--- a/vtysh/vtysh.h
+++ b/vtysh/vtysh.h
@@ -39,6 +39,7 @@ DECLARE_MGROUP(MVTYSH)
#define VTYSH_BABELD 0x1000
#define VTYSH_SHARPD 0x2000
#define VTYSH_PBRD 0x4000
+#define VTYSH_STATICD 0x8000
#define VTYSH_WAS_ACTIVE (-2)
@@ -47,7 +48,7 @@ DECLARE_MGROUP(MVTYSH)
/* watchfrr is not in ALL since library CLI functions should not be
* run on it (logging & co. should stay in a fixed/frozen config, and
* things like prefix lists are not even initialised) */
-#define VTYSH_ALL VTYSH_ZEBRA|VTYSH_RIPD|VTYSH_RIPNGD|VTYSH_OSPFD|VTYSH_OSPF6D|VTYSH_LDPD|VTYSH_BGPD|VTYSH_ISISD|VTYSH_PIMD|VTYSH_NHRPD|VTYSH_EIGRPD|VTYSH_BABELD|VTYSH_SHARPD|VTYSH_PBRD
+#define VTYSH_ALL VTYSH_ZEBRA|VTYSH_RIPD|VTYSH_RIPNGD|VTYSH_OSPFD|VTYSH_OSPF6D|VTYSH_LDPD|VTYSH_BGPD|VTYSH_ISISD|VTYSH_PIMD|VTYSH_NHRPD|VTYSH_EIGRPD|VTYSH_BABELD|VTYSH_SHARPD|VTYSH_PBRD|VTYSH_STATICD
#define VTYSH_RMAP VTYSH_ZEBRA|VTYSH_RIPD|VTYSH_RIPNGD|VTYSH_OSPFD|VTYSH_OSPF6D|VTYSH_BGPD|VTYSH_ISISD|VTYSH_PIMD|VTYSH_EIGRPD|VTYSH_SHARPD
#define VTYSH_INTERFACE VTYSH_ZEBRA|VTYSH_RIPD|VTYSH_RIPNGD|VTYSH_OSPFD|VTYSH_OSPF6D|VTYSH_ISISD|VTYSH_PIMD|VTYSH_NHRPD|VTYSH_EIGRPD|VTYSH_BABELD|VTYSH_PBRD
#define VTYSH_NS VTYSH_ZEBRA