summaryrefslogtreecommitdiffstats
path: root/ripngd
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2018-09-08 22:31:43 +0200
committerDavid Lamparter <equinox@diac24.net>2020-04-16 12:53:00 +0200
commit612c2c15d86e0e5c7e35f1a9a1491f90f365b93c (patch)
tree5fd4cb67296f7748d26a420ad6357615dcd3b382 /ripngd
parent*: remove cmd_node->vtysh (diff)
downloadfrr-612c2c15d86e0e5c7e35f1a9a1491f90f365b93c.tar.xz
frr-612c2c15d86e0e5c7e35f1a9a1491f90f365b93c.zip
*: remove second parameter on install_node()
There is really no reason to not put this in the cmd_node. And while we're add it, rename from pointless ".func" to ".config_write". [v2: fix forgotten ldpd config_write] Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'ripngd')
-rw-r--r--ripngd/ripng_debug.c4
-rw-r--r--ripngd/ripng_interface.c4
-rw-r--r--ripngd/ripngd.c4
3 files changed, 9 insertions, 3 deletions
diff --git a/ripngd/ripng_debug.c b/ripngd/ripng_debug.c
index 24da4b005..117148a3a 100644
--- a/ripngd/ripng_debug.c
+++ b/ripngd/ripng_debug.c
@@ -174,10 +174,12 @@ DEFUN (no_debug_ripng_zebra,
return CMD_SUCCESS;
}
+static int config_write_debug(struct vty *vty);
/* Debug node. */
static struct cmd_node debug_node = {
.node = DEBUG_NODE,
.prompt = "",
+ .config_write = config_write_debug,
};
static int config_write_debug(struct vty *vty)
@@ -213,7 +215,7 @@ void ripng_debug_init(void)
ripng_debug_packet = 0;
ripng_debug_zebra = 0;
- install_node(&debug_node, config_write_debug);
+ install_node(&debug_node);
install_element(VIEW_NODE, &show_debugging_ripng_cmd);
diff --git a/ripngd/ripng_interface.c b/ripngd/ripng_interface.c
index 3fac88514..efaabdb6d 100644
--- a/ripngd/ripng_interface.c
+++ b/ripngd/ripng_interface.c
@@ -954,10 +954,12 @@ static int interface_config_write(struct vty *vty)
return write;
}
+static int interface_config_write(struct vty *vty);
/* ripngd's interface node. */
static struct cmd_node interface_node = {
.node = INTERFACE_NODE,
.prompt = "%s(config-if)# ",
+ .config_write = interface_config_write,
};
/* Initialization of interface. */
@@ -968,7 +970,7 @@ void ripng_if_init(void)
hook_register_prio(if_del, 0, ripng_if_delete_hook);
/* Install interface node. */
- install_node(&interface_node, interface_config_write);
+ install_node(&interface_node);
if_cmd_init();
if_zapi_callbacks(ripng_ifp_create, ripng_ifp_up,
ripng_ifp_down, ripng_ifp_destroy);
diff --git a/ripngd/ripngd.c b/ripngd/ripngd.c
index ad40c0b13..cde8d860e 100644
--- a/ripngd/ripngd.c
+++ b/ripngd/ripngd.c
@@ -2434,10 +2434,12 @@ static int ripng_config_write(struct vty *vty)
return write;
}
+static int ripng_config_write(struct vty *vty);
/* RIPng node structure. */
static struct cmd_node cmd_ripng_node = {
.node = RIPNG_NODE,
.prompt = "%s(config-router)# ",
+ .config_write = ripng_config_write,
};
static void ripng_distribute_update(struct distribute_ctx *ctx,
@@ -2851,7 +2853,7 @@ void ripng_vrf_terminate(void)
void ripng_init(void)
{
/* Install RIPNG_NODE. */
- install_node(&cmd_ripng_node, ripng_config_write);
+ install_node(&cmd_ripng_node);
/* Install ripng commands. */
install_element(VIEW_NODE, &show_ipv6_ripng_cmd);