summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2016-09-21 05:41:24 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2016-09-21 05:41:24 +0200
commit224a3ed809ae23539cd49b85ada8516cb0b0a762 (patch)
treea00fabc0dfe0443c91c7332d96793b1cb85ce019
parentpimd: Convert to the new way of working (diff)
downloadfrr-224a3ed809ae23539cd49b85ada8516cb0b0a762.tar.xz
frr-224a3ed809ae23539cd49b85ada8516cb0b0a762.zip
ripd: Fixup code to work under new way
-rw-r--r--ripd/rip_debug.c12
-rw-r--r--ripd/rip_interface.c42
-rw-r--r--ripd/rip_offset.c8
-rw-r--r--ripd/rip_routemap.c42
-rw-r--r--ripd/rip_zebra.c50
-rw-r--r--ripd/ripd.c26
6 files changed, 90 insertions, 90 deletions
diff --git a/ripd/rip_debug.c b/ripd/rip_debug.c
index a267874ad..d347bcb2a 100644
--- a/ripd/rip_debug.c
+++ b/ripd/rip_debug.c
@@ -98,9 +98,9 @@ DEFUN (debug_rip_packet_direct,
"RIP send packet\n")
{
rip_debug_packet |= RIP_DEBUG_PACKET;
- if (strncmp ("send", argv[0], strlen (argv[0])) == 0)
+ if (strncmp ("send", argv[0]->arg, strlen (argv[0]->arg)) == 0)
rip_debug_packet |= RIP_DEBUG_SEND;
- if (strncmp ("recv", argv[0], strlen (argv[0])) == 0)
+ if (strncmp ("recv", argv[0]->arg, strlen (argv[0]->arg)) == 0)
rip_debug_packet |= RIP_DEBUG_RECV;
return CMD_SUCCESS;
}
@@ -118,9 +118,9 @@ DEFUN_DEPRECATED (debug_rip_packet_detail,
"Detailed information display\n")
{
rip_debug_packet |= RIP_DEBUG_PACKET;
- if (strncmp ("send", argv[0], strlen (argv[0])) == 0)
+ if (strncmp ("send", argv[0]->arg, strlen (argv[0]->arg)) == 0)
rip_debug_packet |= RIP_DEBUG_SEND;
- if (strncmp ("recv", argv[0], strlen (argv[0])) == 0)
+ if (strncmp ("recv", argv[0]->arg, strlen (argv[0]->arg)) == 0)
rip_debug_packet |= RIP_DEBUG_RECV;
return CMD_SUCCESS;
}
@@ -170,14 +170,14 @@ DEFUN (no_debug_rip_packet_direct,
"RIP option set for receive packet\n"
"RIP option set for send packet\n")
{
- if (strncmp ("send", argv[0], strlen (argv[0])) == 0)
+ if (strncmp ("send", argv[0]->arg, strlen (argv[0]->arg)) == 0)
{
if (IS_RIP_DEBUG_RECV)
rip_debug_packet &= ~RIP_DEBUG_SEND;
else
rip_debug_packet = 0;
}
- else if (strncmp ("recv", argv[0], strlen (argv[0])) == 0)
+ else if (strncmp ("recv", argv[0]->arg, strlen (argv[0]->arg)) == 0)
{
if (IS_RIP_DEBUG_SEND)
rip_debug_packet &= ~RIP_DEBUG_RECV;
diff --git a/ripd/rip_interface.c b/ripd/rip_interface.c
index 09b35d00b..b9f190d32 100644
--- a/ripd/rip_interface.c
+++ b/ripd/rip_interface.c
@@ -1228,16 +1228,16 @@ DEFUN (rip_network,
int ret;
struct prefix_ipv4 p;
- ret = str2prefix_ipv4 (argv[0], &p);
+ ret = str2prefix_ipv4 (argv[0]->arg, &p);
if (ret)
ret = rip_enable_network_add ((struct prefix *) &p);
else
- ret = rip_enable_if_add (argv[0]);
+ ret = rip_enable_if_add (argv[0]->arg);
if (ret < 0)
{
- vty_out (vty, "There is a same network configuration %s%s", argv[0],
+ vty_out (vty, "There is a same network configuration %s%s", argv[0]->arg,
VTY_NEWLINE);
return CMD_WARNING;
}
@@ -1257,16 +1257,16 @@ DEFUN (no_rip_network,
int ret;
struct prefix_ipv4 p;
- ret = str2prefix_ipv4 (argv[0], &p);
+ ret = str2prefix_ipv4 (argv[0]->arg, &p);
if (ret)
ret = rip_enable_network_delete ((struct prefix *) &p);
else
- ret = rip_enable_if_delete (argv[0]);
+ ret = rip_enable_if_delete (argv[0]->arg);
if (ret < 0)
{
- vty_out (vty, "Can't find network configuration %s%s", argv[0],
+ vty_out (vty, "Can't find network configuration %s%s", argv[0]->arg,
VTY_NEWLINE);
return CMD_WARNING;
}
@@ -1284,7 +1284,7 @@ DEFUN (rip_neighbor,
int ret;
struct prefix_ipv4 p;
- ret = str2prefix_ipv4 (argv[0], &p);
+ ret = str2prefix_ipv4 (argv[0]->arg, &p);
if (ret <= 0)
{
@@ -1308,7 +1308,7 @@ DEFUN (no_rip_neighbor,
int ret;
struct prefix_ipv4 p;
- ret = str2prefix_ipv4 (argv[0], &p);
+ ret = str2prefix_ipv4 (argv[0]->arg, &p);
if (ret <= 0)
{
@@ -1338,12 +1338,12 @@ DEFUN (ip_rip_receive_version,
ri = ifp->info;
/* Version 1. */
- if (atoi (argv[0]) == 1)
+ if (atoi (argv[0]->arg) == 1)
{
ri->ri_receive = RI_RIP_VERSION_1;
return CMD_SUCCESS;
}
- if (atoi (argv[0]) == 2)
+ if (atoi (argv[0]->arg) == 2)
{
ri->ri_receive = RI_RIP_VERSION_2;
return CMD_SUCCESS;
@@ -1440,12 +1440,12 @@ DEFUN (ip_rip_send_version,
ri = ifp->info;
/* Version 1. */
- if (atoi (argv[0]) == 1)
+ if (atoi (argv[0]->arg) == 1)
{
ri->ri_send = RI_RIP_VERSION_1;
return CMD_SUCCESS;
}
- if (atoi (argv[0]) == 2)
+ if (atoi (argv[0]->arg) == 2)
{
ri->ri_send = RI_RIP_VERSION_2;
return CMD_SUCCESS;
@@ -1548,9 +1548,9 @@ DEFUN (ip_rip_authentication_mode,
return CMD_WARNING;
}
- if (strncmp ("md5", argv[0], strlen (argv[0])) == 0)
+ if (strncmp ("md5", argv[0]->arg, strlen (argv[0]->arg)) == 0)
auth_type = RIP_AUTH_MD5;
- else if (strncmp ("text", argv[0], strlen (argv[0])) == 0)
+ else if (strncmp ("text", argv[0]->arg, strlen (argv[0]->arg)) == 0)
auth_type = RIP_AUTH_SIMPLE_PASSWORD;
else
{
@@ -1570,9 +1570,9 @@ DEFUN (ip_rip_authentication_mode,
return CMD_WARNING;
}
- if (strncmp ("r", argv[1], 1) == 0)
+ if (strncmp ("r", argv[1]->arg, 1) == 0)
ri->md5_auth_len = RIP_AUTH_MD5_SIZE;
- else if (strncmp ("o", argv[1], 1) == 0)
+ else if (strncmp ("o", argv[1]->arg, 1) == 0)
ri->md5_auth_len = RIP_AUTH_MD5_COMPAT_SIZE;
else
return CMD_WARNING;
@@ -1656,7 +1656,7 @@ DEFUN (ip_rip_authentication_string,
ifp = (struct interface *)vty->index;
ri = ifp->info;
- if (strlen (argv[0]) > 16)
+ if (strlen (argv[0]->arg) > 16)
{
vty_out (vty, "%% RIPv2 authentication string must be shorter than 16%s",
VTY_NEWLINE);
@@ -1672,7 +1672,7 @@ DEFUN (ip_rip_authentication_string,
if (ri->auth_str)
free (ri->auth_str);
- ri->auth_str = strdup (argv[0]);
+ ri->auth_str = strdup (argv[0]->arg);
return CMD_SUCCESS;
}
@@ -1735,7 +1735,7 @@ DEFUN (ip_rip_authentication_key_chain,
if (ri->key_chain)
free (ri->key_chain);
- ri->key_chain = strdup (argv[0]);
+ ri->key_chain = strdup (argv[0]->arg);
return CMD_SUCCESS;
}
@@ -1867,7 +1867,7 @@ DEFUN (rip_passive_interface,
"Interface name\n"
"default for all interfaces\n")
{
- const char *ifname = argv[0];
+ const char *ifname = argv[0]->arg;
if (!strcmp(ifname,"default")) {
passive_default = 1;
@@ -1888,7 +1888,7 @@ DEFUN (no_rip_passive_interface,
"Interface name\n"
"default for all interfaces\n")
{
- const char *ifname = argv[0];
+ const char *ifname = argv[0]->arg;
if (!strcmp(ifname,"default")) {
passive_default = 0;
diff --git a/ripd/rip_offset.c b/ripd/rip_offset.c
index 0155f90ef..477850532 100644
--- a/ripd/rip_offset.c
+++ b/ripd/rip_offset.c
@@ -289,7 +289,7 @@ DEFUN (rip_offset_list,
"For outgoing updates\n"
"Metric value\n")
{
- return rip_offset_list_set (vty, argv[0], argv[1], argv[2], NULL);
+ return rip_offset_list_set (vty, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL);
}
DEFUN (rip_offset_list_ifname,
@@ -302,7 +302,7 @@ DEFUN (rip_offset_list_ifname,
"Metric value\n"
"Interface to match\n")
{
- return rip_offset_list_set (vty, argv[0], argv[1], argv[2], argv[3]);
+ return rip_offset_list_set (vty, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg);
}
DEFUN (no_rip_offset_list,
@@ -315,7 +315,7 @@ DEFUN (no_rip_offset_list,
"For outgoing updates\n"
"Metric value\n")
{
- return rip_offset_list_unset (vty, argv[0], argv[1], argv[2], NULL);
+ return rip_offset_list_unset (vty, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL);
}
DEFUN (no_rip_offset_list_ifname,
@@ -329,7 +329,7 @@ DEFUN (no_rip_offset_list_ifname,
"Metric value\n"
"Interface to match\n")
{
- return rip_offset_list_unset (vty, argv[0], argv[1], argv[2], argv[3]);
+ return rip_offset_list_unset (vty, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg);
}
static int
diff --git a/ripd/rip_routemap.c b/ripd/rip_routemap.c
index e7263ad7b..bbb0787dd 100644
--- a/ripd/rip_routemap.c
+++ b/ripd/rip_routemap.c
@@ -742,7 +742,7 @@ DEFUN (match_metric,
"Match metric of route\n"
"Metric value\n")
{
- return rip_route_match_add (vty, vty->index, "metric", argv[0]);
+ return rip_route_match_add (vty, vty->index, "metric", argv[0]->arg);
}
DEFUN (no_match_metric,
@@ -755,7 +755,7 @@ DEFUN (no_match_metric,
if (argc == 0)
return rip_route_match_delete (vty, vty->index, "metric", NULL);
- return rip_route_match_delete (vty, vty->index, "metric", argv[0]);
+ return rip_route_match_delete (vty, vty->index, "metric", argv[0]->arg);
}
ALIAS (no_match_metric,
@@ -773,7 +773,7 @@ DEFUN (match_interface,
"Match first hop interface of route\n"
"Interface name\n")
{
- return rip_route_match_add (vty, vty->index, "interface", argv[0]);
+ return rip_route_match_add (vty, vty->index, "interface", argv[0]->arg);
}
DEFUN (no_match_interface,
@@ -786,7 +786,7 @@ DEFUN (no_match_interface,
if (argc == 0)
return rip_route_match_delete (vty, vty->index, "interface", NULL);
- return rip_route_match_delete (vty, vty->index, "interface", argv[0]);
+ return rip_route_match_delete (vty, vty->index, "interface", argv[0]->arg);
}
ALIAS (no_match_interface,
@@ -807,7 +807,7 @@ DEFUN (match_ip_next_hop,
"IP access-list number (expanded range)\n"
"IP Access-list name\n")
{
- return rip_route_match_add (vty, vty->index, "ip next-hop", argv[0]);
+ return rip_route_match_add (vty, vty->index, "ip next-hop", argv[0]->arg);
}
DEFUN (no_match_ip_next_hop,
@@ -821,7 +821,7 @@ DEFUN (no_match_ip_next_hop,
if (argc == 0)
return rip_route_match_delete (vty, vty->index, "ip next-hop", NULL);
- return rip_route_match_delete (vty, vty->index, "ip next-hop", argv[0]);
+ return rip_route_match_delete (vty, vty->index, "ip next-hop", argv[0]->arg);
}
ALIAS (no_match_ip_next_hop,
@@ -844,7 +844,7 @@ DEFUN (match_ip_next_hop_prefix_list,
"Match entries of prefix-lists\n"
"IP prefix-list name\n")
{
- return rip_route_match_add (vty, vty->index, "ip next-hop prefix-list", argv[0]);
+ return rip_route_match_add (vty, vty->index, "ip next-hop prefix-list", argv[0]->arg);
}
DEFUN (no_match_ip_next_hop_prefix_list,
@@ -859,7 +859,7 @@ DEFUN (no_match_ip_next_hop_prefix_list,
if (argc == 0)
return rip_route_match_delete (vty, vty->index, "ip next-hop prefix-list", NULL);
- return rip_route_match_delete (vty, vty->index, "ip next-hop prefix-list", argv[0]);
+ return rip_route_match_delete (vty, vty->index, "ip next-hop prefix-list", argv[0]->arg);
}
ALIAS (no_match_ip_next_hop_prefix_list,
@@ -883,7 +883,7 @@ DEFUN (match_ip_address,
"IP Access-list name\n")
{
- return rip_route_match_add (vty, vty->index, "ip address", argv[0]);
+ return rip_route_match_add (vty, vty->index, "ip address", argv[0]->arg);
}
DEFUN (no_match_ip_address,
@@ -897,7 +897,7 @@ DEFUN (no_match_ip_address,
if (argc == 0)
return rip_route_match_delete (vty, vty->index, "ip address", NULL);
- return rip_route_match_delete (vty, vty->index, "ip address", argv[0]);
+ return rip_route_match_delete (vty, vty->index, "ip address", argv[0]->arg);
}
ALIAS (no_match_ip_address,
@@ -920,7 +920,7 @@ DEFUN (match_ip_address_prefix_list,
"Match entries of prefix-lists\n"
"IP prefix-list name\n")
{
- return rip_route_match_add (vty, vty->index, "ip address prefix-list", argv[0]);
+ return rip_route_match_add (vty, vty->index, "ip address prefix-list", argv[0]->arg);
}
DEFUN (no_match_ip_address_prefix_list,
@@ -935,7 +935,7 @@ DEFUN (no_match_ip_address_prefix_list,
if (argc == 0)
return rip_route_match_delete (vty, vty->index, "ip address prefix-list", NULL);
- return rip_route_match_delete (vty, vty->index, "ip address prefix-list", argv[0]);
+ return rip_route_match_delete (vty, vty->index, "ip address prefix-list", argv[0]->arg);
}
ALIAS (no_match_ip_address_prefix_list,
@@ -955,7 +955,7 @@ DEFUN (match_tag,
"Match tag of route\n"
"Metric value\n")
{
- return rip_route_match_add (vty, vty->index, "tag", argv[0]);
+ return rip_route_match_add (vty, vty->index, "tag", argv[0]->arg);
}
DEFUN (no_match_tag,
@@ -968,7 +968,7 @@ DEFUN (no_match_tag,
if (argc == 0)
return rip_route_match_delete (vty, vty->index, "tag", NULL);
- return rip_route_match_delete (vty, vty->index, "tag", argv[0]);
+ return rip_route_match_delete (vty, vty->index, "tag", argv[0]->arg);
}
ALIAS (no_match_tag,
@@ -988,7 +988,7 @@ DEFUN (set_metric,
"Metric value for destination routing protocol\n"
"Metric value\n")
{
- return rip_route_set_add (vty, vty->index, "metric", argv[0]);
+ return rip_route_set_add (vty, vty->index, "metric", argv[0]->arg);
}
ALIAS (set_metric,
@@ -1008,7 +1008,7 @@ DEFUN (no_set_metric,
if (argc == 0)
return rip_route_set_delete (vty, vty->index, "metric", NULL);
- return rip_route_set_delete (vty, vty->index, "metric", argv[0]);
+ return rip_route_set_delete (vty, vty->index, "metric", argv[0]->arg);
}
ALIAS (no_set_metric,
@@ -1038,7 +1038,7 @@ DEFUN (set_ip_nexthop,
union sockunion su;
int ret;
- ret = str2sockunion (argv[0], &su);
+ ret = str2sockunion (argv[0]->arg, &su);
if (ret < 0)
{
vty_out (vty, "%% Malformed next-hop address%s", VTY_NEWLINE);
@@ -1052,7 +1052,7 @@ DEFUN (set_ip_nexthop,
return CMD_WARNING;
}
- return rip_route_set_add (vty, vty->index, "ip next-hop", argv[0]);
+ return rip_route_set_add (vty, vty->index, "ip next-hop", argv[0]->arg);
}
DEFUN (no_set_ip_nexthop,
@@ -1066,7 +1066,7 @@ DEFUN (no_set_ip_nexthop,
if (argc == 0)
return rip_route_set_delete (vty, vty->index, "ip next-hop", NULL);
- return rip_route_set_delete (vty, vty->index, "ip next-hop", argv[0]);
+ return rip_route_set_delete (vty, vty->index, "ip next-hop", argv[0]->arg);
}
ALIAS (no_set_ip_nexthop,
@@ -1085,7 +1085,7 @@ DEFUN (set_tag,
"Tag value for routing protocol\n"
"Tag value\n")
{
- return rip_route_set_add (vty, vty->index, "tag", argv[0]);
+ return rip_route_set_add (vty, vty->index, "tag", argv[0]->arg);
}
DEFUN (no_set_tag,
@@ -1098,7 +1098,7 @@ DEFUN (no_set_tag,
if (argc == 0)
return rip_route_set_delete (vty, vty->index, "tag", NULL);
- return rip_route_set_delete (vty, vty->index, "tag", argv[0]);
+ return rip_route_set_delete (vty, vty->index, "tag", argv[0]->arg);
}
ALIAS (no_set_tag,
diff --git a/ripd/rip_zebra.c b/ripd/rip_zebra.c
index 6ca27d01d..64d1a4dd3 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[0]->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[0]->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[0]->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[0]->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[0]->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[1]->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[0]->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[0]->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[1]->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[0]->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[1]->arg);
for (i = 0; redist_type[i].str; i++) {
- if (strncmp(redist_type[i].str, argv[0],
+ if (strncmp(redist_type[i].str, argv[0]->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[0]->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[0]->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[1]->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[0]->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[1]->arg);
for (i = 0; redist_type[i].str; i++) {
- if (strncmp(redist_type[i].str, argv[0],
+ if (strncmp(redist_type[i].str, argv[0]->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[2]->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[0]->arg,
VTY_NEWLINE);
return CMD_WARNING;
@@ -574,14 +574,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[0]->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[1]->arg)))
return CMD_WARNING;
- if (rip_routemap_unset (redist_type[i].type, argv[2]))
+ if (rip_routemap_unset (redist_type[i].type, argv[2]->arg))
{
- rip_redistribute_metric_set(redist_type[i].type, atoi(argv[1]));
+ rip_redistribute_metric_set(redist_type[i].type, atoi(argv[1]->arg));
return CMD_WARNING;
}
rip_redistribute_unset (redist_type[i].type);
@@ -589,7 +589,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[0]->arg,
VTY_NEWLINE);
return CMD_WARNING;
diff --git a/ripd/ripd.c b/ripd/ripd.c
index 3a8cd80e7..b8b992c2c 100644
--- a/ripd/ripd.c
+++ b/ripd/ripd.c
@@ -2949,7 +2949,7 @@ DEFUN (rip_version,
{
int version;
- version = atoi (argv[0]);
+ version = atoi (argv[0]->arg);
if (version != RIPv1 && version != RIPv2)
{
vty_out (vty, "invalid rip version %d%s", version,
@@ -2992,7 +2992,7 @@ DEFUN (rip_route,
struct prefix_ipv4 p;
struct route_node *node;
- ret = str2prefix_ipv4 (argv[0], &p);
+ ret = str2prefix_ipv4 (argv[0]->arg, &p);
if (ret < 0)
{
vty_out (vty, "Malformed address%s", VTY_NEWLINE);
@@ -3028,7 +3028,7 @@ DEFUN (no_rip_route,
struct prefix_ipv4 p;
struct route_node *node;
- ret = str2prefix_ipv4 (argv[0], &p);
+ ret = str2prefix_ipv4 (argv[0]->arg, &p);
if (ret < 0)
{
vty_out (vty, "Malformed address%s", VTY_NEWLINE);
@@ -3040,7 +3040,7 @@ DEFUN (no_rip_route,
node = route_node_lookup (rip->route, (struct prefix *) &p);
if (! node)
{
- vty_out (vty, "Can't find route %s.%s", argv[0],
+ vty_out (vty, "Can't find route %s.%s", argv[0]->arg,
VTY_NEWLINE);
return CMD_WARNING;
}
@@ -3079,7 +3079,7 @@ DEFUN (rip_default_metric,
{
if (rip)
{
- rip->default_metric = atoi (argv[0]);
+ rip->default_metric = atoi (argv[0]->arg);
/* rip_update_default_metric (); */
}
return CMD_SUCCESS;
@@ -3123,21 +3123,21 @@ DEFUN (rip_timers,
unsigned long RIP_TIMER_MAX = 2147483647;
unsigned long RIP_TIMER_MIN = 5;
- update = strtoul (argv[0], &endptr, 10);
+ update = strtoul (argv[0]->arg, &endptr, 10);
if (update > RIP_TIMER_MAX || update < RIP_TIMER_MIN || *endptr != '\0')
{
vty_out (vty, "update timer value error%s", VTY_NEWLINE);
return CMD_WARNING;
}
- timeout = strtoul (argv[1], &endptr, 10);
+ timeout = strtoul (argv[1]->arg, &endptr, 10);
if (timeout > RIP_TIMER_MAX || timeout < RIP_TIMER_MIN || *endptr != '\0')
{
vty_out (vty, "timeout timer value error%s", VTY_NEWLINE);
return CMD_WARNING;
}
- garbage = strtoul (argv[2], &endptr, 10);
+ garbage = strtoul (argv[2]->arg, &endptr, 10);
if (garbage > RIP_TIMER_MAX || garbage < RIP_TIMER_MIN || *endptr != '\0')
{
vty_out (vty, "garbage timer value error%s", VTY_NEWLINE);
@@ -3386,7 +3386,7 @@ DEFUN (rip_distance,
"Administrative distance\n"
"Distance value\n")
{
- rip->distance = atoi (argv[0]);
+ rip->distance = atoi (argv[0]->arg);
return CMD_SUCCESS;
}
@@ -3408,7 +3408,7 @@ DEFUN (rip_distance_source,
"Distance value\n"
"IP source prefix\n")
{
- rip_distance_set (vty, argv[0], argv[1], NULL);
+ rip_distance_set (vty, argv[0]->arg, argv[1]->arg, NULL);
return CMD_SUCCESS;
}
@@ -3420,7 +3420,7 @@ DEFUN (no_rip_distance_source,
"Distance value\n"
"IP source prefix\n")
{
- rip_distance_unset (vty, argv[0], argv[1], NULL);
+ rip_distance_unset (vty, argv[0]->arg, argv[1]->arg, NULL);
return CMD_SUCCESS;
}
@@ -3432,7 +3432,7 @@ DEFUN (rip_distance_source_access_list,
"IP source prefix\n"
"Access list name\n")
{
- rip_distance_set (vty, argv[0], argv[1], argv[2]);
+ rip_distance_set (vty, argv[0]->arg, argv[1]->arg, argv[2]->arg);
return CMD_SUCCESS;
}
@@ -3445,7 +3445,7 @@ DEFUN (no_rip_distance_source_access_list,
"IP source prefix\n"
"Access list name\n")
{
- rip_distance_unset (vty, argv[0], argv[1], argv[2]);
+ rip_distance_unset (vty, argv[0]->arg, argv[1]->arg, argv[2]->arg);
return CMD_SUCCESS;
}