summaryrefslogtreecommitdiff
path: root/mgmtd
diff options
context:
space:
mode:
authorChristian Hopps <chopps@labn.net>2024-01-26 17:40:55 -0500
committerChristian Hopps <chopps@labn.net>2024-01-26 17:40:55 -0500
commite6eec072abd7088c09a23d0328ac9bc9fd00ad7e (patch)
tree99db60967b6c49482759f6a13548bc50127144f1 /mgmtd
parent1254d5fc4e7d6b3717177fd353974a55b1777d4a (diff)
ripngd: convert ripngd to mgmtd
- a couple small fixes for ripd conversion as well. Signed-off-by: Christian Hopps <chopps@labn.net>
Diffstat (limited to 'mgmtd')
-rw-r--r--mgmtd/mgmt_be_adapter.c26
-rw-r--r--mgmtd/mgmt_be_adapter.h5
-rw-r--r--mgmtd/mgmt_main.c4
-rw-r--r--mgmtd/mgmt_vty.c7
-rw-r--r--mgmtd/subdir.am9
5 files changed, 48 insertions, 3 deletions
diff --git a/mgmtd/mgmt_be_adapter.c b/mgmtd/mgmt_be_adapter.c
index a7f3d4390e..f92d6d8d58 100644
--- a/mgmtd/mgmt_be_adapter.c
+++ b/mgmtd/mgmt_be_adapter.c
@@ -36,9 +36,12 @@
const char *mgmt_be_client_names[MGMTD_BE_CLIENT_ID_MAX + 1] = {
[MGMTD_BE_CLIENT_ID_ZEBRA] = "zebra",
-#ifdef HAVE_STATICD
+#ifdef HAVE_RIPD
[MGMTD_BE_CLIENT_ID_RIPD] = "ripd",
#endif
+#ifdef HAVE_RIPNGD
+ [MGMTD_BE_CLIENT_ID_RIPNGD] = "ripngd",
+#endif
#ifdef HAVE_STATICD
[MGMTD_BE_CLIENT_ID_STATICD] = "staticd",
#endif
@@ -77,6 +80,21 @@ static const char *const ripd_oper_xpaths[] = {
};
#endif
+#if HAVE_RIPNGD
+static const char *const ripngd_config_xpaths[] = {
+ "/frr-filter:lib",
+ "/frr-interface:lib/interface",
+ "/frr-ripngd:ripngd",
+ "/frr-route-map:lib",
+ "/frr-vrf:lib",
+ NULL,
+};
+static const char *const ripngd_oper_xpaths[] = {
+ "/frr-ripd:ripd",
+ NULL,
+};
+#endif
+
#if HAVE_STATICD
static const char *const staticd_config_xpaths[] = {
"/frr-vrf:lib",
@@ -90,6 +108,9 @@ static const char *const *be_client_config_xpaths[MGMTD_BE_CLIENT_ID_MAX] = {
#ifdef HAVE_RIPD
[MGMTD_BE_CLIENT_ID_RIPD] = ripd_config_xpaths,
#endif
+#ifdef HAVE_RIPNGD
+ [MGMTD_BE_CLIENT_ID_RIPNGD] = ripngd_config_xpaths,
+#endif
#ifdef HAVE_STATICD
[MGMTD_BE_CLIENT_ID_STATICD] = staticd_config_xpaths,
#endif
@@ -106,6 +127,9 @@ static const char *const *be_client_oper_xpaths[MGMTD_BE_CLIENT_ID_MAX] = {
#ifdef HAVE_RIPD
[MGMTD_BE_CLIENT_ID_RIPD] = ripd_oper_xpaths,
#endif
+#ifdef HAVE_RIPNGD
+ [MGMTD_BE_CLIENT_ID_RIPNGD] = ripngd_oper_xpaths,
+#endif
[MGMTD_BE_CLIENT_ID_ZEBRA] = zebra_oper_xpaths,
};
diff --git a/mgmtd/mgmt_be_adapter.h b/mgmtd/mgmt_be_adapter.h
index 35c8ec4c7a..955291b7c8 100644
--- a/mgmtd/mgmt_be_adapter.h
+++ b/mgmtd/mgmt_be_adapter.h
@@ -17,7 +17,7 @@
#define MGMTD_BE_CONN_INIT_DELAY_MSEC 50
-#define MGMTD_FIND_ADAPTER_BY_INDEX(adapter_index) \
+#define MGMTD_FIND_ADAPTER_BY_INDEX(adapter_index) \
mgmt_adaptr_ref[adapter_index]
/**
@@ -30,6 +30,9 @@ enum mgmt_be_client_id {
#ifdef HAVE_RIPD
MGMTD_BE_CLIENT_ID_RIPD,
#endif
+#ifdef HAVE_RIPNGD
+ MGMTD_BE_CLIENT_ID_RIPNGD,
+#endif
#ifdef HAVE_STATICD
MGMTD_BE_CLIENT_ID_STATICD,
#endif
diff --git a/mgmtd/mgmt_main.c b/mgmtd/mgmt_main.c
index 6532e9b1bf..1bb1299444 100644
--- a/mgmtd/mgmt_main.c
+++ b/mgmtd/mgmt_main.c
@@ -15,6 +15,7 @@
#include "mgmtd/mgmt.h"
#include "mgmtd/mgmt_ds.h"
#include "ripd/rip_nb.h"
+#include "ripngd/ripng_nb.h"
#include "routing_nb.h"
@@ -188,6 +189,9 @@ static const struct frr_yang_module_info *const mgmt_yang_modules[] = {
#ifdef HAVE_RIPD
&frr_ripd_cli_info,
#endif
+#ifdef HAVE_RIPNGD
+ &frr_ripngd_cli_info,
+#endif
#ifdef HAVE_STATICD
&frr_staticd_cli_info,
#endif
diff --git a/mgmtd/mgmt_vty.c b/mgmtd/mgmt_vty.c
index c88fd2f25b..194af13f1e 100644
--- a/mgmtd/mgmt_vty.c
+++ b/mgmtd/mgmt_vty.c
@@ -9,6 +9,7 @@
#include <zebra.h>
#include "command.h"
+#include "filter.h"
#include "json.h"
#include "network.h"
#include "northbound_cli.h"
@@ -21,7 +22,8 @@
#include "mgmtd/mgmt_history.h"
#include "mgmtd/mgmt_vty_clippy.c"
-#include "ripd/ripd.h"
+#include "ripd/rip_nb.h"
+#include "ripngd/ripng_nb.h"
#include "staticd/static_vty.h"
extern struct frr_daemon_info *mgmt_daemon_info;
@@ -578,6 +580,9 @@ void mgmt_vty_init(void)
#if HAVE_RIPD
rip_cli_init();
#endif
+#if HAVE_RIPNGD
+ ripng_cli_init();
+#endif
#if HAVE_STATICD
static_vty_init();
#endif
diff --git a/mgmtd/subdir.am b/mgmtd/subdir.am
index 244710d733..3d1dafabd4 100644
--- a/mgmtd/subdir.am
+++ b/mgmtd/subdir.am
@@ -74,6 +74,15 @@ mgmtd_libmgmt_be_nb_la_SOURCES += \
# end
endif
+if RIPNGD
+nodist_mgmtd_mgmtd_SOURCES += \
+ yang/frr-ripngd.yang.c \
+ # end
+mgmtd_libmgmt_be_nb_la_SOURCES += \
+ ripngd/ripng_cli.c \
+ # end
+endif
+
if STATICD
nodist_mgmtd_mgmtd_SOURCES += \
yang/frr-staticd.yang.c \