summaryrefslogtreecommitdiffstats
path: root/ripd/rip_zebra.c
diff options
context:
space:
mode:
authorDaniel Walton <dwalton@cumulusnetworks.com>2016-09-23 02:01:25 +0200
committerDaniel Walton <dwalton@cumulusnetworks.com>2016-09-23 02:01:25 +0200
commit558e4c284b30ac90b7c8a9e2f8cefd368fe98c9f (patch)
treed8685ad59e537b28090c61c7a84fd3174da0553c /ripd/rip_zebra.c
parentripngd: argv update (diff)
downloadfrr-558e4c284b30ac90b7c8a9e2f8cefd368fe98c9f.tar.xz
frr-558e4c284b30ac90b7c8a9e2f8cefd368fe98c9f.zip
ripd: argv update
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Diffstat (limited to 'ripd/rip_zebra.c')
-rw-r--r--ripd/rip_zebra.c53
1 files changed, 26 insertions, 27 deletions
diff --git a/ripd/rip_zebra.c b/ripd/rip_zebra.c
index 6ca27d01d..4ede048f9 100644
--- a/ripd/rip_zebra.c
+++ b/ripd/rip_zebra.c
@@ -367,7 +367,7 @@ DEFUN (rip_redistribute_type,
for(i = 0; redist_type[i].str; i++)
{
- if (strncmp (redist_type[i].str, argv[0],
+ if (strncmp (redist_type[i].str, argv[2]->arg,
redist_type[i].str_min_len) == 0)
{
zclient_redistribute (ZEBRA_REDISTRIBUTE_ADD, zclient,
@@ -376,7 +376,7 @@ DEFUN (rip_redistribute_type,
}
}
- vty_out(vty, "Invalid type %s%s", argv[0],
+ vty_out(vty, "Invalid type %s%s", argv[2]->arg,
VTY_NEWLINE);
return CMD_WARNING;
@@ -393,7 +393,7 @@ DEFUN (no_rip_redistribute_type,
for (i = 0; redist_type[i].str; i++)
{
- if (strncmp(redist_type[i].str, argv[0],
+ if (strncmp(redist_type[i].str, argv[3]->arg,
redist_type[i].str_min_len) == 0)
{
rip_metric_unset (redist_type[i].type, DONT_CARE_METRIC_RIP);
@@ -403,7 +403,7 @@ DEFUN (no_rip_redistribute_type,
}
}
- vty_out(vty, "Invalid type %s%s", argv[0],
+ vty_out(vty, "Invalid type %s%s", argv[3]->arg,
VTY_NEWLINE);
return CMD_WARNING;
@@ -420,17 +420,17 @@ DEFUN (rip_redistribute_type_routemap,
int i;
for (i = 0; redist_type[i].str; i++) {
- if (strncmp(redist_type[i].str, argv[0],
+ if (strncmp(redist_type[i].str, argv[1]->arg,
redist_type[i].str_min_len) == 0)
{
- rip_routemap_set (redist_type[i].type, argv[1]);
+ rip_routemap_set (redist_type[i].type, argv[3]->arg);
zclient_redistribute (ZEBRA_REDISTRIBUTE_ADD, zclient, AFI_IP,
redist_type[i].type, 0, VRF_DEFAULT);
return CMD_SUCCESS;
}
}
- vty_out(vty, "Invalid type %s%s", argv[0],
+ vty_out(vty, "Invalid type %s%s", argv[1]->arg,
VTY_NEWLINE);
return CMD_WARNING;
@@ -449,17 +449,17 @@ DEFUN (no_rip_redistribute_type_routemap,
for (i = 0; redist_type[i].str; i++)
{
- if (strncmp(redist_type[i].str, argv[0],
+ if (strncmp(redist_type[i].str, argv[2]->arg,
redist_type[i].str_min_len) == 0)
{
- if (rip_routemap_unset (redist_type[i].type,argv[1]))
+ if (rip_routemap_unset (redist_type[i].type,argv[4]->arg))
return CMD_WARNING;
rip_redistribute_unset (redist_type[i].type);
return CMD_SUCCESS;
}
}
- vty_out(vty, "Invalid type %s%s", argv[0],
+ vty_out(vty, "Invalid type %s%s", argv[2]->arg,
VTY_NEWLINE);
return CMD_WARNING;
@@ -476,10 +476,10 @@ DEFUN (rip_redistribute_type_metric,
int i;
int metric;
- metric = atoi (argv[1]);
+ metric = atoi (argv[3]->arg);
for (i = 0; redist_type[i].str; i++) {
- if (strncmp(redist_type[i].str, argv[0],
+ if (strncmp(redist_type[i].str, argv[1]->arg,
redist_type[i].str_min_len) == 0)
{
rip_redistribute_metric_set (redist_type[i].type, metric);
@@ -489,7 +489,7 @@ DEFUN (rip_redistribute_type_metric,
}
}
- vty_out(vty, "Invalid type %s%s", argv[0],
+ vty_out(vty, "Invalid type %s%s", argv[1]->arg,
VTY_NEWLINE);
return CMD_WARNING;
@@ -508,17 +508,17 @@ DEFUN (no_rip_redistribute_type_metric,
for (i = 0; redist_type[i].str; i++)
{
- if (strncmp(redist_type[i].str, argv[0],
+ if (strncmp(redist_type[i].str, argv[2]->arg,
redist_type[i].str_min_len) == 0)
{
- if (rip_metric_unset (redist_type[i].type, atoi(argv[1])))
+ if (rip_metric_unset (redist_type[i].type, atoi(argv[4]->arg)))
return CMD_WARNING;
rip_redistribute_unset (redist_type[i].type);
return CMD_SUCCESS;
}
}
- vty_out(vty, "Invalid type %s%s", argv[0],
+ vty_out(vty, "Invalid type %s%s", argv[2]->arg,
VTY_NEWLINE);
return CMD_WARNING;
@@ -537,21 +537,21 @@ DEFUN (rip_redistribute_type_metric_routemap,
int i;
int metric;
- metric = atoi (argv[1]);
+ metric = atoi (argv[3]->arg);
for (i = 0; redist_type[i].str; i++) {
- if (strncmp(redist_type[i].str, argv[0],
+ if (strncmp(redist_type[i].str, argv[1]->arg,
redist_type[i].str_min_len) == 0)
{
rip_redistribute_metric_set (redist_type[i].type, metric);
- rip_routemap_set (redist_type[i].type, argv[2]);
+ rip_routemap_set (redist_type[i].type, argv[5]->arg);
zclient_redistribute (ZEBRA_REDISTRIBUTE_ADD, zclient, AFI_IP,
redist_type[i].type, 0, VRF_DEFAULT);
return CMD_SUCCESS;
}
}
- vty_out(vty, "Invalid type %s%s", argv[0],
+ vty_out(vty, "Invalid type %s%s", argv[1]->arg,
VTY_NEWLINE);
return CMD_WARNING;
@@ -560,8 +560,7 @@ DEFUN (rip_redistribute_type_metric_routemap,
DEFUN (no_rip_redistribute_type_metric_routemap,
no_rip_redistribute_type_metric_routemap_cmd,
- "no redistribute " QUAGGA_REDIST_STR_RIPD
- " metric <0-16> route-map WORD",
+ "no redistribute " QUAGGA_REDIST_STR_RIPD " metric <0-16> route-map WORD",
NO_STR
REDIST_STR
QUAGGA_REDIST_HELP_STR_RIPD
@@ -574,14 +573,14 @@ DEFUN (no_rip_redistribute_type_metric_routemap,
for (i = 0; redist_type[i].str; i++)
{
- if (strncmp(redist_type[i].str, argv[0],
+ if (strncmp(redist_type[i].str, argv[2]->arg,
redist_type[i].str_min_len) == 0)
{
- if (rip_metric_unset (redist_type[i].type, atoi(argv[1])))
+ if (rip_metric_unset (redist_type[i].type, atoi(argv[4]->arg)))
return CMD_WARNING;
- if (rip_routemap_unset (redist_type[i].type, argv[2]))
+ if (rip_routemap_unset (redist_type[i].type, argv[6]->arg))
{
- rip_redistribute_metric_set(redist_type[i].type, atoi(argv[1]));
+ rip_redistribute_metric_set(redist_type[i].type, atoi(argv[4]->arg));
return CMD_WARNING;
}
rip_redistribute_unset (redist_type[i].type);
@@ -589,7 +588,7 @@ DEFUN (no_rip_redistribute_type_metric_routemap,
}
}
- vty_out(vty, "Invalid type %s%s", argv[0],
+ vty_out(vty, "Invalid type %s%s", argv[2]->arg,
VTY_NEWLINE);
return CMD_WARNING;