-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
*: clean up the mess that is CLI command nodes #6135
*: clean up the mess that is CLI command nodes #6135
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution to FRR!
Click for style suggestions
To apply these suggestions:
curl -s https://gist.githubusercontent.com/polychaeta/885c6bd436a102c1a262ab54704eb2b5/raw/8c07b2229904408f14f08e403ae9bb476a4d0bf5/cr_6135_1585822195.diff | git apply
diff --git a/babeld/babel_interface.c b/babeld/babel_interface.c
index 21fb48163..a810f94ac 100644
--- a/babeld/babel_interface.c
+++ b/babeld/babel_interface.c
@@ -60,11 +60,11 @@ static void babel_interface_free (babel_interface_nfo *bi);
static vector babel_enable_if; /* enable interfaces (by cmd). */
static int interface_config_write(struct vty *vty);
static struct cmd_node babel_interface_node = {
- .name = "interface",
- .node = INTERFACE_NODE,
- .parent_node = CONFIG_NODE,
- .prompt = "%s(config-if)# ",
- .config_write = interface_config_write,
+ .name = "interface",
+ .node = INTERFACE_NODE,
+ .parent_node = CONFIG_NODE,
+ .prompt = "%s(config-if)# ",
+ .config_write = interface_config_write,
};
diff --git a/babeld/babeld.c b/babeld/babeld.c
index 906f48564..1cd6c2de8 100644
--- a/babeld/babeld.c
+++ b/babeld/babeld.c
@@ -69,14 +69,13 @@ static time_t expiry_time;
static time_t source_expiry_time;
/* Babel node structure. */
-static int babel_config_write (struct vty *vty);
-static struct cmd_node cmd_babel_node =
-{
- .name = "babel",
- .node = BABEL_NODE,
- .parent_node = CONFIG_NODE,
- .prompt = "%s(config-router)# ",
- .config_write = babel_config_write,
+static int babel_config_write(struct vty *vty);
+static struct cmd_node cmd_babel_node = {
+ .name = "babel",
+ .node = BABEL_NODE,
+ .parent_node = CONFIG_NODE,
+ .prompt = "%s(config-router)# ",
+ .config_write = babel_config_write,
};
/* print current babel configuration on vty */
@@ -722,32 +721,32 @@ void
babeld_quagga_init(void)
{
- install_node(&cmd_babel_node);
+ install_node(&cmd_babel_node);
- install_element(CONFIG_NODE, &router_babel_cmd);
- install_element(CONFIG_NODE, &no_router_babel_cmd);
+ install_element(CONFIG_NODE, &router_babel_cmd);
+ install_element(CONFIG_NODE, &no_router_babel_cmd);
- install_default(BABEL_NODE);
- install_element(BABEL_NODE, &babel_diversity_cmd);
- install_element(BABEL_NODE, &no_babel_diversity_cmd);
- install_element(BABEL_NODE, &babel_diversity_factor_cmd);
- install_element(BABEL_NODE, &babel_set_resend_delay_cmd);
- install_element(BABEL_NODE, &babel_set_smoothing_half_life_cmd);
+ install_default(BABEL_NODE);
+ install_element(BABEL_NODE, &babel_diversity_cmd);
+ install_element(BABEL_NODE, &no_babel_diversity_cmd);
+ install_element(BABEL_NODE, &babel_diversity_factor_cmd);
+ install_element(BABEL_NODE, &babel_set_resend_delay_cmd);
+ install_element(BABEL_NODE, &babel_set_smoothing_half_life_cmd);
- babel_if_init();
+ babel_if_init();
- /* Access list install. */
- access_list_init ();
- access_list_add_hook (babel_distribute_update_all_wrapper);
- access_list_delete_hook (babel_distribute_update_all_wrapper);
+ /* Access list install. */
+ access_list_init();
+ access_list_add_hook(babel_distribute_update_all_wrapper);
+ access_list_delete_hook(babel_distribute_update_all_wrapper);
- /* Prefix list initialize.*/
- prefix_list_init ();
- prefix_list_add_hook (babel_distribute_update_all);
- prefix_list_delete_hook (babel_distribute_update_all);
+ /* Prefix list initialize.*/
+ prefix_list_init();
+ prefix_list_add_hook(babel_distribute_update_all);
+ prefix_list_delete_hook(babel_distribute_update_all);
- /* Distribute list install. */
- distribute_list_init(BABEL_NODE);
+ /* Distribute list install. */
+ distribute_list_init(BABEL_NODE);
}
/* Stubs to adapt Babel's filtering calls to Quagga's infrastructure. */
diff --git a/bgpd/bgp_bmp.c b/bgpd/bgp_bmp.c
index 8902a8789..f502c34f7 100644
--- a/bgpd/bgp_bmp.c
+++ b/bgpd/bgp_bmp.c
@@ -1772,12 +1772,10 @@ static void bmp_active_setup(struct bmp_active *ba)
}
}
-static struct cmd_node bmp_node = {
- .name = "bmp",
- .node = BMP_NODE,
- .parent_node = BGP_NODE,
- .prompt = "%s(config-bgp-bmp)# "
-};
+static struct cmd_node bmp_node = {.name = "bmp",
+ .node = BMP_NODE,
+ .parent_node = BGP_NODE,
+ .prompt = "%s(config-bgp-bmp)# "};
#define BMP_STR "BGP Monitoring Protocol\n"
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c
index fc1d778a7..e6ed53920 100644
--- a/bgpd/bgp_vty.c
+++ b/bgpd/bgp_vty.c
@@ -15334,10 +15334,10 @@ static struct cmd_node bgp_ipv6_labeled_unicast_node = {
};
static struct cmd_node bgp_vpnv4_node = {
- .name = "bgp vpnv4",
- .node = BGP_VPNV4_NODE,
- .parent_node = BGP_NODE,
- .prompt = "%s(config-router-af)# ",
+ .name = "bgp vpnv4",
+ .node = BGP_VPNV4_NODE,
+ .parent_node = BGP_NODE,
+ .prompt = "%s(config-router-af)# ",
};
static struct cmd_node bgp_vpnv6_node = {
diff --git a/lib/command.c b/lib/command.c
index b5869d7cb..38525b4c5 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -2668,8 +2668,8 @@ DEFUN(find,
cli = vector_slot(clis, j);
if (regexec(&exp, cli->string, 0, NULL, 0) == 0)
- vty_out(vty, " (%s) %s\n",
- node->name, cli->string);
+ vty_out(vty, " (%s) %s\n", node->name,
+ cli->string);
}
}
diff --git a/lib/vty.c b/lib/vty.c
index 9cdfd02a8..683c39f89 100644
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -2611,16 +2611,17 @@ void vty_config_exit(struct vty *vty)
/* unlock and jump up to ENABLE_NODE if -and only if- we're
* somewhere below CONFIG_NODE */
while (node && node != CONFIG_NODE) {
- cnode = vector_lookup(cmdvec, node);
- node = cnode->parent_node;
+ cnode = vector_lookup(cmdvec, node);
+ node = cnode->parent_node;
}
if (node != CONFIG_NODE) {
- vty_out(vty, "WARNING: vty_config_exit() from outside CONFIG_NODE!\n");
- return;
+ vty_out(vty,
+ "WARNING: vty_config_exit() from outside CONFIG_NODE!\n");
+ return;
}
while (vty->node != ENABLE_NODE)
- cmd_exit(vty);
+ cmd_exit(vty);
/* Check if there's a pending confirmed commit. */
if (vty->t_confirmed_commit_timeout) {
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
index c3fefcd33..f82c63825 100644
--- a/vtysh/vtysh.c
+++ b/vtysh/vtysh.c
@@ -1361,12 +1361,10 @@ static struct cmd_node bgp_vnc_l2_group_node = {
.prompt = "%s(config-router-vnc-l2-group)# ",
};
-static struct cmd_node bmp_node = {
- .name = "bmp",
- .node = BMP_NODE,
- .parent_node = BGP_NODE,
- .prompt = "%s(config-bgp-bmp)# "
-};
+static struct cmd_node bmp_node = {.name = "bmp",
+ .node = BMP_NODE,
+ .parent_node = BGP_NODE,
+ .prompt = "%s(config-bgp-bmp)# "};
static struct cmd_node ospf_node = {
.name = "ospf",
@@ -3548,8 +3546,8 @@ DEFUN(find,
cli = vector_slot(clis, j);
if (regexec(&exp, cli->string, 0, NULL, 0) == 0)
- vty_out(vty, " (%s) %s\n",
- node->name, cli->string);
+ vty_out(vty, " (%s) %s\n", node->name,
+ cli->string);
}
}
If you are a new contributor to FRR, please see our contributing guidelines.
Outdated results 🛑Basic BGPD CI results: FAILURE
For details, please contact louberger |
22d8939
to
465cdec
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution to FRR!
Click for style suggestions
To apply these suggestions:
curl -s https://gist.githubusercontent.com/polychaeta/20e004f28683bbf3ffd8215ca0daaacc/raw/da8c738fd777b2d399cb3ea8bb8e2917aeeafc3e/cr_6135_1585822550.diff | git apply
diff --git a/babeld/babel_interface.c b/babeld/babel_interface.c
index 21fb48163..a810f94ac 100644
--- a/babeld/babel_interface.c
+++ b/babeld/babel_interface.c
@@ -60,11 +60,11 @@ static void babel_interface_free (babel_interface_nfo *bi);
static vector babel_enable_if; /* enable interfaces (by cmd). */
static int interface_config_write(struct vty *vty);
static struct cmd_node babel_interface_node = {
- .name = "interface",
- .node = INTERFACE_NODE,
- .parent_node = CONFIG_NODE,
- .prompt = "%s(config-if)# ",
- .config_write = interface_config_write,
+ .name = "interface",
+ .node = INTERFACE_NODE,
+ .parent_node = CONFIG_NODE,
+ .prompt = "%s(config-if)# ",
+ .config_write = interface_config_write,
};
diff --git a/babeld/babeld.c b/babeld/babeld.c
index 906f48564..1cd6c2de8 100644
--- a/babeld/babeld.c
+++ b/babeld/babeld.c
@@ -69,14 +69,13 @@ static time_t expiry_time;
static time_t source_expiry_time;
/* Babel node structure. */
-static int babel_config_write (struct vty *vty);
-static struct cmd_node cmd_babel_node =
-{
- .name = "babel",
- .node = BABEL_NODE,
- .parent_node = CONFIG_NODE,
- .prompt = "%s(config-router)# ",
- .config_write = babel_config_write,
+static int babel_config_write(struct vty *vty);
+static struct cmd_node cmd_babel_node = {
+ .name = "babel",
+ .node = BABEL_NODE,
+ .parent_node = CONFIG_NODE,
+ .prompt = "%s(config-router)# ",
+ .config_write = babel_config_write,
};
/* print current babel configuration on vty */
@@ -722,32 +721,32 @@ void
babeld_quagga_init(void)
{
- install_node(&cmd_babel_node);
+ install_node(&cmd_babel_node);
- install_element(CONFIG_NODE, &router_babel_cmd);
- install_element(CONFIG_NODE, &no_router_babel_cmd);
+ install_element(CONFIG_NODE, &router_babel_cmd);
+ install_element(CONFIG_NODE, &no_router_babel_cmd);
- install_default(BABEL_NODE);
- install_element(BABEL_NODE, &babel_diversity_cmd);
- install_element(BABEL_NODE, &no_babel_diversity_cmd);
- install_element(BABEL_NODE, &babel_diversity_factor_cmd);
- install_element(BABEL_NODE, &babel_set_resend_delay_cmd);
- install_element(BABEL_NODE, &babel_set_smoothing_half_life_cmd);
+ install_default(BABEL_NODE);
+ install_element(BABEL_NODE, &babel_diversity_cmd);
+ install_element(BABEL_NODE, &no_babel_diversity_cmd);
+ install_element(BABEL_NODE, &babel_diversity_factor_cmd);
+ install_element(BABEL_NODE, &babel_set_resend_delay_cmd);
+ install_element(BABEL_NODE, &babel_set_smoothing_half_life_cmd);
- babel_if_init();
+ babel_if_init();
- /* Access list install. */
- access_list_init ();
- access_list_add_hook (babel_distribute_update_all_wrapper);
- access_list_delete_hook (babel_distribute_update_all_wrapper);
+ /* Access list install. */
+ access_list_init();
+ access_list_add_hook(babel_distribute_update_all_wrapper);
+ access_list_delete_hook(babel_distribute_update_all_wrapper);
- /* Prefix list initialize.*/
- prefix_list_init ();
- prefix_list_add_hook (babel_distribute_update_all);
- prefix_list_delete_hook (babel_distribute_update_all);
+ /* Prefix list initialize.*/
+ prefix_list_init();
+ prefix_list_add_hook(babel_distribute_update_all);
+ prefix_list_delete_hook(babel_distribute_update_all);
- /* Distribute list install. */
- distribute_list_init(BABEL_NODE);
+ /* Distribute list install. */
+ distribute_list_init(BABEL_NODE);
}
/* Stubs to adapt Babel's filtering calls to Quagga's infrastructure. */
diff --git a/bgpd/bgp_bmp.c b/bgpd/bgp_bmp.c
index 8902a8789..f502c34f7 100644
--- a/bgpd/bgp_bmp.c
+++ b/bgpd/bgp_bmp.c
@@ -1772,12 +1772,10 @@ static void bmp_active_setup(struct bmp_active *ba)
}
}
-static struct cmd_node bmp_node = {
- .name = "bmp",
- .node = BMP_NODE,
- .parent_node = BGP_NODE,
- .prompt = "%s(config-bgp-bmp)# "
-};
+static struct cmd_node bmp_node = {.name = "bmp",
+ .node = BMP_NODE,
+ .parent_node = BGP_NODE,
+ .prompt = "%s(config-bgp-bmp)# "};
#define BMP_STR "BGP Monitoring Protocol\n"
diff --git a/lib/command.c b/lib/command.c
index b5869d7cb..38525b4c5 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -2668,8 +2668,8 @@ DEFUN(find,
cli = vector_slot(clis, j);
if (regexec(&exp, cli->string, 0, NULL, 0) == 0)
- vty_out(vty, " (%s) %s\n",
- node->name, cli->string);
+ vty_out(vty, " (%s) %s\n", node->name,
+ cli->string);
}
}
diff --git a/lib/vty.c b/lib/vty.c
index 9fae9bb2b..683c39f89 100644
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -2615,12 +2615,13 @@ void vty_config_exit(struct vty *vty)
node = cnode->parent_node;
}
if (node != CONFIG_NODE) {
- vty_out(vty, "WARNING: vty_config_exit() from outside CONFIG_NODE!\n");
+ vty_out(vty,
+ "WARNING: vty_config_exit() from outside CONFIG_NODE!\n");
return;
}
while (vty->node != ENABLE_NODE)
- cmd_exit(vty);
+ cmd_exit(vty);
/* Check if there's a pending confirmed commit. */
if (vty->t_confirmed_commit_timeout) {
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
index c3fefcd33..f82c63825 100644
--- a/vtysh/vtysh.c
+++ b/vtysh/vtysh.c
@@ -1361,12 +1361,10 @@ static struct cmd_node bgp_vnc_l2_group_node = {
.prompt = "%s(config-router-vnc-l2-group)# ",
};
-static struct cmd_node bmp_node = {
- .name = "bmp",
- .node = BMP_NODE,
- .parent_node = BGP_NODE,
- .prompt = "%s(config-bgp-bmp)# "
-};
+static struct cmd_node bmp_node = {.name = "bmp",
+ .node = BMP_NODE,
+ .parent_node = BGP_NODE,
+ .prompt = "%s(config-bgp-bmp)# "};
static struct cmd_node ospf_node = {
.name = "ospf",
@@ -3548,8 +3546,8 @@ DEFUN(find,
cli = vector_slot(clis, j);
if (regexec(&exp, cli->string, 0, NULL, 0) == 0)
- vty_out(vty, " (%s) %s\n",
- node->name, cli->string);
+ vty_out(vty, " (%s) %s\n", node->name,
+ cli->string);
}
}
If you are a new contributor to FRR, please see our contributing guidelines.
465cdec
to
0828118
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution to FRR!
Click for style suggestions
To apply these suggestions:
curl -s https://gist.githubusercontent.com/polychaeta/a709ce58b7fd91ada090b880741e4dd2/raw/da8c738fd777b2d399cb3ea8bb8e2917aeeafc3e/cr_6135_1585822722.diff | git apply
diff --git a/babeld/babel_interface.c b/babeld/babel_interface.c
index 21fb48163..a810f94ac 100644
--- a/babeld/babel_interface.c
+++ b/babeld/babel_interface.c
@@ -60,11 +60,11 @@ static void babel_interface_free (babel_interface_nfo *bi);
static vector babel_enable_if; /* enable interfaces (by cmd). */
static int interface_config_write(struct vty *vty);
static struct cmd_node babel_interface_node = {
- .name = "interface",
- .node = INTERFACE_NODE,
- .parent_node = CONFIG_NODE,
- .prompt = "%s(config-if)# ",
- .config_write = interface_config_write,
+ .name = "interface",
+ .node = INTERFACE_NODE,
+ .parent_node = CONFIG_NODE,
+ .prompt = "%s(config-if)# ",
+ .config_write = interface_config_write,
};
diff --git a/babeld/babeld.c b/babeld/babeld.c
index 906f48564..1cd6c2de8 100644
--- a/babeld/babeld.c
+++ b/babeld/babeld.c
@@ -69,14 +69,13 @@ static time_t expiry_time;
static time_t source_expiry_time;
/* Babel node structure. */
-static int babel_config_write (struct vty *vty);
-static struct cmd_node cmd_babel_node =
-{
- .name = "babel",
- .node = BABEL_NODE,
- .parent_node = CONFIG_NODE,
- .prompt = "%s(config-router)# ",
- .config_write = babel_config_write,
+static int babel_config_write(struct vty *vty);
+static struct cmd_node cmd_babel_node = {
+ .name = "babel",
+ .node = BABEL_NODE,
+ .parent_node = CONFIG_NODE,
+ .prompt = "%s(config-router)# ",
+ .config_write = babel_config_write,
};
/* print current babel configuration on vty */
@@ -722,32 +721,32 @@ void
babeld_quagga_init(void)
{
- install_node(&cmd_babel_node);
+ install_node(&cmd_babel_node);
- install_element(CONFIG_NODE, &router_babel_cmd);
- install_element(CONFIG_NODE, &no_router_babel_cmd);
+ install_element(CONFIG_NODE, &router_babel_cmd);
+ install_element(CONFIG_NODE, &no_router_babel_cmd);
- install_default(BABEL_NODE);
- install_element(BABEL_NODE, &babel_diversity_cmd);
- install_element(BABEL_NODE, &no_babel_diversity_cmd);
- install_element(BABEL_NODE, &babel_diversity_factor_cmd);
- install_element(BABEL_NODE, &babel_set_resend_delay_cmd);
- install_element(BABEL_NODE, &babel_set_smoothing_half_life_cmd);
+ install_default(BABEL_NODE);
+ install_element(BABEL_NODE, &babel_diversity_cmd);
+ install_element(BABEL_NODE, &no_babel_diversity_cmd);
+ install_element(BABEL_NODE, &babel_diversity_factor_cmd);
+ install_element(BABEL_NODE, &babel_set_resend_delay_cmd);
+ install_element(BABEL_NODE, &babel_set_smoothing_half_life_cmd);
- babel_if_init();
+ babel_if_init();
- /* Access list install. */
- access_list_init ();
- access_list_add_hook (babel_distribute_update_all_wrapper);
- access_list_delete_hook (babel_distribute_update_all_wrapper);
+ /* Access list install. */
+ access_list_init();
+ access_list_add_hook(babel_distribute_update_all_wrapper);
+ access_list_delete_hook(babel_distribute_update_all_wrapper);
- /* Prefix list initialize.*/
- prefix_list_init ();
- prefix_list_add_hook (babel_distribute_update_all);
- prefix_list_delete_hook (babel_distribute_update_all);
+ /* Prefix list initialize.*/
+ prefix_list_init();
+ prefix_list_add_hook(babel_distribute_update_all);
+ prefix_list_delete_hook(babel_distribute_update_all);
- /* Distribute list install. */
- distribute_list_init(BABEL_NODE);
+ /* Distribute list install. */
+ distribute_list_init(BABEL_NODE);
}
/* Stubs to adapt Babel's filtering calls to Quagga's infrastructure. */
diff --git a/bgpd/bgp_bmp.c b/bgpd/bgp_bmp.c
index 8902a8789..f502c34f7 100644
--- a/bgpd/bgp_bmp.c
+++ b/bgpd/bgp_bmp.c
@@ -1772,12 +1772,10 @@ static void bmp_active_setup(struct bmp_active *ba)
}
}
-static struct cmd_node bmp_node = {
- .name = "bmp",
- .node = BMP_NODE,
- .parent_node = BGP_NODE,
- .prompt = "%s(config-bgp-bmp)# "
-};
+static struct cmd_node bmp_node = {.name = "bmp",
+ .node = BMP_NODE,
+ .parent_node = BGP_NODE,
+ .prompt = "%s(config-bgp-bmp)# "};
#define BMP_STR "BGP Monitoring Protocol\n"
diff --git a/lib/command.c b/lib/command.c
index b5869d7cb..38525b4c5 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -2668,8 +2668,8 @@ DEFUN(find,
cli = vector_slot(clis, j);
if (regexec(&exp, cli->string, 0, NULL, 0) == 0)
- vty_out(vty, " (%s) %s\n",
- node->name, cli->string);
+ vty_out(vty, " (%s) %s\n", node->name,
+ cli->string);
}
}
diff --git a/lib/vty.c b/lib/vty.c
index 9fae9bb2b..683c39f89 100644
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -2615,12 +2615,13 @@ void vty_config_exit(struct vty *vty)
node = cnode->parent_node;
}
if (node != CONFIG_NODE) {
- vty_out(vty, "WARNING: vty_config_exit() from outside CONFIG_NODE!\n");
+ vty_out(vty,
+ "WARNING: vty_config_exit() from outside CONFIG_NODE!\n");
return;
}
while (vty->node != ENABLE_NODE)
- cmd_exit(vty);
+ cmd_exit(vty);
/* Check if there's a pending confirmed commit. */
if (vty->t_confirmed_commit_timeout) {
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
index c3fefcd33..f82c63825 100644
--- a/vtysh/vtysh.c
+++ b/vtysh/vtysh.c
@@ -1361,12 +1361,10 @@ static struct cmd_node bgp_vnc_l2_group_node = {
.prompt = "%s(config-router-vnc-l2-group)# ",
};
-static struct cmd_node bmp_node = {
- .name = "bmp",
- .node = BMP_NODE,
- .parent_node = BGP_NODE,
- .prompt = "%s(config-bgp-bmp)# "
-};
+static struct cmd_node bmp_node = {.name = "bmp",
+ .node = BMP_NODE,
+ .parent_node = BGP_NODE,
+ .prompt = "%s(config-bgp-bmp)# "};
static struct cmd_node ospf_node = {
.name = "ospf",
@@ -3548,8 +3546,8 @@ DEFUN(find,
cli = vector_slot(clis, j);
if (regexec(&exp, cli->string, 0, NULL, 0) == 0)
- vty_out(vty, " (%s) %s\n",
- node->name, cli->string);
+ vty_out(vty, " (%s) %s\n", node->name,
+ cli->string);
}
}
If you are a new contributor to FRR, please see our contributing guidelines.
0828118
to
4e23051
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution to FRR!
Click for style suggestions
To apply these suggestions:
curl -s https://gist.githubusercontent.com/polychaeta/3de749fd5dd350951f9f9a6c11912b4f/raw/597c12b4cbec05466bd780ffcee626a34a434525/cr_6135_1585822823.diff | git apply
diff --git a/babeld/babel_interface.c b/babeld/babel_interface.c
index 21fb48163..a810f94ac 100644
--- a/babeld/babel_interface.c
+++ b/babeld/babel_interface.c
@@ -60,11 +60,11 @@ static void babel_interface_free (babel_interface_nfo *bi);
static vector babel_enable_if; /* enable interfaces (by cmd). */
static int interface_config_write(struct vty *vty);
static struct cmd_node babel_interface_node = {
- .name = "interface",
- .node = INTERFACE_NODE,
- .parent_node = CONFIG_NODE,
- .prompt = "%s(config-if)# ",
- .config_write = interface_config_write,
+ .name = "interface",
+ .node = INTERFACE_NODE,
+ .parent_node = CONFIG_NODE,
+ .prompt = "%s(config-if)# ",
+ .config_write = interface_config_write,
};
diff --git a/babeld/babeld.c b/babeld/babeld.c
index 906f48564..1cd6c2de8 100644
--- a/babeld/babeld.c
+++ b/babeld/babeld.c
@@ -69,14 +69,13 @@ static time_t expiry_time;
static time_t source_expiry_time;
/* Babel node structure. */
-static int babel_config_write (struct vty *vty);
-static struct cmd_node cmd_babel_node =
-{
- .name = "babel",
- .node = BABEL_NODE,
- .parent_node = CONFIG_NODE,
- .prompt = "%s(config-router)# ",
- .config_write = babel_config_write,
+static int babel_config_write(struct vty *vty);
+static struct cmd_node cmd_babel_node = {
+ .name = "babel",
+ .node = BABEL_NODE,
+ .parent_node = CONFIG_NODE,
+ .prompt = "%s(config-router)# ",
+ .config_write = babel_config_write,
};
/* print current babel configuration on vty */
@@ -722,32 +721,32 @@ void
babeld_quagga_init(void)
{
- install_node(&cmd_babel_node);
+ install_node(&cmd_babel_node);
- install_element(CONFIG_NODE, &router_babel_cmd);
- install_element(CONFIG_NODE, &no_router_babel_cmd);
+ install_element(CONFIG_NODE, &router_babel_cmd);
+ install_element(CONFIG_NODE, &no_router_babel_cmd);
- install_default(BABEL_NODE);
- install_element(BABEL_NODE, &babel_diversity_cmd);
- install_element(BABEL_NODE, &no_babel_diversity_cmd);
- install_element(BABEL_NODE, &babel_diversity_factor_cmd);
- install_element(BABEL_NODE, &babel_set_resend_delay_cmd);
- install_element(BABEL_NODE, &babel_set_smoothing_half_life_cmd);
+ install_default(BABEL_NODE);
+ install_element(BABEL_NODE, &babel_diversity_cmd);
+ install_element(BABEL_NODE, &no_babel_diversity_cmd);
+ install_element(BABEL_NODE, &babel_diversity_factor_cmd);
+ install_element(BABEL_NODE, &babel_set_resend_delay_cmd);
+ install_element(BABEL_NODE, &babel_set_smoothing_half_life_cmd);
- babel_if_init();
+ babel_if_init();
- /* Access list install. */
- access_list_init ();
- access_list_add_hook (babel_distribute_update_all_wrapper);
- access_list_delete_hook (babel_distribute_update_all_wrapper);
+ /* Access list install. */
+ access_list_init();
+ access_list_add_hook(babel_distribute_update_all_wrapper);
+ access_list_delete_hook(babel_distribute_update_all_wrapper);
- /* Prefix list initialize.*/
- prefix_list_init ();
- prefix_list_add_hook (babel_distribute_update_all);
- prefix_list_delete_hook (babel_distribute_update_all);
+ /* Prefix list initialize.*/
+ prefix_list_init();
+ prefix_list_add_hook(babel_distribute_update_all);
+ prefix_list_delete_hook(babel_distribute_update_all);
- /* Distribute list install. */
- distribute_list_init(BABEL_NODE);
+ /* Distribute list install. */
+ distribute_list_init(BABEL_NODE);
}
/* Stubs to adapt Babel's filtering calls to Quagga's infrastructure. */
diff --git a/bgpd/bgp_bmp.c b/bgpd/bgp_bmp.c
index 8902a8789..f502c34f7 100644
--- a/bgpd/bgp_bmp.c
+++ b/bgpd/bgp_bmp.c
@@ -1772,12 +1772,10 @@ static void bmp_active_setup(struct bmp_active *ba)
}
}
-static struct cmd_node bmp_node = {
- .name = "bmp",
- .node = BMP_NODE,
- .parent_node = BGP_NODE,
- .prompt = "%s(config-bgp-bmp)# "
-};
+static struct cmd_node bmp_node = {.name = "bmp",
+ .node = BMP_NODE,
+ .parent_node = BGP_NODE,
+ .prompt = "%s(config-bgp-bmp)# "};
#define BMP_STR "BGP Monitoring Protocol\n"
diff --git a/lib/command.c b/lib/command.c
index b5869d7cb..38525b4c5 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -2668,8 +2668,8 @@ DEFUN(find,
cli = vector_slot(clis, j);
if (regexec(&exp, cli->string, 0, NULL, 0) == 0)
- vty_out(vty, " (%s) %s\n",
- node->name, cli->string);
+ vty_out(vty, " (%s) %s\n", node->name,
+ cli->string);
}
}
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
index c3fefcd33..f82c63825 100644
--- a/vtysh/vtysh.c
+++ b/vtysh/vtysh.c
@@ -1361,12 +1361,10 @@ static struct cmd_node bgp_vnc_l2_group_node = {
.prompt = "%s(config-router-vnc-l2-group)# ",
};
-static struct cmd_node bmp_node = {
- .name = "bmp",
- .node = BMP_NODE,
- .parent_node = BGP_NODE,
- .prompt = "%s(config-bgp-bmp)# "
-};
+static struct cmd_node bmp_node = {.name = "bmp",
+ .node = BMP_NODE,
+ .parent_node = BGP_NODE,
+ .prompt = "%s(config-bgp-bmp)# "};
static struct cmd_node ospf_node = {
.name = "ospf",
@@ -3548,8 +3546,8 @@ DEFUN(find,
cli = vector_slot(clis, j);
if (regexec(&exp, cli->string, 0, NULL, 0) == 0)
- vty_out(vty, " (%s) %s\n",
- node->name, cli->string);
+ vty_out(vty, " (%s) %s\n", node->name,
+ cli->string);
}
}
If you are a new contributor to FRR, please see our contributing guidelines.
remaining style suggestions are chickenheaded ;D |
Outdated results 🛑Basic BGPD CI results: FAILURE
For details, please contact louberger |
Outdated results 🛑Basic BGPD CI results: FAILURE
For details, please contact louberger |
This comment has been minimized.
This comment has been minimized.
4e23051
to
77f5b07
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution to FRR!
Click for style suggestions
To apply these suggestions:
curl -s https://gist.githubusercontent.com/polychaeta/1fa3e2fc43d39cf8cc2aaf74d8de778f/raw/597c12b4cbec05466bd780ffcee626a34a434525/cr_6135_1585825871.diff | git apply
diff --git a/babeld/babel_interface.c b/babeld/babel_interface.c
index 21fb48163..a810f94ac 100644
--- a/babeld/babel_interface.c
+++ b/babeld/babel_interface.c
@@ -60,11 +60,11 @@ static void babel_interface_free (babel_interface_nfo *bi);
static vector babel_enable_if; /* enable interfaces (by cmd). */
static int interface_config_write(struct vty *vty);
static struct cmd_node babel_interface_node = {
- .name = "interface",
- .node = INTERFACE_NODE,
- .parent_node = CONFIG_NODE,
- .prompt = "%s(config-if)# ",
- .config_write = interface_config_write,
+ .name = "interface",
+ .node = INTERFACE_NODE,
+ .parent_node = CONFIG_NODE,
+ .prompt = "%s(config-if)# ",
+ .config_write = interface_config_write,
};
diff --git a/babeld/babeld.c b/babeld/babeld.c
index 906f48564..1cd6c2de8 100644
--- a/babeld/babeld.c
+++ b/babeld/babeld.c
@@ -69,14 +69,13 @@ static time_t expiry_time;
static time_t source_expiry_time;
/* Babel node structure. */
-static int babel_config_write (struct vty *vty);
-static struct cmd_node cmd_babel_node =
-{
- .name = "babel",
- .node = BABEL_NODE,
- .parent_node = CONFIG_NODE,
- .prompt = "%s(config-router)# ",
- .config_write = babel_config_write,
+static int babel_config_write(struct vty *vty);
+static struct cmd_node cmd_babel_node = {
+ .name = "babel",
+ .node = BABEL_NODE,
+ .parent_node = CONFIG_NODE,
+ .prompt = "%s(config-router)# ",
+ .config_write = babel_config_write,
};
/* print current babel configuration on vty */
@@ -722,32 +721,32 @@ void
babeld_quagga_init(void)
{
- install_node(&cmd_babel_node);
+ install_node(&cmd_babel_node);
- install_element(CONFIG_NODE, &router_babel_cmd);
- install_element(CONFIG_NODE, &no_router_babel_cmd);
+ install_element(CONFIG_NODE, &router_babel_cmd);
+ install_element(CONFIG_NODE, &no_router_babel_cmd);
- install_default(BABEL_NODE);
- install_element(BABEL_NODE, &babel_diversity_cmd);
- install_element(BABEL_NODE, &no_babel_diversity_cmd);
- install_element(BABEL_NODE, &babel_diversity_factor_cmd);
- install_element(BABEL_NODE, &babel_set_resend_delay_cmd);
- install_element(BABEL_NODE, &babel_set_smoothing_half_life_cmd);
+ install_default(BABEL_NODE);
+ install_element(BABEL_NODE, &babel_diversity_cmd);
+ install_element(BABEL_NODE, &no_babel_diversity_cmd);
+ install_element(BABEL_NODE, &babel_diversity_factor_cmd);
+ install_element(BABEL_NODE, &babel_set_resend_delay_cmd);
+ install_element(BABEL_NODE, &babel_set_smoothing_half_life_cmd);
- babel_if_init();
+ babel_if_init();
- /* Access list install. */
- access_list_init ();
- access_list_add_hook (babel_distribute_update_all_wrapper);
- access_list_delete_hook (babel_distribute_update_all_wrapper);
+ /* Access list install. */
+ access_list_init();
+ access_list_add_hook(babel_distribute_update_all_wrapper);
+ access_list_delete_hook(babel_distribute_update_all_wrapper);
- /* Prefix list initialize.*/
- prefix_list_init ();
- prefix_list_add_hook (babel_distribute_update_all);
- prefix_list_delete_hook (babel_distribute_update_all);
+ /* Prefix list initialize.*/
+ prefix_list_init();
+ prefix_list_add_hook(babel_distribute_update_all);
+ prefix_list_delete_hook(babel_distribute_update_all);
- /* Distribute list install. */
- distribute_list_init(BABEL_NODE);
+ /* Distribute list install. */
+ distribute_list_init(BABEL_NODE);
}
/* Stubs to adapt Babel's filtering calls to Quagga's infrastructure. */
diff --git a/bgpd/bgp_bmp.c b/bgpd/bgp_bmp.c
index 8902a8789..f502c34f7 100644
--- a/bgpd/bgp_bmp.c
+++ b/bgpd/bgp_bmp.c
@@ -1772,12 +1772,10 @@ static void bmp_active_setup(struct bmp_active *ba)
}
}
-static struct cmd_node bmp_node = {
- .name = "bmp",
- .node = BMP_NODE,
- .parent_node = BGP_NODE,
- .prompt = "%s(config-bgp-bmp)# "
-};
+static struct cmd_node bmp_node = {.name = "bmp",
+ .node = BMP_NODE,
+ .parent_node = BGP_NODE,
+ .prompt = "%s(config-bgp-bmp)# "};
#define BMP_STR "BGP Monitoring Protocol\n"
diff --git a/lib/command.c b/lib/command.c
index b5869d7cb..38525b4c5 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -2668,8 +2668,8 @@ DEFUN(find,
cli = vector_slot(clis, j);
if (regexec(&exp, cli->string, 0, NULL, 0) == 0)
- vty_out(vty, " (%s) %s\n",
- node->name, cli->string);
+ vty_out(vty, " (%s) %s\n", node->name,
+ cli->string);
}
}
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
index c3fefcd33..f82c63825 100644
--- a/vtysh/vtysh.c
+++ b/vtysh/vtysh.c
@@ -1361,12 +1361,10 @@ static struct cmd_node bgp_vnc_l2_group_node = {
.prompt = "%s(config-router-vnc-l2-group)# ",
};
-static struct cmd_node bmp_node = {
- .name = "bmp",
- .node = BMP_NODE,
- .parent_node = BGP_NODE,
- .prompt = "%s(config-bgp-bmp)# "
-};
+static struct cmd_node bmp_node = {.name = "bmp",
+ .node = BMP_NODE,
+ .parent_node = BGP_NODE,
+ .prompt = "%s(config-bgp-bmp)# "};
static struct cmd_node ospf_node = {
.name = "ospf",
@@ -3548,8 +3546,8 @@ DEFUN(find,
cli = vector_slot(clis, j);
if (regexec(&exp, cli->string, 0, NULL, 0) == 0)
- vty_out(vty, " (%s) %s\n",
- node->name, cli->string);
+ vty_out(vty, " (%s) %s\n", node->name,
+ cli->string);
}
}
If you are a new contributor to FRR, please see our contributing guidelines.
77f5b07
to
4cc4248
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution to FRR!
Click for style suggestions
To apply these suggestions:
curl -s https://gist.githubusercontent.com/polychaeta/78643d92f72cfcbdde983ae566202a5a/raw/597c12b4cbec05466bd780ffcee626a34a434525/cr_6135_1585825930.diff | git apply
diff --git a/babeld/babel_interface.c b/babeld/babel_interface.c
index 21fb48163..a810f94ac 100644
--- a/babeld/babel_interface.c
+++ b/babeld/babel_interface.c
@@ -60,11 +60,11 @@ static void babel_interface_free (babel_interface_nfo *bi);
static vector babel_enable_if; /* enable interfaces (by cmd). */
static int interface_config_write(struct vty *vty);
static struct cmd_node babel_interface_node = {
- .name = "interface",
- .node = INTERFACE_NODE,
- .parent_node = CONFIG_NODE,
- .prompt = "%s(config-if)# ",
- .config_write = interface_config_write,
+ .name = "interface",
+ .node = INTERFACE_NODE,
+ .parent_node = CONFIG_NODE,
+ .prompt = "%s(config-if)# ",
+ .config_write = interface_config_write,
};
diff --git a/babeld/babeld.c b/babeld/babeld.c
index 906f48564..1cd6c2de8 100644
--- a/babeld/babeld.c
+++ b/babeld/babeld.c
@@ -69,14 +69,13 @@ static time_t expiry_time;
static time_t source_expiry_time;
/* Babel node structure. */
-static int babel_config_write (struct vty *vty);
-static struct cmd_node cmd_babel_node =
-{
- .name = "babel",
- .node = BABEL_NODE,
- .parent_node = CONFIG_NODE,
- .prompt = "%s(config-router)# ",
- .config_write = babel_config_write,
+static int babel_config_write(struct vty *vty);
+static struct cmd_node cmd_babel_node = {
+ .name = "babel",
+ .node = BABEL_NODE,
+ .parent_node = CONFIG_NODE,
+ .prompt = "%s(config-router)# ",
+ .config_write = babel_config_write,
};
/* print current babel configuration on vty */
@@ -722,32 +721,32 @@ void
babeld_quagga_init(void)
{
- install_node(&cmd_babel_node);
+ install_node(&cmd_babel_node);
- install_element(CONFIG_NODE, &router_babel_cmd);
- install_element(CONFIG_NODE, &no_router_babel_cmd);
+ install_element(CONFIG_NODE, &router_babel_cmd);
+ install_element(CONFIG_NODE, &no_router_babel_cmd);
- install_default(BABEL_NODE);
- install_element(BABEL_NODE, &babel_diversity_cmd);
- install_element(BABEL_NODE, &no_babel_diversity_cmd);
- install_element(BABEL_NODE, &babel_diversity_factor_cmd);
- install_element(BABEL_NODE, &babel_set_resend_delay_cmd);
- install_element(BABEL_NODE, &babel_set_smoothing_half_life_cmd);
+ install_default(BABEL_NODE);
+ install_element(BABEL_NODE, &babel_diversity_cmd);
+ install_element(BABEL_NODE, &no_babel_diversity_cmd);
+ install_element(BABEL_NODE, &babel_diversity_factor_cmd);
+ install_element(BABEL_NODE, &babel_set_resend_delay_cmd);
+ install_element(BABEL_NODE, &babel_set_smoothing_half_life_cmd);
- babel_if_init();
+ babel_if_init();
- /* Access list install. */
- access_list_init ();
- access_list_add_hook (babel_distribute_update_all_wrapper);
- access_list_delete_hook (babel_distribute_update_all_wrapper);
+ /* Access list install. */
+ access_list_init();
+ access_list_add_hook(babel_distribute_update_all_wrapper);
+ access_list_delete_hook(babel_distribute_update_all_wrapper);
- /* Prefix list initialize.*/
- prefix_list_init ();
- prefix_list_add_hook (babel_distribute_update_all);
- prefix_list_delete_hook (babel_distribute_update_all);
+ /* Prefix list initialize.*/
+ prefix_list_init();
+ prefix_list_add_hook(babel_distribute_update_all);
+ prefix_list_delete_hook(babel_distribute_update_all);
- /* Distribute list install. */
- distribute_list_init(BABEL_NODE);
+ /* Distribute list install. */
+ distribute_list_init(BABEL_NODE);
}
/* Stubs to adapt Babel's filtering calls to Quagga's infrastructure. */
diff --git a/bgpd/bgp_bmp.c b/bgpd/bgp_bmp.c
index 8902a8789..f502c34f7 100644
--- a/bgpd/bgp_bmp.c
+++ b/bgpd/bgp_bmp.c
@@ -1772,12 +1772,10 @@ static void bmp_active_setup(struct bmp_active *ba)
}
}
-static struct cmd_node bmp_node = {
- .name = "bmp",
- .node = BMP_NODE,
- .parent_node = BGP_NODE,
- .prompt = "%s(config-bgp-bmp)# "
-};
+static struct cmd_node bmp_node = {.name = "bmp",
+ .node = BMP_NODE,
+ .parent_node = BGP_NODE,
+ .prompt = "%s(config-bgp-bmp)# "};
#define BMP_STR "BGP Monitoring Protocol\n"
diff --git a/lib/command.c b/lib/command.c
index b5869d7cb..38525b4c5 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -2668,8 +2668,8 @@ DEFUN(find,
cli = vector_slot(clis, j);
if (regexec(&exp, cli->string, 0, NULL, 0) == 0)
- vty_out(vty, " (%s) %s\n",
- node->name, cli->string);
+ vty_out(vty, " (%s) %s\n", node->name,
+ cli->string);
}
}
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
index c3fefcd33..f82c63825 100644
--- a/vtysh/vtysh.c
+++ b/vtysh/vtysh.c
@@ -1361,12 +1361,10 @@ static struct cmd_node bgp_vnc_l2_group_node = {
.prompt = "%s(config-router-vnc-l2-group)# ",
};
-static struct cmd_node bmp_node = {
- .name = "bmp",
- .node = BMP_NODE,
- .parent_node = BGP_NODE,
- .prompt = "%s(config-bgp-bmp)# "
-};
+static struct cmd_node bmp_node = {.name = "bmp",
+ .node = BMP_NODE,
+ .parent_node = BGP_NODE,
+ .prompt = "%s(config-bgp-bmp)# "};
static struct cmd_node ospf_node = {
.name = "ospf",
@@ -3548,8 +3546,8 @@ DEFUN(find,
cli = vector_slot(clis, j);
if (regexec(&exp, cli->string, 0, NULL, 0) == 0)
- vty_out(vty, " (%s) %s\n",
- node->name, cli->string);
+ vty_out(vty, " (%s) %s\n", node->name,
+ cli->string);
}
}
If you are a new contributor to FRR, please see our contributing guidelines.
Continuous Integration Result: FAILEDContinuous Integration Result: FAILEDSee below for issues. This is a comment from an automated CI system. Get source / Pull Request: SuccessfulBuilding Stage: FailedOpenBSD 6 amd64 build: Failed (click for details)DejaGNU Unittests (make check) failed for OpenBSD 6 amd64 build:
OpenBSD 6 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-11579/artifact/CI011BUILD/config.status/config.status Ubuntu 18.04 ppc64le build: Failed (click for details)DejaGNU Unittests (make check) failed for Ubuntu 18.04 ppc64le build Ubuntu 16.04 i386 build: Failed (click for details)Package building failed for Ubuntu 16.04 i386 build:
Ubuntu 16.04 i386 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-11579/artifact/U1604I386/config.status/config.status Debian 9 amd64 build: Failed (click for details)DejaGNU Unittests (make check) failed for Debian 9 amd64 build Ubuntu 16.04 amd64 build: Failed (click for details)DejaGNU Unittests (make check) failed for Ubuntu 16.04 amd64 build Ubuntu 14.04 amd64 build: Failed (click for details)DejaGNU Unittests (make check) failed for Ubuntu 14.04 amd64 build Debian 8 amd64 build: Failed (click for details)DejaGNU Unittests (make check) failed for Debian 8 amd64 build Successful on other platforms/tests
Warnings Generated during build:Checkout code: Successful with additional warningsOpenBSD 6 amd64 build: Failed (click for details)DejaGNU Unittests (make check) failed for OpenBSD 6 amd64 build:
OpenBSD 6 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-11579/artifact/CI011BUILD/config.status/config.status Ubuntu 18.04 ppc64le build: Failed (click for details)DejaGNU Unittests (make check) failed for Ubuntu 18.04 ppc64le build Ubuntu 16.04 i386 build: Failed (click for details)Package building failed for Ubuntu 16.04 i386 build:
Ubuntu 16.04 i386 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-11579/artifact/U1604I386/config.status/config.status Debian 9 amd64 build: Failed (click for details)DejaGNU Unittests (make check) failed for Debian 9 amd64 build Ubuntu 16.04 amd64 build: Failed (click for details)DejaGNU Unittests (make check) failed for Ubuntu 16.04 amd64 build Ubuntu 14.04 amd64 build: Failed (click for details)DejaGNU Unittests (make check) failed for Ubuntu 14.04 amd64 build Debian 8 amd64 build: Failed (click for details)DejaGNU Unittests (make check) failed for Debian 8 amd64 build
Warnings Generated during build:Debian 10 amd64 build: Successful with additional warningsDebian Package lintian failed for Debian 10 amd64 build:
|
Outdated results 🛑Basic BGPD CI results: FAILURE
For details, please contact louberger |
looks like I somewhere lost the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution to FRR!
Click for style suggestions
To apply these suggestions:
curl -s https://gist.githubusercontent.com/polychaeta/bfe639bc7b2041902f40bb843ac198ef/raw/597c12b4cbec05466bd780ffcee626a34a434525/cr_6135_1585829074.diff | git apply
diff --git a/babeld/babel_interface.c b/babeld/babel_interface.c
index 21fb48163..a810f94ac 100644
--- a/babeld/babel_interface.c
+++ b/babeld/babel_interface.c
@@ -60,11 +60,11 @@ static void babel_interface_free (babel_interface_nfo *bi);
static vector babel_enable_if; /* enable interfaces (by cmd). */
static int interface_config_write(struct vty *vty);
static struct cmd_node babel_interface_node = {
- .name = "interface",
- .node = INTERFACE_NODE,
- .parent_node = CONFIG_NODE,
- .prompt = "%s(config-if)# ",
- .config_write = interface_config_write,
+ .name = "interface",
+ .node = INTERFACE_NODE,
+ .parent_node = CONFIG_NODE,
+ .prompt = "%s(config-if)# ",
+ .config_write = interface_config_write,
};
diff --git a/babeld/babeld.c b/babeld/babeld.c
index 906f48564..1cd6c2de8 100644
--- a/babeld/babeld.c
+++ b/babeld/babeld.c
@@ -69,14 +69,13 @@ static time_t expiry_time;
static time_t source_expiry_time;
/* Babel node structure. */
-static int babel_config_write (struct vty *vty);
-static struct cmd_node cmd_babel_node =
-{
- .name = "babel",
- .node = BABEL_NODE,
- .parent_node = CONFIG_NODE,
- .prompt = "%s(config-router)# ",
- .config_write = babel_config_write,
+static int babel_config_write(struct vty *vty);
+static struct cmd_node cmd_babel_node = {
+ .name = "babel",
+ .node = BABEL_NODE,
+ .parent_node = CONFIG_NODE,
+ .prompt = "%s(config-router)# ",
+ .config_write = babel_config_write,
};
/* print current babel configuration on vty */
@@ -722,32 +721,32 @@ void
babeld_quagga_init(void)
{
- install_node(&cmd_babel_node);
+ install_node(&cmd_babel_node);
- install_element(CONFIG_NODE, &router_babel_cmd);
- install_element(CONFIG_NODE, &no_router_babel_cmd);
+ install_element(CONFIG_NODE, &router_babel_cmd);
+ install_element(CONFIG_NODE, &no_router_babel_cmd);
- install_default(BABEL_NODE);
- install_element(BABEL_NODE, &babel_diversity_cmd);
- install_element(BABEL_NODE, &no_babel_diversity_cmd);
- install_element(BABEL_NODE, &babel_diversity_factor_cmd);
- install_element(BABEL_NODE, &babel_set_resend_delay_cmd);
- install_element(BABEL_NODE, &babel_set_smoothing_half_life_cmd);
+ install_default(BABEL_NODE);
+ install_element(BABEL_NODE, &babel_diversity_cmd);
+ install_element(BABEL_NODE, &no_babel_diversity_cmd);
+ install_element(BABEL_NODE, &babel_diversity_factor_cmd);
+ install_element(BABEL_NODE, &babel_set_resend_delay_cmd);
+ install_element(BABEL_NODE, &babel_set_smoothing_half_life_cmd);
- babel_if_init();
+ babel_if_init();
- /* Access list install. */
- access_list_init ();
- access_list_add_hook (babel_distribute_update_all_wrapper);
- access_list_delete_hook (babel_distribute_update_all_wrapper);
+ /* Access list install. */
+ access_list_init();
+ access_list_add_hook(babel_distribute_update_all_wrapper);
+ access_list_delete_hook(babel_distribute_update_all_wrapper);
- /* Prefix list initialize.*/
- prefix_list_init ();
- prefix_list_add_hook (babel_distribute_update_all);
- prefix_list_delete_hook (babel_distribute_update_all);
+ /* Prefix list initialize.*/
+ prefix_list_init();
+ prefix_list_add_hook(babel_distribute_update_all);
+ prefix_list_delete_hook(babel_distribute_update_all);
- /* Distribute list install. */
- distribute_list_init(BABEL_NODE);
+ /* Distribute list install. */
+ distribute_list_init(BABEL_NODE);
}
/* Stubs to adapt Babel's filtering calls to Quagga's infrastructure. */
diff --git a/bgpd/bgp_bmp.c b/bgpd/bgp_bmp.c
index 8902a8789..f502c34f7 100644
--- a/bgpd/bgp_bmp.c
+++ b/bgpd/bgp_bmp.c
@@ -1772,12 +1772,10 @@ static void bmp_active_setup(struct bmp_active *ba)
}
}
-static struct cmd_node bmp_node = {
- .name = "bmp",
- .node = BMP_NODE,
- .parent_node = BGP_NODE,
- .prompt = "%s(config-bgp-bmp)# "
-};
+static struct cmd_node bmp_node = {.name = "bmp",
+ .node = BMP_NODE,
+ .parent_node = BGP_NODE,
+ .prompt = "%s(config-bgp-bmp)# "};
#define BMP_STR "BGP Monitoring Protocol\n"
diff --git a/lib/command.c b/lib/command.c
index b5869d7cb..38525b4c5 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -2668,8 +2668,8 @@ DEFUN(find,
cli = vector_slot(clis, j);
if (regexec(&exp, cli->string, 0, NULL, 0) == 0)
- vty_out(vty, " (%s) %s\n",
- node->name, cli->string);
+ vty_out(vty, " (%s) %s\n", node->name,
+ cli->string);
}
}
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
index c3fefcd33..f82c63825 100644
--- a/vtysh/vtysh.c
+++ b/vtysh/vtysh.c
@@ -1361,12 +1361,10 @@ static struct cmd_node bgp_vnc_l2_group_node = {
.prompt = "%s(config-router-vnc-l2-group)# ",
};
-static struct cmd_node bmp_node = {
- .name = "bmp",
- .node = BMP_NODE,
- .parent_node = BGP_NODE,
- .prompt = "%s(config-bgp-bmp)# "
-};
+static struct cmd_node bmp_node = {.name = "bmp",
+ .node = BMP_NODE,
+ .parent_node = BGP_NODE,
+ .prompt = "%s(config-bgp-bmp)# "};
static struct cmd_node ospf_node = {
.name = "ospf",
@@ -3548,8 +3546,8 @@ DEFUN(find,
cli = vector_slot(clis, j);
if (regexec(&exp, cli->string, 0, NULL, 0) == 0)
- vty_out(vty, " (%s) %s\n",
- node->name, cli->string);
+ vty_out(vty, " (%s) %s\n", node->name,
+ cli->string);
}
}
If you are a new contributor to FRR, please see our contributing guidelines.
This comment has been minimized.
This comment has been minimized.
6120c5b
to
bfec662
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution to FRR!
Click for style suggestions
To apply these suggestions:
curl -s https://gist.githubusercontent.com/polychaeta/95b40fdd1877a192f831c78972a9ccd8/raw/76f7d1aefc5d0d79bb1395ad41d84c9a4cdf101b/cr_6135_1585831357.diff | git apply
diff --git a/babeld/babel_interface.c b/babeld/babel_interface.c
index 21fb48163..a810f94ac 100644
--- a/babeld/babel_interface.c
+++ b/babeld/babel_interface.c
@@ -60,11 +60,11 @@ static void babel_interface_free (babel_interface_nfo *bi);
static vector babel_enable_if; /* enable interfaces (by cmd). */
static int interface_config_write(struct vty *vty);
static struct cmd_node babel_interface_node = {
- .name = "interface",
- .node = INTERFACE_NODE,
- .parent_node = CONFIG_NODE,
- .prompt = "%s(config-if)# ",
- .config_write = interface_config_write,
+ .name = "interface",
+ .node = INTERFACE_NODE,
+ .parent_node = CONFIG_NODE,
+ .prompt = "%s(config-if)# ",
+ .config_write = interface_config_write,
};
diff --git a/babeld/babeld.c b/babeld/babeld.c
index 906f48564..1cd6c2de8 100644
--- a/babeld/babeld.c
+++ b/babeld/babeld.c
@@ -69,14 +69,13 @@ static time_t expiry_time;
static time_t source_expiry_time;
/* Babel node structure. */
-static int babel_config_write (struct vty *vty);
-static struct cmd_node cmd_babel_node =
-{
- .name = "babel",
- .node = BABEL_NODE,
- .parent_node = CONFIG_NODE,
- .prompt = "%s(config-router)# ",
- .config_write = babel_config_write,
+static int babel_config_write(struct vty *vty);
+static struct cmd_node cmd_babel_node = {
+ .name = "babel",
+ .node = BABEL_NODE,
+ .parent_node = CONFIG_NODE,
+ .prompt = "%s(config-router)# ",
+ .config_write = babel_config_write,
};
/* print current babel configuration on vty */
@@ -722,32 +721,32 @@ void
babeld_quagga_init(void)
{
- install_node(&cmd_babel_node);
+ install_node(&cmd_babel_node);
- install_element(CONFIG_NODE, &router_babel_cmd);
- install_element(CONFIG_NODE, &no_router_babel_cmd);
+ install_element(CONFIG_NODE, &router_babel_cmd);
+ install_element(CONFIG_NODE, &no_router_babel_cmd);
- install_default(BABEL_NODE);
- install_element(BABEL_NODE, &babel_diversity_cmd);
- install_element(BABEL_NODE, &no_babel_diversity_cmd);
- install_element(BABEL_NODE, &babel_diversity_factor_cmd);
- install_element(BABEL_NODE, &babel_set_resend_delay_cmd);
- install_element(BABEL_NODE, &babel_set_smoothing_half_life_cmd);
+ install_default(BABEL_NODE);
+ install_element(BABEL_NODE, &babel_diversity_cmd);
+ install_element(BABEL_NODE, &no_babel_diversity_cmd);
+ install_element(BABEL_NODE, &babel_diversity_factor_cmd);
+ install_element(BABEL_NODE, &babel_set_resend_delay_cmd);
+ install_element(BABEL_NODE, &babel_set_smoothing_half_life_cmd);
- babel_if_init();
+ babel_if_init();
- /* Access list install. */
- access_list_init ();
- access_list_add_hook (babel_distribute_update_all_wrapper);
- access_list_delete_hook (babel_distribute_update_all_wrapper);
+ /* Access list install. */
+ access_list_init();
+ access_list_add_hook(babel_distribute_update_all_wrapper);
+ access_list_delete_hook(babel_distribute_update_all_wrapper);
- /* Prefix list initialize.*/
- prefix_list_init ();
- prefix_list_add_hook (babel_distribute_update_all);
- prefix_list_delete_hook (babel_distribute_update_all);
+ /* Prefix list initialize.*/
+ prefix_list_init();
+ prefix_list_add_hook(babel_distribute_update_all);
+ prefix_list_delete_hook(babel_distribute_update_all);
- /* Distribute list install. */
- distribute_list_init(BABEL_NODE);
+ /* Distribute list install. */
+ distribute_list_init(BABEL_NODE);
}
/* Stubs to adapt Babel's filtering calls to Quagga's infrastructure. */
diff --git a/bgpd/bgp_bmp.c b/bgpd/bgp_bmp.c
index 8902a8789..f502c34f7 100644
--- a/bgpd/bgp_bmp.c
+++ b/bgpd/bgp_bmp.c
@@ -1772,12 +1772,10 @@ static void bmp_active_setup(struct bmp_active *ba)
}
}
-static struct cmd_node bmp_node = {
- .name = "bmp",
- .node = BMP_NODE,
- .parent_node = BGP_NODE,
- .prompt = "%s(config-bgp-bmp)# "
-};
+static struct cmd_node bmp_node = {.name = "bmp",
+ .node = BMP_NODE,
+ .parent_node = BGP_NODE,
+ .prompt = "%s(config-bgp-bmp)# "};
#define BMP_STR "BGP Monitoring Protocol\n"
diff --git a/lib/command.c b/lib/command.c
index be209e6bc..d5bc43a4b 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -2669,8 +2669,8 @@ DEFUN(find,
cli = vector_slot(clis, j);
if (regexec(&exp, cli->string, 0, NULL, 0) == 0)
- vty_out(vty, " (%s) %s\n",
- node->name, cli->string);
+ vty_out(vty, " (%s) %s\n", node->name,
+ cli->string);
}
}
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
index 71b991928..582ed7d13 100644
--- a/vtysh/vtysh.c
+++ b/vtysh/vtysh.c
@@ -1361,12 +1361,10 @@ static struct cmd_node bgp_vnc_l2_group_node = {
.prompt = "%s(config-router-vnc-l2-group)# ",
};
-static struct cmd_node bmp_node = {
- .name = "bmp",
- .node = BMP_NODE,
- .parent_node = BGP_NODE,
- .prompt = "%s(config-bgp-bmp)# "
-};
+static struct cmd_node bmp_node = {.name = "bmp",
+ .node = BMP_NODE,
+ .parent_node = BGP_NODE,
+ .prompt = "%s(config-bgp-bmp)# "};
static struct cmd_node ospf_node = {
.name = "ospf",
@@ -3614,8 +3612,8 @@ DEFUN(find,
cli = vector_slot(clis, j);
if (regexec(&exp, cli->string, 0, NULL, 0) == 0)
- vty_out(vty, " (%s) %s\n",
- node->name, cli->string);
+ vty_out(vty, " (%s) %s\n", node->name,
+ cli->string);
}
}
If you are a new contributor to FRR, please see our contributing guidelines.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great idea :)
I like how the code is more modular and better organized this way. I hope the CI errors aren't hard to resolve.
.name = "ldp", | ||
.node = LDP_NODE, | ||
.parent_node = CONFIG_NODE, | ||
.prompt = "%s(config-ldp)# ", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing .config_write = ldp_config_write
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed, Thanks :)
bfec662
to
8d529ae
Compare
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution to FRR!
Click for style suggestions
To apply these suggestions:
curl -s https://gist.githubusercontent.com/polychaeta/47d6f7f74e2a9b6f2eda6b8bde87ba3c/raw/26a57edb6e4c3eaf21adaef4d2f01fb9d460c056/cr_6135_1586944723.diff | git apply
diff --git a/bgpd/bgp_bmp.c b/bgpd/bgp_bmp.c
index 8902a8789..f502c34f7 100644
--- a/bgpd/bgp_bmp.c
+++ b/bgpd/bgp_bmp.c
@@ -1772,12 +1772,10 @@ static void bmp_active_setup(struct bmp_active *ba)
}
}
-static struct cmd_node bmp_node = {
- .name = "bmp",
- .node = BMP_NODE,
- .parent_node = BGP_NODE,
- .prompt = "%s(config-bgp-bmp)# "
-};
+static struct cmd_node bmp_node = {.name = "bmp",
+ .node = BMP_NODE,
+ .parent_node = BGP_NODE,
+ .prompt = "%s(config-bgp-bmp)# "};
#define BMP_STR "BGP Monitoring Protocol\n"
diff --git a/lib/command.c b/lib/command.c
index b5869d7cb..38525b4c5 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -2668,8 +2668,8 @@ DEFUN(find,
cli = vector_slot(clis, j);
if (regexec(&exp, cli->string, 0, NULL, 0) == 0)
- vty_out(vty, " (%s) %s\n",
- node->name, cli->string);
+ vty_out(vty, " (%s) %s\n", node->name,
+ cli->string);
}
}
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
index 89ffa43a7..7601496b1 100644
--- a/vtysh/vtysh.c
+++ b/vtysh/vtysh.c
@@ -1361,12 +1361,10 @@ static struct cmd_node bgp_vnc_l2_group_node = {
.prompt = "%s(config-router-vnc-l2-group)# ",
};
-static struct cmd_node bmp_node = {
- .name = "bmp",
- .node = BMP_NODE,
- .parent_node = BGP_NODE,
- .prompt = "%s(config-bgp-bmp)# "
-};
+static struct cmd_node bmp_node = {.name = "bmp",
+ .node = BMP_NODE,
+ .parent_node = BGP_NODE,
+ .prompt = "%s(config-bgp-bmp)# "};
static struct cmd_node ospf_node = {
.name = "ospf",
@@ -3547,8 +3545,8 @@ DEFUN(find,
cli = vector_slot(clis, j);
if (regexec(&exp, cli->string, 0, NULL, 0) == 0)
- vty_out(vty, " (%s) %s\n",
- node->name, cli->string);
+ vty_out(vty, " (%s) %s\n", node->name,
+ cli->string);
}
}
If you are a new contributor to FRR, please see our contributing guidelines.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
ed553c3
to
b715007
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution to FRR!
Click for style suggestions
To apply these suggestions:
curl -s https://gist.githubusercontent.com/polychaeta/a9eb8375811d6fa6e9981fa2aa7b251c/raw/98a6aa7c7612f98492d8bf39d178dbe338c8d4c9/cr_6135_1586946408.diff | git apply
diff --git a/bgpd/bgp_bmp.c b/bgpd/bgp_bmp.c
index 8902a8789..f502c34f7 100644
--- a/bgpd/bgp_bmp.c
+++ b/bgpd/bgp_bmp.c
@@ -1772,12 +1772,10 @@ static void bmp_active_setup(struct bmp_active *ba)
}
}
-static struct cmd_node bmp_node = {
- .name = "bmp",
- .node = BMP_NODE,
- .parent_node = BGP_NODE,
- .prompt = "%s(config-bgp-bmp)# "
-};
+static struct cmd_node bmp_node = {.name = "bmp",
+ .node = BMP_NODE,
+ .parent_node = BGP_NODE,
+ .prompt = "%s(config-bgp-bmp)# "};
#define BMP_STR "BGP Monitoring Protocol\n"
diff --git a/lib/command.c b/lib/command.c
index b5869d7cb..38525b4c5 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -2668,8 +2668,8 @@ DEFUN(find,
cli = vector_slot(clis, j);
if (regexec(&exp, cli->string, 0, NULL, 0) == 0)
- vty_out(vty, " (%s) %s\n",
- node->name, cli->string);
+ vty_out(vty, " (%s) %s\n", node->name,
+ cli->string);
}
}
diff --git a/lib/command.h b/lib/command.h
index 5047ec838..1a8a7f51b 100644
--- a/lib/command.h
+++ b/lib/command.h
@@ -84,84 +84,84 @@ struct host {
/* List of CLI nodes. Please remember to update the name array in command.c. */
enum node_type {
- AUTH_NODE, /* Authentication mode of vty interface. */
- VIEW_NODE, /* View node. Default mode of vty interface. */
- AUTH_ENABLE_NODE, /* Authentication mode for change enable. */
- ENABLE_NODE, /* Enable node. */
- CONFIG_NODE, /* Config node. Default mode of config file. */
- DEBUG_NODE, /* Debug node. */
- VRF_DEBUG_NODE, /* Vrf Debug node. */
- NORTHBOUND_DEBUG_NODE, /* Northbound Debug node. */
- DEBUG_VNC_NODE, /* Debug VNC node. */
- RMAP_DEBUG_NODE, /* Route-map debug node */
- RESOLVER_DEBUG_NODE, /* Resolver debug node */
- AAA_NODE, /* AAA node. */
- KEYCHAIN_NODE, /* Key-chain node. */
- KEYCHAIN_KEY_NODE, /* Key-chain key node. */
- IP_NODE, /* Static ip route node. */
- VRF_NODE, /* VRF mode node. */
- INTERFACE_NODE, /* Interface mode node. */
- NH_GROUP_NODE, /* Nexthop-Group mode node. */
- ZEBRA_NODE, /* zebra connection node. */
- TABLE_NODE, /* rtm_table selection node. */
- RIP_NODE, /* RIP protocol mode node. */
- RIPNG_NODE, /* RIPng protocol mode node. */
- BABEL_NODE, /* BABEL protocol mode node. */
- EIGRP_NODE, /* EIGRP protocol mode node. */
- BGP_NODE, /* BGP protocol mode which includes BGP4+ */
- BGP_VPNV4_NODE, /* BGP MPLS-VPN PE exchange. */
- BGP_VPNV6_NODE, /* BGP MPLS-VPN PE exchange. */
- BGP_IPV4_NODE, /* BGP IPv4 unicast address family. */
- BGP_IPV4M_NODE, /* BGP IPv4 multicast address family. */
- BGP_IPV4L_NODE, /* BGP IPv4 labeled unicast address family. */
- BGP_IPV6_NODE, /* BGP IPv6 address family */
- BGP_IPV6M_NODE, /* BGP IPv6 multicast address family. */
- BGP_IPV6L_NODE, /* BGP IPv6 labeled unicast address family. */
- BGP_VRF_POLICY_NODE, /* BGP VRF policy */
- BGP_VNC_DEFAULTS_NODE, /* BGP VNC nve defaults */
- BGP_VNC_NVE_GROUP_NODE, /* BGP VNC nve group */
- BGP_VNC_L2_GROUP_NODE, /* BGP VNC L2 group */
- RFP_DEFAULTS_NODE, /* RFP defaults node */
- BGP_EVPN_NODE, /* BGP EVPN node. */
- OSPF_NODE, /* OSPF protocol mode */
- OSPF6_NODE, /* OSPF protocol for IPv6 mode */
- LDP_NODE, /* LDP protocol mode */
- LDP_IPV4_NODE, /* LDP IPv4 address family */
- LDP_IPV6_NODE, /* LDP IPv6 address family */
- LDP_IPV4_IFACE_NODE, /* LDP IPv4 Interface */
- LDP_IPV6_IFACE_NODE, /* LDP IPv6 Interface */
- LDP_L2VPN_NODE, /* LDP L2VPN node */
- LDP_PSEUDOWIRE_NODE, /* LDP Pseudowire node */
- ISIS_NODE, /* ISIS protocol mode */
- ACCESS_NODE, /* Access list node. */
- PREFIX_NODE, /* Prefix list node. */
- ACCESS_IPV6_NODE, /* Access list node. */
- ACCESS_MAC_NODE, /* MAC access list node*/
- PREFIX_IPV6_NODE, /* Prefix list node. */
- AS_LIST_NODE, /* AS list node. */
- COMMUNITY_LIST_NODE, /* Community list node. */
- RMAP_NODE, /* Route map node. */
- PBRMAP_NODE, /* PBR map node. */
- SMUX_NODE, /* SNMP configuration node. */
- DUMP_NODE, /* Packet dump node. */
- FORWARDING_NODE, /* IP forwarding node. */
- PROTOCOL_NODE, /* protocol filtering node */
- MPLS_NODE, /* MPLS config node */
- PW_NODE, /* Pseudowire config node */
- VTY_NODE, /* Vty node. */
- FPM_NODE, /* Dataplane FPM node. */
- LINK_PARAMS_NODE, /* Link-parameters node */
- BGP_EVPN_VNI_NODE, /* BGP EVPN VNI */
- RPKI_NODE, /* RPKI node for configuration of RPKI cache server
- connections.*/
- BGP_FLOWSPECV4_NODE, /* BGP IPv4 FLOWSPEC Address-Family */
- BGP_FLOWSPECV6_NODE, /* BGP IPv6 FLOWSPEC Address-Family */
- BFD_NODE, /* BFD protocol mode. */
- BFD_PEER_NODE, /* BFD peer configuration mode. */
- OPENFABRIC_NODE, /* OpenFabric router configuration node */
- VRRP_NODE, /* VRRP node */
- BMP_NODE, /* BMP config under router bgp */
- NODE_TYPE_MAX, /* maximum */
+ AUTH_NODE, /* Authentication mode of vty interface. */
+ VIEW_NODE, /* View node. Default mode of vty interface. */
+ AUTH_ENABLE_NODE, /* Authentication mode for change enable. */
+ ENABLE_NODE, /* Enable node. */
+ CONFIG_NODE, /* Config node. Default mode of config file. */
+ DEBUG_NODE, /* Debug node. */
+ VRF_DEBUG_NODE, /* Vrf Debug node. */
+ NORTHBOUND_DEBUG_NODE, /* Northbound Debug node. */
+ DEBUG_VNC_NODE, /* Debug VNC node. */
+ RMAP_DEBUG_NODE, /* Route-map debug node */
+ RESOLVER_DEBUG_NODE, /* Resolver debug node */
+ AAA_NODE, /* AAA node. */
+ KEYCHAIN_NODE, /* Key-chain node. */
+ KEYCHAIN_KEY_NODE, /* Key-chain key node. */
+ IP_NODE, /* Static ip route node. */
+ VRF_NODE, /* VRF mode node. */
+ INTERFACE_NODE, /* Interface mode node. */
+ NH_GROUP_NODE, /* Nexthop-Group mode node. */
+ ZEBRA_NODE, /* zebra connection node. */
+ TABLE_NODE, /* rtm_table selection node. */
+ RIP_NODE, /* RIP protocol mode node. */
+ RIPNG_NODE, /* RIPng protocol mode node. */
+ BABEL_NODE, /* BABEL protocol mode node. */
+ EIGRP_NODE, /* EIGRP protocol mode node. */
+ BGP_NODE, /* BGP protocol mode which includes BGP4+ */
+ BGP_VPNV4_NODE, /* BGP MPLS-VPN PE exchange. */
+ BGP_VPNV6_NODE, /* BGP MPLS-VPN PE exchange. */
+ BGP_IPV4_NODE, /* BGP IPv4 unicast address family. */
+ BGP_IPV4M_NODE, /* BGP IPv4 multicast address family. */
+ BGP_IPV4L_NODE, /* BGP IPv4 labeled unicast address family. */
+ BGP_IPV6_NODE, /* BGP IPv6 address family */
+ BGP_IPV6M_NODE, /* BGP IPv6 multicast address family. */
+ BGP_IPV6L_NODE, /* BGP IPv6 labeled unicast address family. */
+ BGP_VRF_POLICY_NODE, /* BGP VRF policy */
+ BGP_VNC_DEFAULTS_NODE, /* BGP VNC nve defaults */
+ BGP_VNC_NVE_GROUP_NODE, /* BGP VNC nve group */
+ BGP_VNC_L2_GROUP_NODE, /* BGP VNC L2 group */
+ RFP_DEFAULTS_NODE, /* RFP defaults node */
+ BGP_EVPN_NODE, /* BGP EVPN node. */
+ OSPF_NODE, /* OSPF protocol mode */
+ OSPF6_NODE, /* OSPF protocol for IPv6 mode */
+ LDP_NODE, /* LDP protocol mode */
+ LDP_IPV4_NODE, /* LDP IPv4 address family */
+ LDP_IPV6_NODE, /* LDP IPv6 address family */
+ LDP_IPV4_IFACE_NODE, /* LDP IPv4 Interface */
+ LDP_IPV6_IFACE_NODE, /* LDP IPv6 Interface */
+ LDP_L2VPN_NODE, /* LDP L2VPN node */
+ LDP_PSEUDOWIRE_NODE, /* LDP Pseudowire node */
+ ISIS_NODE, /* ISIS protocol mode */
+ ACCESS_NODE, /* Access list node. */
+ PREFIX_NODE, /* Prefix list node. */
+ ACCESS_IPV6_NODE, /* Access list node. */
+ ACCESS_MAC_NODE, /* MAC access list node*/
+ PREFIX_IPV6_NODE, /* Prefix list node. */
+ AS_LIST_NODE, /* AS list node. */
+ COMMUNITY_LIST_NODE, /* Community list node. */
+ RMAP_NODE, /* Route map node. */
+ PBRMAP_NODE, /* PBR map node. */
+ SMUX_NODE, /* SNMP configuration node. */
+ DUMP_NODE, /* Packet dump node. */
+ FORWARDING_NODE, /* IP forwarding node. */
+ PROTOCOL_NODE, /* protocol filtering node */
+ MPLS_NODE, /* MPLS config node */
+ PW_NODE, /* Pseudowire config node */
+ VTY_NODE, /* Vty node. */
+ FPM_NODE, /* Dataplane FPM node. */
+ LINK_PARAMS_NODE, /* Link-parameters node */
+ BGP_EVPN_VNI_NODE, /* BGP EVPN VNI */
+ RPKI_NODE, /* RPKI node for configuration of RPKI cache server
+ connections.*/
+ BGP_FLOWSPECV4_NODE, /* BGP IPv4 FLOWSPEC Address-Family */
+ BGP_FLOWSPECV6_NODE, /* BGP IPv6 FLOWSPEC Address-Family */
+ BFD_NODE, /* BFD protocol mode. */
+ BFD_PEER_NODE, /* BFD peer configuration mode. */
+ OPENFABRIC_NODE, /* OpenFabric router configuration node */
+ VRRP_NODE, /* VRRP node */
+ BMP_NODE, /* BMP config under router bgp */
+ NODE_TYPE_MAX, /* maximum */
};
extern vector cmdvec;
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
index 89ffa43a7..7601496b1 100644
--- a/vtysh/vtysh.c
+++ b/vtysh/vtysh.c
@@ -1361,12 +1361,10 @@ static struct cmd_node bgp_vnc_l2_group_node = {
.prompt = "%s(config-router-vnc-l2-group)# ",
};
-static struct cmd_node bmp_node = {
- .name = "bmp",
- .node = BMP_NODE,
- .parent_node = BGP_NODE,
- .prompt = "%s(config-bgp-bmp)# "
-};
+static struct cmd_node bmp_node = {.name = "bmp",
+ .node = BMP_NODE,
+ .parent_node = BGP_NODE,
+ .prompt = "%s(config-bgp-bmp)# "};
static struct cmd_node ospf_node = {
.name = "ospf",
@@ -3547,8 +3545,8 @@ DEFUN(find,
cli = vector_slot(clis, j);
if (regexec(&exp, cli->string, 0, NULL, 0) == 0)
- vty_out(vty, " (%s) %s\n",
- node->name, cli->string);
+ vty_out(vty, " (%s) %s\n", node->name,
+ cli->string);
}
}
If you are a new contributor to FRR, please see our contributing guidelines.
This comment has been minimized.
This comment has been minimized.
b715007
to
0e6f553
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution to FRR!
Click for style suggestions
To apply these suggestions:
curl -s https://gist.githubusercontent.com/polychaeta/e7f56881ce9a8e5c5a590decdf83755a/raw/144f54f4c9633485b176a3cadf7191bd9cecd150/cr_6135_1586950676.diff | git apply
diff --git a/bgpd/bgp_bmp.c b/bgpd/bgp_bmp.c
index 8902a8789..f502c34f7 100644
--- a/bgpd/bgp_bmp.c
+++ b/bgpd/bgp_bmp.c
@@ -1772,12 +1772,10 @@ static void bmp_active_setup(struct bmp_active *ba)
}
}
-static struct cmd_node bmp_node = {
- .name = "bmp",
- .node = BMP_NODE,
- .parent_node = BGP_NODE,
- .prompt = "%s(config-bgp-bmp)# "
-};
+static struct cmd_node bmp_node = {.name = "bmp",
+ .node = BMP_NODE,
+ .parent_node = BGP_NODE,
+ .prompt = "%s(config-bgp-bmp)# "};
#define BMP_STR "BGP Monitoring Protocol\n"
diff --git a/lib/command.c b/lib/command.c
index 124b06ea8..ba1940700 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -2671,8 +2671,8 @@ DEFUN(find,
cli = vector_slot(clis, j);
if (regexec(&exp, cli->string, 0, NULL, 0) == 0)
- vty_out(vty, " (%s) %s\n",
- node->name, cli->string);
+ vty_out(vty, " (%s) %s\n", node->name,
+ cli->string);
}
}
diff --git a/lib/command.h b/lib/command.h
index e7c9ff4c5..b0a414181 100644
--- a/lib/command.h
+++ b/lib/command.h
@@ -84,84 +84,84 @@ struct host {
/* List of CLI nodes. Please remember to update the name array in command.c. */
enum node_type {
- AUTH_NODE, /* Authentication mode of vty interface. */
- VIEW_NODE, /* View node. Default mode of vty interface. */
- AUTH_ENABLE_NODE, /* Authentication mode for change enable. */
- ENABLE_NODE, /* Enable node. */
- CONFIG_NODE, /* Config node. Default mode of config file. */
- DEBUG_NODE, /* Debug node. */
- VRF_DEBUG_NODE, /* Vrf Debug node. */
- NORTHBOUND_DEBUG_NODE, /* Northbound Debug node. */
- DEBUG_VNC_NODE, /* Debug VNC node. */
- RMAP_DEBUG_NODE, /* Route-map debug node */
- RESOLVER_DEBUG_NODE, /* Resolver debug node */
- AAA_NODE, /* AAA node. */
- KEYCHAIN_NODE, /* Key-chain node. */
- KEYCHAIN_KEY_NODE, /* Key-chain key node. */
- IP_NODE, /* Static ip route node. */
- VRF_NODE, /* VRF mode node. */
- INTERFACE_NODE, /* Interface mode node. */
- NH_GROUP_NODE, /* Nexthop-Group mode node. */
- ZEBRA_NODE, /* zebra connection node. */
- TABLE_NODE, /* rtm_table selection node. */
- RIP_NODE, /* RIP protocol mode node. */
- RIPNG_NODE, /* RIPng protocol mode node. */
- BABEL_NODE, /* BABEL protocol mode node. */
- EIGRP_NODE, /* EIGRP protocol mode node. */
- BGP_NODE, /* BGP protocol mode which includes BGP4+ */
- BGP_VPNV4_NODE, /* BGP MPLS-VPN PE exchange. */
- BGP_VPNV6_NODE, /* BGP MPLS-VPN PE exchange. */
- BGP_IPV4_NODE, /* BGP IPv4 unicast address family. */
- BGP_IPV4M_NODE, /* BGP IPv4 multicast address family. */
- BGP_IPV4L_NODE, /* BGP IPv4 labeled unicast address family. */
- BGP_IPV6_NODE, /* BGP IPv6 address family */
- BGP_IPV6M_NODE, /* BGP IPv6 multicast address family. */
- BGP_IPV6L_NODE, /* BGP IPv6 labeled unicast address family. */
- BGP_VRF_POLICY_NODE, /* BGP VRF policy */
- BGP_VNC_DEFAULTS_NODE, /* BGP VNC nve defaults */
- BGP_VNC_NVE_GROUP_NODE, /* BGP VNC nve group */
- BGP_VNC_L2_GROUP_NODE, /* BGP VNC L2 group */
- RFP_DEFAULTS_NODE, /* RFP defaults node */
- BGP_EVPN_NODE, /* BGP EVPN node. */
- OSPF_NODE, /* OSPF protocol mode */
- OSPF6_NODE, /* OSPF protocol for IPv6 mode */
- LDP_NODE, /* LDP protocol mode */
- LDP_IPV4_NODE, /* LDP IPv4 address family */
- LDP_IPV6_NODE, /* LDP IPv6 address family */
- LDP_IPV4_IFACE_NODE, /* LDP IPv4 Interface */
- LDP_IPV6_IFACE_NODE, /* LDP IPv6 Interface */
- LDP_L2VPN_NODE, /* LDP L2VPN node */
- LDP_PSEUDOWIRE_NODE, /* LDP Pseudowire node */
- ISIS_NODE, /* ISIS protocol mode */
- ACCESS_NODE, /* Access list node. */
- PREFIX_NODE, /* Prefix list node. */
- ACCESS_IPV6_NODE, /* Access list node. */
- ACCESS_MAC_NODE, /* MAC access list node*/
- PREFIX_IPV6_NODE, /* Prefix list node. */
- AS_LIST_NODE, /* AS list node. */
- COMMUNITY_LIST_NODE, /* Community list node. */
- RMAP_NODE, /* Route map node. */
- PBRMAP_NODE, /* PBR map node. */
- SMUX_NODE, /* SNMP configuration node. */
- DUMP_NODE, /* Packet dump node. */
- FORWARDING_NODE, /* IP forwarding node. */
- PROTOCOL_NODE, /* protocol filtering node */
- MPLS_NODE, /* MPLS config node */
- PW_NODE, /* Pseudowire config node */
- VTY_NODE, /* Vty node. */
- FPM_NODE, /* Dataplane FPM node. */
- LINK_PARAMS_NODE, /* Link-parameters node */
- BGP_EVPN_VNI_NODE, /* BGP EVPN VNI */
- RPKI_NODE, /* RPKI node for configuration of RPKI cache server
- connections.*/
- BGP_FLOWSPECV4_NODE, /* BGP IPv4 FLOWSPEC Address-Family */
- BGP_FLOWSPECV6_NODE, /* BGP IPv6 FLOWSPEC Address-Family */
- BFD_NODE, /* BFD protocol mode. */
- BFD_PEER_NODE, /* BFD peer configuration mode. */
- OPENFABRIC_NODE, /* OpenFabric router configuration node */
- VRRP_NODE, /* VRRP node */
- BMP_NODE, /* BMP config under router bgp */
- NODE_TYPE_MAX, /* maximum */
+ AUTH_NODE, /* Authentication mode of vty interface. */
+ VIEW_NODE, /* View node. Default mode of vty interface. */
+ AUTH_ENABLE_NODE, /* Authentication mode for change enable. */
+ ENABLE_NODE, /* Enable node. */
+ CONFIG_NODE, /* Config node. Default mode of config file. */
+ DEBUG_NODE, /* Debug node. */
+ VRF_DEBUG_NODE, /* Vrf Debug node. */
+ NORTHBOUND_DEBUG_NODE, /* Northbound Debug node. */
+ DEBUG_VNC_NODE, /* Debug VNC node. */
+ RMAP_DEBUG_NODE, /* Route-map debug node */
+ RESOLVER_DEBUG_NODE, /* Resolver debug node */
+ AAA_NODE, /* AAA node. */
+ KEYCHAIN_NODE, /* Key-chain node. */
+ KEYCHAIN_KEY_NODE, /* Key-chain key node. */
+ IP_NODE, /* Static ip route node. */
+ VRF_NODE, /* VRF mode node. */
+ INTERFACE_NODE, /* Interface mode node. */
+ NH_GROUP_NODE, /* Nexthop-Group mode node. */
+ ZEBRA_NODE, /* zebra connection node. */
+ TABLE_NODE, /* rtm_table selection node. */
+ RIP_NODE, /* RIP protocol mode node. */
+ RIPNG_NODE, /* RIPng protocol mode node. */
+ BABEL_NODE, /* BABEL protocol mode node. */
+ EIGRP_NODE, /* EIGRP protocol mode node. */
+ BGP_NODE, /* BGP protocol mode which includes BGP4+ */
+ BGP_VPNV4_NODE, /* BGP MPLS-VPN PE exchange. */
+ BGP_VPNV6_NODE, /* BGP MPLS-VPN PE exchange. */
+ BGP_IPV4_NODE, /* BGP IPv4 unicast address family. */
+ BGP_IPV4M_NODE, /* BGP IPv4 multicast address family. */
+ BGP_IPV4L_NODE, /* BGP IPv4 labeled unicast address family. */
+ BGP_IPV6_NODE, /* BGP IPv6 address family */
+ BGP_IPV6M_NODE, /* BGP IPv6 multicast address family. */
+ BGP_IPV6L_NODE, /* BGP IPv6 labeled unicast address family. */
+ BGP_VRF_POLICY_NODE, /* BGP VRF policy */
+ BGP_VNC_DEFAULTS_NODE, /* BGP VNC nve defaults */
+ BGP_VNC_NVE_GROUP_NODE, /* BGP VNC nve group */
+ BGP_VNC_L2_GROUP_NODE, /* BGP VNC L2 group */
+ RFP_DEFAULTS_NODE, /* RFP defaults node */
+ BGP_EVPN_NODE, /* BGP EVPN node. */
+ OSPF_NODE, /* OSPF protocol mode */
+ OSPF6_NODE, /* OSPF protocol for IPv6 mode */
+ LDP_NODE, /* LDP protocol mode */
+ LDP_IPV4_NODE, /* LDP IPv4 address family */
+ LDP_IPV6_NODE, /* LDP IPv6 address family */
+ LDP_IPV4_IFACE_NODE, /* LDP IPv4 Interface */
+ LDP_IPV6_IFACE_NODE, /* LDP IPv6 Interface */
+ LDP_L2VPN_NODE, /* LDP L2VPN node */
+ LDP_PSEUDOWIRE_NODE, /* LDP Pseudowire node */
+ ISIS_NODE, /* ISIS protocol mode */
+ ACCESS_NODE, /* Access list node. */
+ PREFIX_NODE, /* Prefix list node. */
+ ACCESS_IPV6_NODE, /* Access list node. */
+ ACCESS_MAC_NODE, /* MAC access list node*/
+ PREFIX_IPV6_NODE, /* Prefix list node. */
+ AS_LIST_NODE, /* AS list node. */
+ COMMUNITY_LIST_NODE, /* Community list node. */
+ RMAP_NODE, /* Route map node. */
+ PBRMAP_NODE, /* PBR map node. */
+ SMUX_NODE, /* SNMP configuration node. */
+ DUMP_NODE, /* Packet dump node. */
+ FORWARDING_NODE, /* IP forwarding node. */
+ PROTOCOL_NODE, /* protocol filtering node */
+ MPLS_NODE, /* MPLS config node */
+ PW_NODE, /* Pseudowire config node */
+ VTY_NODE, /* Vty node. */
+ FPM_NODE, /* Dataplane FPM node. */
+ LINK_PARAMS_NODE, /* Link-parameters node */
+ BGP_EVPN_VNI_NODE, /* BGP EVPN VNI */
+ RPKI_NODE, /* RPKI node for configuration of RPKI cache server
+ connections.*/
+ BGP_FLOWSPECV4_NODE, /* BGP IPv4 FLOWSPEC Address-Family */
+ BGP_FLOWSPECV6_NODE, /* BGP IPv6 FLOWSPEC Address-Family */
+ BFD_NODE, /* BFD protocol mode. */
+ BFD_PEER_NODE, /* BFD peer configuration mode. */
+ OPENFABRIC_NODE, /* OpenFabric router configuration node */
+ VRRP_NODE, /* VRRP node */
+ BMP_NODE, /* BMP config under router bgp */
+ NODE_TYPE_MAX, /* maximum */
};
extern vector cmdvec;
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
index 89ffa43a7..7601496b1 100644
--- a/vtysh/vtysh.c
+++ b/vtysh/vtysh.c
@@ -1361,12 +1361,10 @@ static struct cmd_node bgp_vnc_l2_group_node = {
.prompt = "%s(config-router-vnc-l2-group)# ",
};
-static struct cmd_node bmp_node = {
- .name = "bmp",
- .node = BMP_NODE,
- .parent_node = BGP_NODE,
- .prompt = "%s(config-bgp-bmp)# "
-};
+static struct cmd_node bmp_node = {.name = "bmp",
+ .node = BMP_NODE,
+ .parent_node = BGP_NODE,
+ .prompt = "%s(config-bgp-bmp)# "};
static struct cmd_node ospf_node = {
.name = "ospf",
@@ -3547,8 +3545,8 @@ DEFUN(find,
cli = vector_slot(clis, j);
if (regexec(&exp, cli->string, 0, NULL, 0) == 0)
- vty_out(vty, " (%s) %s\n",
- node->name, cli->string);
+ vty_out(vty, " (%s) %s\n", node->name,
+ cli->string);
}
}
If you are a new contributor to FRR, please see our contributing guidelines.
Outdated results 🛑Basic BGPD CI results: FAILURE
For details, please contact louberger |
Continuous Integration Result: SUCCESSFULContinuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-11869/ This is a comment from an automated CI system. Warnings Generated during build:Checkout code: Successful with additional warnings
Warnings Generated during build:Debian 10 amd64 build: Successful with additional warningsDebian Package lintian failed for Debian 10 amd64 build:
CLANG Static Analyzer Summary
2 Static Analyzer issues remaining.See details at |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
... and use named assignments everywhere (so I can change the struct.) Signed-off-by: David Lamparter <equinox@diac24.net>
The only nodes that have this as 0 don't have a "->func" anyway, so the entire thing is really just pointless. Signed-off-by: David Lamparter <equinox@diac24.net>
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>
Same as before, instead of shoving this into a big central list we can just put the parent node in cmd_node. Signed-off-by: David Lamparter <equinox@diac24.net>
And again for the name. Why on earth would we centralize this, just so people can forget to update it? Signed-off-by: David Lamparter <equinox@diac24.net>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Rather than doing a f*gly hack for the RPKI code, let's do an on-exit hook in cmd_node. Also allows replacing some special-casing in the vty code. Signed-off-by: David Lamparter <equinox@diac24.net>
Cleaning up the whole mess of "exit" and "quit" commands that follows is left for a rainy day :( Signed-off-by: David Lamparter <equinox@diac24.net>
... requested by Lou. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
0e6f553
to
d1b221f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution to FRR!
Click for style suggestions
To apply these suggestions:
curl -s https://gist.githubusercontent.com/polychaeta/a08caca7729d58166b652763d2317eef/raw/ada014ad905568a96ca06cf30e69a7352bed6dec/cr_6135_1587034584.diff | git apply
diff --git a/bgpd/bgp_bmp.c b/bgpd/bgp_bmp.c
index 8902a8789..f502c34f7 100644
--- a/bgpd/bgp_bmp.c
+++ b/bgpd/bgp_bmp.c
@@ -1772,12 +1772,10 @@ static void bmp_active_setup(struct bmp_active *ba)
}
}
-static struct cmd_node bmp_node = {
- .name = "bmp",
- .node = BMP_NODE,
- .parent_node = BGP_NODE,
- .prompt = "%s(config-bgp-bmp)# "
-};
+static struct cmd_node bmp_node = {.name = "bmp",
+ .node = BMP_NODE,
+ .parent_node = BGP_NODE,
+ .prompt = "%s(config-bgp-bmp)# "};
#define BMP_STR "BGP Monitoring Protocol\n"
diff --git a/lib/command.c b/lib/command.c
index d51922dfa..19e27ec6c 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -2671,8 +2671,8 @@ DEFUN(find,
cli = vector_slot(clis, j);
if (regexec(&exp, cli->string, 0, NULL, 0) == 0)
- vty_out(vty, " (%s) %s\n",
- node->name, cli->string);
+ vty_out(vty, " (%s) %s\n", node->name,
+ cli->string);
}
}
diff --git a/lib/command.h b/lib/command.h
index 719ee9fba..b3b4e9a7d 100644
--- a/lib/command.h
+++ b/lib/command.h
@@ -84,84 +84,84 @@ struct host {
/* List of CLI nodes. Please remember to update the name array in command.c. */
enum node_type {
- AUTH_NODE, /* Authentication mode of vty interface. */
- VIEW_NODE, /* View node. Default mode of vty interface. */
- AUTH_ENABLE_NODE, /* Authentication mode for change enable. */
- ENABLE_NODE, /* Enable node. */
- CONFIG_NODE, /* Config node. Default mode of config file. */
- DEBUG_NODE, /* Debug node. */
- VRF_DEBUG_NODE, /* Vrf Debug node. */
- NORTHBOUND_DEBUG_NODE, /* Northbound Debug node. */
- DEBUG_VNC_NODE, /* Debug VNC node. */
- RMAP_DEBUG_NODE, /* Route-map debug node */
- RESOLVER_DEBUG_NODE, /* Resolver debug node */
- AAA_NODE, /* AAA node. */
- KEYCHAIN_NODE, /* Key-chain node. */
- KEYCHAIN_KEY_NODE, /* Key-chain key node. */
- IP_NODE, /* Static ip route node. */
- VRF_NODE, /* VRF mode node. */
- INTERFACE_NODE, /* Interface mode node. */
- NH_GROUP_NODE, /* Nexthop-Group mode node. */
- ZEBRA_NODE, /* zebra connection node. */
- TABLE_NODE, /* rtm_table selection node. */
- RIP_NODE, /* RIP protocol mode node. */
- RIPNG_NODE, /* RIPng protocol mode node. */
- BABEL_NODE, /* BABEL protocol mode node. */
- EIGRP_NODE, /* EIGRP protocol mode node. */
- BGP_NODE, /* BGP protocol mode which includes BGP4+ */
- BGP_VPNV4_NODE, /* BGP MPLS-VPN PE exchange. */
- BGP_VPNV6_NODE, /* BGP MPLS-VPN PE exchange. */
- BGP_IPV4_NODE, /* BGP IPv4 unicast address family. */
- BGP_IPV4M_NODE, /* BGP IPv4 multicast address family. */
- BGP_IPV4L_NODE, /* BGP IPv4 labeled unicast address family. */
- BGP_IPV6_NODE, /* BGP IPv6 address family */
- BGP_IPV6M_NODE, /* BGP IPv6 multicast address family. */
- BGP_IPV6L_NODE, /* BGP IPv6 labeled unicast address family. */
- BGP_VRF_POLICY_NODE, /* BGP VRF policy */
- BGP_VNC_DEFAULTS_NODE, /* BGP VNC nve defaults */
- BGP_VNC_NVE_GROUP_NODE, /* BGP VNC nve group */
- BGP_VNC_L2_GROUP_NODE, /* BGP VNC L2 group */
- RFP_DEFAULTS_NODE, /* RFP defaults node */
- BGP_EVPN_NODE, /* BGP EVPN node. */
- OSPF_NODE, /* OSPF protocol mode */
- OSPF6_NODE, /* OSPF protocol for IPv6 mode */
- LDP_NODE, /* LDP protocol mode */
- LDP_IPV4_NODE, /* LDP IPv4 address family */
- LDP_IPV6_NODE, /* LDP IPv6 address family */
- LDP_IPV4_IFACE_NODE, /* LDP IPv4 Interface */
- LDP_IPV6_IFACE_NODE, /* LDP IPv6 Interface */
- LDP_L2VPN_NODE, /* LDP L2VPN node */
- LDP_PSEUDOWIRE_NODE, /* LDP Pseudowire node */
- ISIS_NODE, /* ISIS protocol mode */
- ACCESS_NODE, /* Access list node. */
- PREFIX_NODE, /* Prefix list node. */
- ACCESS_IPV6_NODE, /* Access list node. */
- ACCESS_MAC_NODE, /* MAC access list node*/
- PREFIX_IPV6_NODE, /* Prefix list node. */
- AS_LIST_NODE, /* AS list node. */
- COMMUNITY_LIST_NODE, /* Community list node. */
- RMAP_NODE, /* Route map node. */
- PBRMAP_NODE, /* PBR map node. */
- SMUX_NODE, /* SNMP configuration node. */
- DUMP_NODE, /* Packet dump node. */
- FORWARDING_NODE, /* IP forwarding node. */
- PROTOCOL_NODE, /* protocol filtering node */
- MPLS_NODE, /* MPLS config node */
- PW_NODE, /* Pseudowire config node */
- VTY_NODE, /* Vty node. */
- FPM_NODE, /* Dataplane FPM node. */
- LINK_PARAMS_NODE, /* Link-parameters node */
- BGP_EVPN_VNI_NODE, /* BGP EVPN VNI */
- RPKI_NODE, /* RPKI node for configuration of RPKI cache server
- connections.*/
- BGP_FLOWSPECV4_NODE, /* BGP IPv4 FLOWSPEC Address-Family */
- BGP_FLOWSPECV6_NODE, /* BGP IPv6 FLOWSPEC Address-Family */
- BFD_NODE, /* BFD protocol mode. */
- BFD_PEER_NODE, /* BFD peer configuration mode. */
- OPENFABRIC_NODE, /* OpenFabric router configuration node */
- VRRP_NODE, /* VRRP node */
- BMP_NODE, /* BMP config under router bgp */
- NODE_TYPE_MAX, /* maximum */
+ AUTH_NODE, /* Authentication mode of vty interface. */
+ VIEW_NODE, /* View node. Default mode of vty interface. */
+ AUTH_ENABLE_NODE, /* Authentication mode for change enable. */
+ ENABLE_NODE, /* Enable node. */
+ CONFIG_NODE, /* Config node. Default mode of config file. */
+ DEBUG_NODE, /* Debug node. */
+ VRF_DEBUG_NODE, /* Vrf Debug node. */
+ NORTHBOUND_DEBUG_NODE, /* Northbound Debug node. */
+ DEBUG_VNC_NODE, /* Debug VNC node. */
+ RMAP_DEBUG_NODE, /* Route-map debug node */
+ RESOLVER_DEBUG_NODE, /* Resolver debug node */
+ AAA_NODE, /* AAA node. */
+ KEYCHAIN_NODE, /* Key-chain node. */
+ KEYCHAIN_KEY_NODE, /* Key-chain key node. */
+ IP_NODE, /* Static ip route node. */
+ VRF_NODE, /* VRF mode node. */
+ INTERFACE_NODE, /* Interface mode node. */
+ NH_GROUP_NODE, /* Nexthop-Group mode node. */
+ ZEBRA_NODE, /* zebra connection node. */
+ TABLE_NODE, /* rtm_table selection node. */
+ RIP_NODE, /* RIP protocol mode node. */
+ RIPNG_NODE, /* RIPng protocol mode node. */
+ BABEL_NODE, /* BABEL protocol mode node. */
+ EIGRP_NODE, /* EIGRP protocol mode node. */
+ BGP_NODE, /* BGP protocol mode which includes BGP4+ */
+ BGP_VPNV4_NODE, /* BGP MPLS-VPN PE exchange. */
+ BGP_VPNV6_NODE, /* BGP MPLS-VPN PE exchange. */
+ BGP_IPV4_NODE, /* BGP IPv4 unicast address family. */
+ BGP_IPV4M_NODE, /* BGP IPv4 multicast address family. */
+ BGP_IPV4L_NODE, /* BGP IPv4 labeled unicast address family. */
+ BGP_IPV6_NODE, /* BGP IPv6 address family */
+ BGP_IPV6M_NODE, /* BGP IPv6 multicast address family. */
+ BGP_IPV6L_NODE, /* BGP IPv6 labeled unicast address family. */
+ BGP_VRF_POLICY_NODE, /* BGP VRF policy */
+ BGP_VNC_DEFAULTS_NODE, /* BGP VNC nve defaults */
+ BGP_VNC_NVE_GROUP_NODE, /* BGP VNC nve group */
+ BGP_VNC_L2_GROUP_NODE, /* BGP VNC L2 group */
+ RFP_DEFAULTS_NODE, /* RFP defaults node */
+ BGP_EVPN_NODE, /* BGP EVPN node. */
+ OSPF_NODE, /* OSPF protocol mode */
+ OSPF6_NODE, /* OSPF protocol for IPv6 mode */
+ LDP_NODE, /* LDP protocol mode */
+ LDP_IPV4_NODE, /* LDP IPv4 address family */
+ LDP_IPV6_NODE, /* LDP IPv6 address family */
+ LDP_IPV4_IFACE_NODE, /* LDP IPv4 Interface */
+ LDP_IPV6_IFACE_NODE, /* LDP IPv6 Interface */
+ LDP_L2VPN_NODE, /* LDP L2VPN node */
+ LDP_PSEUDOWIRE_NODE, /* LDP Pseudowire node */
+ ISIS_NODE, /* ISIS protocol mode */
+ ACCESS_NODE, /* Access list node. */
+ PREFIX_NODE, /* Prefix list node. */
+ ACCESS_IPV6_NODE, /* Access list node. */
+ ACCESS_MAC_NODE, /* MAC access list node*/
+ PREFIX_IPV6_NODE, /* Prefix list node. */
+ AS_LIST_NODE, /* AS list node. */
+ COMMUNITY_LIST_NODE, /* Community list node. */
+ RMAP_NODE, /* Route map node. */
+ PBRMAP_NODE, /* PBR map node. */
+ SMUX_NODE, /* SNMP configuration node. */
+ DUMP_NODE, /* Packet dump node. */
+ FORWARDING_NODE, /* IP forwarding node. */
+ PROTOCOL_NODE, /* protocol filtering node */
+ MPLS_NODE, /* MPLS config node */
+ PW_NODE, /* Pseudowire config node */
+ VTY_NODE, /* Vty node. */
+ FPM_NODE, /* Dataplane FPM node. */
+ LINK_PARAMS_NODE, /* Link-parameters node */
+ BGP_EVPN_VNI_NODE, /* BGP EVPN VNI */
+ RPKI_NODE, /* RPKI node for configuration of RPKI cache server
+ connections.*/
+ BGP_FLOWSPECV4_NODE, /* BGP IPv4 FLOWSPEC Address-Family */
+ BGP_FLOWSPECV6_NODE, /* BGP IPv6 FLOWSPEC Address-Family */
+ BFD_NODE, /* BFD protocol mode. */
+ BFD_PEER_NODE, /* BFD peer configuration mode. */
+ OPENFABRIC_NODE, /* OpenFabric router configuration node */
+ VRRP_NODE, /* VRRP node */
+ BMP_NODE, /* BMP config under router bgp */
+ NODE_TYPE_MAX, /* maximum */
};
extern vector cmdvec;
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
index 89ffa43a7..7601496b1 100644
--- a/vtysh/vtysh.c
+++ b/vtysh/vtysh.c
@@ -1361,12 +1361,10 @@ static struct cmd_node bgp_vnc_l2_group_node = {
.prompt = "%s(config-router-vnc-l2-group)# ",
};
-static struct cmd_node bmp_node = {
- .name = "bmp",
- .node = BMP_NODE,
- .parent_node = BGP_NODE,
- .prompt = "%s(config-bgp-bmp)# "
-};
+static struct cmd_node bmp_node = {.name = "bmp",
+ .node = BMP_NODE,
+ .parent_node = BGP_NODE,
+ .prompt = "%s(config-bgp-bmp)# "};
static struct cmd_node ospf_node = {
.name = "ospf",
@@ -3547,8 +3545,8 @@ DEFUN(find,
cli = vector_slot(clis, j);
if (regexec(&exp, cli->string, 0, NULL, 0) == 0)
- vty_out(vty, " (%s) %s\n",
- node->name, cli->string);
+ vty_out(vty, " (%s) %s\n", node->name,
+ cli->string);
}
}
If you are a new contributor to FRR, please see our contributing guidelines.
Outdated results 🛑Basic BGPD CI results: FAILURE
For details, please contact louberger |
Continuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-11902/ This is a comment from an automated CI system. Warnings Generated during build:Checkout code: Successful with additional warnings
Warnings Generated during build:Debian 10 amd64 build: Successful with additional warningsDebian Package lintian failed for Debian 10 amd64 build:
|
💚 Basic BGPD CI results: SUCCESS, 0 tests failedResults table
For details, please contact louberger |
I really don't know why this was designed as it is, but it's full of bear traps (like forgetting to update
node_names
or one of theswitch
statements) so it shall go die in a blaze.NB: there are still pitfalls, like forgetting to update the
cmd_node
s in vtysh/vtysh.c. They should probably be extracted like DEFUNs. But at least some of the pitfalls are gone.