"RIP send packet\n")
{
rip_debug_packet |= RIP_DEBUG_PACKET;
- if (strncmp ("send", argv[0], strlen (argv[0])) == 0)
+ if (strncmp ("send", argv[3]->arg, strlen (argv[3]->arg)) == 0)
rip_debug_packet |= RIP_DEBUG_SEND;
- if (strncmp ("recv", argv[0], strlen (argv[0])) == 0)
+ if (strncmp ("recv", argv[3]->arg, strlen (argv[3]->arg)) == 0)
rip_debug_packet |= RIP_DEBUG_RECV;
return CMD_SUCCESS;
}
"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[4]->arg, strlen (argv[4]->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[4]->arg, strlen (argv[4]->arg)) == 0)
{
if (IS_RIP_DEBUG_SEND)
rip_debug_packet &= ~RIP_DEBUG_RECV;
int ret;
struct prefix_ipv4 p;
- ret = str2prefix_ipv4 (argv[0], &p);
+ ret = str2prefix_ipv4 (argv[1]->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[1]->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[1]->arg,
VTY_NEWLINE);
return CMD_WARNING;
}
int ret;
struct prefix_ipv4 p;
- ret = str2prefix_ipv4 (argv[0], &p);
+ ret = str2prefix_ipv4 (argv[2]->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[2]->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[2]->arg,
VTY_NEWLINE);
return CMD_WARNING;
}
int ret;
struct prefix_ipv4 p;
- ret = str2prefix_ipv4 (argv[0], &p);
+ ret = str2prefix_ipv4 (argv[1]->arg, &p);
if (ret <= 0)
{
int ret;
struct prefix_ipv4 p;
- ret = str2prefix_ipv4 (argv[0], &p);
+ ret = str2prefix_ipv4 (argv[2]->arg, &p);
if (ret <= 0)
{
ri = ifp->info;
/* Version 1. */
- if (atoi (argv[0]) == 1)
+ if (atoi (argv[4]->arg) == 1)
{
ri->ri_receive = RI_RIP_VERSION_1;
return CMD_SUCCESS;
}
- if (atoi (argv[0]) == 2)
+ if (atoi (argv[4]->arg) == 2)
{
ri->ri_receive = RI_RIP_VERSION_2;
return CMD_SUCCESS;
ri = ifp->info;
/* Version 1. */
- if (atoi (argv[0]) == 1)
+ if (atoi (argv[4]->arg) == 1)
{
ri->ri_send = RI_RIP_VERSION_1;
return CMD_SUCCESS;
}
- if (atoi (argv[0]) == 2)
+ if (atoi (argv[4]->arg) == 2)
{
ri->ri_send = RI_RIP_VERSION_2;
return CMD_SUCCESS;
return CMD_WARNING;
}
- if (strncmp ("md5", argv[0], strlen (argv[0])) == 0)
+ if (strncmp ("md5", argv[4]->arg, strlen (argv[4]->arg)) == 0)
auth_type = RIP_AUTH_MD5;
- else if (strncmp ("text", argv[0], strlen (argv[0])) == 0)
+ else if (strncmp ("text", argv[4]->arg, strlen (argv[4]->arg)) == 0)
auth_type = RIP_AUTH_SIMPLE_PASSWORD;
else
{
return CMD_WARNING;
}
- if (strncmp ("r", argv[1], 1) == 0)
+ if (strncmp ("r", argv[6]->arg, 1) == 0)
ri->md5_auth_len = RIP_AUTH_MD5_SIZE;
- else if (strncmp ("o", argv[1], 1) == 0)
+ else if (strncmp ("o", argv[6]->arg, 1) == 0)
ri->md5_auth_len = RIP_AUTH_MD5_COMPAT_SIZE;
else
return CMD_WARNING;
ifp = (struct interface *)vty->index;
ri = ifp->info;
- if (strlen (argv[0]) > 16)
+ if (strlen (argv[4]->arg) > 16)
{
vty_out (vty, "%% RIPv2 authentication string must be shorter than 16%s",
VTY_NEWLINE);
if (ri->auth_str)
free (ri->auth_str);
- ri->auth_str = strdup (argv[0]);
+ ri->auth_str = strdup (argv[4]->arg);
return CMD_SUCCESS;
}
if (ri->key_chain)
free (ri->key_chain);
- ri->key_chain = strdup (argv[0]);
+ ri->key_chain = strdup (argv[4]->arg);
return CMD_SUCCESS;
}
"Interface name\n"
"default for all interfaces\n")
{
- const char *ifname = argv[0];
+ const char *ifname = argv[1]->arg;
if (!strcmp(ifname,"default")) {
passive_default = 1;
"Interface name\n"
"default for all interfaces\n")
{
- const char *ifname = argv[0];
+ const char *ifname = argv[2]->arg;
if (!strcmp(ifname,"default")) {
passive_default = 0;
"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[1]->arg, argv[2]->arg, argv[3]->arg, NULL);
}
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[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg);
}
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[2]->arg, argv[3]->arg, argv[4]->arg, NULL);
}
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[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg);
}
static int
"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[2]->arg);
}
DEFUN (no_match_metric,
MATCH_STR
"Match metric of route\n")
{
- 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[3]->arg);
}
ALIAS (no_match_metric,
"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[2]->arg);
}
DEFUN (no_match_interface,
MATCH_STR
"Match first hop interface of route\n")
{
- 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[3]->arg);
}
ALIAS (no_match_interface,
"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[3]->arg);
}
DEFUN (no_match_ip_next_hop,
IP_STR
"Match next-hop address of route\n")
{
- 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[4]->arg);
}
ALIAS (no_match_ip_next_hop,
"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[4]->arg);
}
DEFUN (no_match_ip_next_hop_prefix_list,
"Match next-hop address of route\n"
"Match entries of prefix-lists\n")
{
- 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[5]->arg);
}
ALIAS (no_match_ip_next_hop_prefix_list,
"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[3]->arg);
}
DEFUN (no_match_ip_address,
IP_STR
"Match address of route\n")
{
- 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[4]->arg);
}
ALIAS (no_match_ip_address,
"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[4]->arg);
}
DEFUN (no_match_ip_address_prefix_list,
"Match address of route\n"
"Match entries of prefix-lists\n")
{
- 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[5]->arg);
}
ALIAS (no_match_ip_address_prefix_list,
"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[2]->arg);
}
DEFUN (no_match_tag,
MATCH_STR
"Match tag of route\n")
{
- 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[3]->arg);
}
ALIAS (no_match_tag,
"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[2]->arg);
}
ALIAS (set_metric,
SET_STR
"Metric value for destination routing protocol\n")
{
- 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[3]->arg);
}
ALIAS (no_set_metric,
union sockunion su;
int ret;
- ret = str2sockunion (argv[0], &su);
+ ret = str2sockunion (argv[3]->arg, &su);
if (ret < 0)
{
vty_out (vty, "%% Malformed next-hop address%s", VTY_NEWLINE);
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[3]->arg);
}
DEFUN (no_set_ip_nexthop,
IP_STR
"Next hop address\n")
{
- 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[4]->arg);
}
ALIAS (no_set_ip_nexthop,
"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[2]->arg);
}
DEFUN (no_set_tag,
SET_STR
"Tag value for routing protocol\n")
{
- 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[3]->arg);
}
ALIAS (no_set_tag,
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,
}
}
- vty_out(vty, "Invalid type %s%s", argv[0],
+ vty_out(vty, "Invalid type %s%s", argv[2]->arg,
VTY_NEWLINE);
return CMD_WARNING;
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);
}
}
- vty_out(vty, "Invalid type %s%s", argv[0],
+ vty_out(vty, "Invalid type %s%s", argv[3]->arg,
VTY_NEWLINE);
return CMD_WARNING;
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;
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;
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);
}
}
- vty_out(vty, "Invalid type %s%s", argv[0],
+ vty_out(vty, "Invalid type %s%s", argv[1]->arg,
VTY_NEWLINE);
return CMD_WARNING;
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;
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;
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
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);
}
}
- vty_out(vty, "Invalid type %s%s", argv[0],
+ vty_out(vty, "Invalid type %s%s", argv[2]->arg,
VTY_NEWLINE);
return CMD_WARNING;
{
int version;
- version = atoi (argv[0]);
+ version = atoi (argv[1]->arg);
if (version != RIPv1 && version != RIPv2)
{
vty_out (vty, "invalid rip version %d%s", version,
struct prefix_ipv4 p;
struct route_node *node;
- ret = str2prefix_ipv4 (argv[0], &p);
+ ret = str2prefix_ipv4 (argv[1]->arg, &p);
if (ret < 0)
{
vty_out (vty, "Malformed address%s", VTY_NEWLINE);
struct prefix_ipv4 p;
struct route_node *node;
- ret = str2prefix_ipv4 (argv[0], &p);
+ ret = str2prefix_ipv4 (argv[2]->arg, &p);
if (ret < 0)
{
vty_out (vty, "Malformed address%s", VTY_NEWLINE);
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[2]->arg,
VTY_NEWLINE);
return CMD_WARNING;
}
{
if (rip)
{
- rip->default_metric = atoi (argv[0]);
+ rip->default_metric = atoi (argv[1]->arg);
/* rip_update_default_metric (); */
}
return CMD_SUCCESS;
unsigned long RIP_TIMER_MAX = 2147483647;
unsigned long RIP_TIMER_MIN = 5;
- update = strtoul (argv[0], &endptr, 10);
+ update = strtoul (argv[2]->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[3]->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[4]->arg, &endptr, 10);
if (garbage > RIP_TIMER_MAX || garbage < RIP_TIMER_MIN || *endptr != '\0')
{
vty_out (vty, "garbage timer value error%s", VTY_NEWLINE);
"Administrative distance\n"
"Distance value\n")
{
- rip->distance = atoi (argv[0]);
+ rip->distance = atoi (argv[1]->arg);
return CMD_SUCCESS;
}
"Distance value\n"
"IP source prefix\n")
{
- rip_distance_set (vty, argv[0], argv[1], NULL);
+ rip_distance_set (vty, argv[1]->arg, argv[2]->arg, NULL);
return CMD_SUCCESS;
}
"Distance value\n"
"IP source prefix\n")
{
- rip_distance_unset (vty, argv[0], argv[1], NULL);
+ rip_distance_unset (vty, argv[2]->arg, argv[3]->arg, NULL);
return CMD_SUCCESS;
}
"IP source prefix\n"
"Access list name\n")
{
- rip_distance_set (vty, argv[0], argv[1], argv[2]);
+ rip_distance_set (vty, argv[1]->arg, argv[2]->arg, argv[3]->arg);
return CMD_SUCCESS;
}
"IP source prefix\n"
"Access list name\n")
{
- rip_distance_unset (vty, argv[0], argv[1], argv[2]);
+ rip_distance_unset (vty, argv[2]->arg, argv[3]->arg, argv[4]->arg);
return CMD_SUCCESS;
}
line = line.replace('" QUAGGA_IP_PROTOCOL_MAP_STR_ZEBRA "', '(kernel|connected|static|rip|ospf|isis|bgp|pim|table|any)')
line = line.replace('" QUAGGA_IP6_PROTOCOL_MAP_STR_ZEBRA "', '(kernel|connected|static|ripng|ospf6|isis|bgp|table|any)')
line = line.replace('" QUAGGA_REDIST_STR_RIPNGD "', '(kernel|connected|static|ospf6|isis|bgp|table)')
+ line = line.replace('" QUAGGA_REDIST_STR_RIPD "', '(kernel|connected|static|ospf|isis|bgp|pim|table)')
# endswith
line = line.replace('" CMD_AS_RANGE,', ' <1-4294967295>",')
line = line.replace('" QUAGGA_IP_PROTOCOL_MAP_STR_ZEBRA,', ' (kernel|connected|static|rip|ospf|isis|bgp|pim|table|any)",')
line = line.replace('" QUAGGA_IP6_PROTOCOL_MAP_STR_ZEBRA,', ' (kernel|connected|static|ripng|ospf6|isis|bgp|table|any)",')
line = line.replace('" QUAGGA_REDIST_STR_RIPNGD,', ' (kernel|connected|static|ospf6|isis|bgp|table)",')
+ line = line.replace('" QUAGGA_REDIST_STR_RIPD,', ' (kernel|connected|static|ospf|isis|bgp|pim|table)",')
# startswith
line = line.replace('LISTEN_RANGE_CMD "', '"bgp listen range (A.B.C.D/M|X:X::X:X/M) ')