return CMD_SUCCESS;
}
-/* N.B. the "detail" modifier is a no-op. we leave this command
- for legacy compatibility. */
-DEFUN_DEPRECATED (debug_rip_packet_detail,
- debug_rip_packet_detail_cmd,
- "debug rip packet (recv|send) detail",
- DEBUG_STR
- RIP_STR
- "RIP packet\n"
- "RIP receive packet\n"
- "RIP send packet\n"
- "Detailed information display\n")
-{
- rip_debug_packet |= RIP_DEBUG_PACKET;
- if (strncmp ("send", argv[0], strlen (argv[0])) == 0)
- rip_debug_packet |= RIP_DEBUG_SEND;
- if (strncmp ("recv", argv[0], strlen (argv[0])) == 0)
- rip_debug_packet |= RIP_DEBUG_RECV;
- return CMD_SUCCESS;
-}
-
DEFUN (debug_rip_zebra,
debug_rip_zebra_cmd,
"debug rip zebra",
install_element (ENABLE_NODE, &debug_rip_events_cmd);
install_element (ENABLE_NODE, &debug_rip_packet_cmd);
install_element (ENABLE_NODE, &debug_rip_packet_direct_cmd);
- install_element (ENABLE_NODE, &debug_rip_packet_detail_cmd);
install_element (ENABLE_NODE, &debug_rip_zebra_cmd);
install_element (ENABLE_NODE, &no_debug_rip_events_cmd);
install_element (ENABLE_NODE, &no_debug_rip_packet_cmd);
install_element (CONFIG_NODE, &debug_rip_events_cmd);
install_element (CONFIG_NODE, &debug_rip_packet_cmd);
install_element (CONFIG_NODE, &debug_rip_packet_direct_cmd);
- install_element (CONFIG_NODE, &debug_rip_packet_detail_cmd);
install_element (CONFIG_NODE, &debug_rip_zebra_cmd);
install_element (CONFIG_NODE, &no_debug_rip_events_cmd);
install_element (CONFIG_NODE, &no_debug_rip_packet_cmd);
"Debug option set for send packet\n")
{
ripng_debug_packet |= RIPNG_DEBUG_PACKET;
- if (strncmp ("send", argv[0], strlen (argv[0])) == 0)
+ if (strncmp ("send", argv[3]->arg, strlen (argv[3]->arg)) == 0)
ripng_debug_packet |= RIPNG_DEBUG_SEND;
- if (strncmp ("recv", argv[0], strlen (argv[0])) == 0)
- ripng_debug_packet |= RIPNG_DEBUG_RECV;
-
- return CMD_SUCCESS;
-}
-
-/* N.B. the "detail" modifier is a no-op. we leave this command
- for legacy compatibility. */
-DEFUN_DEPRECATED (debug_ripng_packet_detail,
- debug_ripng_packet_detail_cmd,
- "debug ripng packet (recv|send) detail",
- DEBUG_STR
- "RIPng configuration\n"
- "Debug option set for ripng packet\n"
- "Debug option set for receive packet\n"
- "Debug option set for send packet\n"
- "Debug option set detaied information\n")
-{
- ripng_debug_packet |= RIPNG_DEBUG_PACKET;
- if (strncmp ("send", argv[0], strlen (argv[0])) == 0)
- ripng_debug_packet |= RIPNG_DEBUG_SEND;
- if (strncmp ("recv", argv[0], strlen (argv[0])) == 0)
+ if (strncmp ("recv", argv[3]->arg, strlen (argv[3]->arg)) == 0)
ripng_debug_packet |= RIPNG_DEBUG_RECV;
return CMD_SUCCESS;
"Debug option set for receive packet\n"
"Debug 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_RIPNG_DEBUG_RECV)
ripng_debug_packet &= ~RIPNG_DEBUG_SEND;
else
ripng_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_RIPNG_DEBUG_SEND)
ripng_debug_packet &= ~RIPNG_DEBUG_RECV;
install_element (ENABLE_NODE, &debug_ripng_events_cmd);
install_element (ENABLE_NODE, &debug_ripng_packet_cmd);
install_element (ENABLE_NODE, &debug_ripng_packet_direct_cmd);
- install_element (ENABLE_NODE, &debug_ripng_packet_detail_cmd);
install_element (ENABLE_NODE, &debug_ripng_zebra_cmd);
install_element (ENABLE_NODE, &no_debug_ripng_events_cmd);
install_element (ENABLE_NODE, &no_debug_ripng_packet_cmd);
install_element (CONFIG_NODE, &debug_ripng_events_cmd);
install_element (CONFIG_NODE, &debug_ripng_packet_cmd);
install_element (CONFIG_NODE, &debug_ripng_packet_direct_cmd);
- install_element (CONFIG_NODE, &debug_ripng_packet_detail_cmd);
install_element (CONFIG_NODE, &debug_ripng_zebra_cmd);
install_element (CONFIG_NODE, &no_debug_ripng_events_cmd);
install_element (CONFIG_NODE, &no_debug_ripng_packet_cmd);
int ret;
struct prefix p;
- ret = str2prefix (argv[0], &p);
+ ret = str2prefix (argv[1]->arg, &p);
/* Given string is IPv6 network or interface name. */
if (ret)
ret = ripng_enable_network_add (&p);
else
- ret = ripng_enable_if_add (argv[0]);
+ ret = ripng_enable_if_add (argv[1]->arg);
if (ret < 0)
{
- vty_out (vty, "There is same network configuration %s%s", argv[0],
+ vty_out (vty, "There is same network configuration %s%s", argv[1]->arg,
VTY_NEWLINE);
return CMD_WARNING;
}
int ret;
struct prefix p;
- ret = str2prefix (argv[0], &p);
+ ret = str2prefix (argv[2]->arg, &p);
/* Given string is interface name. */
if (ret)
ret = ripng_enable_network_delete (&p);
else
- ret = ripng_enable_if_delete (argv[0]);
+ ret = ripng_enable_if_delete (argv[2]->arg);
if (ret < 0)
{
- vty_out (vty, "can't find network %s%s", argv[0],
+ vty_out (vty, "can't find network %s%s", argv[2]->arg,
VTY_NEWLINE);
return CMD_WARNING;
}
"Suppress routing updates on an interface\n"
"Interface name\n")
{
- return ripng_passive_interface_set (vty, argv[0]);
+ return ripng_passive_interface_set (vty, argv[1]->arg);
}
DEFUN (no_ripng_passive_interface,
"Suppress routing updates on an interface\n"
"Interface name\n")
{
- return ripng_passive_interface_unset (vty, argv[0]);
+ return ripng_passive_interface_unset (vty, argv[2]->arg);
}
static struct ripng_interface *
"For outgoing updates\n"
"Metric value\n")
{
- return ripng_offset_list_set (vty, argv[0], argv[1], argv[2], NULL);
+ return ripng_offset_list_set (vty, argv[1]->arg, argv[2]->arg, argv[3]->arg, NULL);
}
DEFUN (ripng_offset_list_ifname,
"Metric value\n"
"Interface to match\n")
{
- return ripng_offset_list_set (vty, argv[0], argv[1], argv[2], argv[3]);
+ return ripng_offset_list_set (vty, argv[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg);
}
DEFUN (no_ripng_offset_list,
"For outgoing updates\n"
"Metric value\n")
{
- return ripng_offset_list_unset (vty, argv[0], argv[1], argv[2], NULL);
+ return ripng_offset_list_unset (vty, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL);
}
DEFUN (no_ripng_offset_list_ifname,
"Metric value\n"
"Interface to match\n")
{
- return ripng_offset_list_unset (vty, argv[0], argv[1], argv[2], argv[3]);
+ return ripng_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 ripng_route_match_add (vty, vty->index, "metric", argv[0]);
+ return ripng_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 ripng_route_match_delete (vty, vty->index, "metric", NULL);
-
- return ripng_route_match_delete (vty, vty->index, "metric", argv[0]);
+ return ripng_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 ripng_route_match_add (vty, vty->index, "interface", argv[0]);
+ return ripng_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 ripng_route_match_delete (vty, vty->index, "interface", NULL);
-
- return ripng_route_match_delete (vty, vty->index, "interface", argv[0]);
+ return ripng_route_match_delete (vty, vty->index, "interface", argv[3]->arg);
}
ALIAS (no_match_interface,
"Match tag of route\n"
"Metric value\n")
{
- return ripng_route_match_add (vty, vty->index, "tag", argv[0]);
+ return ripng_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 ripng_route_match_delete (vty, vty->index, "tag", NULL);
-
- return ripng_route_match_delete (vty, vty->index, "tag", argv[0]);
+ return ripng_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 ripng_route_set_add (vty, vty->index, "metric", argv[0]);
+ return ripng_route_set_add (vty, vty->index, "metric", argv[2]->arg);
}
DEFUN (no_set_metric,
SET_STR
"Metric value for destination routing protocol\n")
{
- if (argc == 0)
- return ripng_route_set_delete (vty, vty->index, "metric", NULL);
-
- return ripng_route_set_delete (vty, vty->index, "metric", argv[0]);
+ return ripng_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[4]->arg, &su);
if (ret < 0)
{
vty_out (vty, "%% Malformed next-hop local address%s", VTY_NEWLINE);
return CMD_WARNING;
}
- return ripng_route_set_add (vty, vty->index, "ipv6 next-hop local", argv[0]);
+ return ripng_route_set_add (vty, vty->index, "ipv6 next-hop local", argv[4]->arg);
}
DEFUN (no_set_ipv6_nexthop_local,
"IPv6 next-hop address\n"
"IPv6 local address\n")
{
- if (argc == 0)
- return ripng_route_set_delete (vty, vty->index, "ipv6 next-hop local", NULL);
-
- return ripng_route_set_delete (vty, vty->index, "ipv6 next-hop local", argv[0]);
+ return ripng_route_set_delete (vty, vty->index, "ipv6 next-hop local", argv[5]->arg);
}
ALIAS (no_set_ipv6_nexthop_local,
"Tag value for routing protocol\n"
"Tag value\n")
{
- return ripng_route_set_add (vty, vty->index, "tag", argv[0]);
+ return ripng_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 ripng_route_set_delete (vty, vty->index, "tag", NULL);
-
- return ripng_route_set_delete (vty, vty->index, "tag", argv[0]);
+ return ripng_route_set_delete (vty, vty->index, "tag", argv[3]->arg);
}
ALIAS (no_set_tag,
{
int type;
- type = proto_redistnum(AFI_IP6, argv[0]);
+ type = proto_redistnum(AFI_IP6, argv[2]->arg);
if (type < 0)
{
- vty_out(vty, "Invalid type %s%s", argv[0], VTY_NEWLINE);
+ vty_out(vty, "Invalid type %s%s", argv[2]->arg, VTY_NEWLINE);
return CMD_WARNING;
}
{
int type;
- type = proto_redistnum(AFI_IP6, argv[0]);
+ type = proto_redistnum(AFI_IP6, argv[3]->arg);
if (type < 0)
{
- vty_out(vty, "Invalid type %s%s", argv[0], VTY_NEWLINE);
+ vty_out(vty, "Invalid type %s%s", argv[3]->arg, VTY_NEWLINE);
return CMD_WARNING;
}
int type;
int metric;
- metric = atoi (argv[1]);
- type = proto_redistnum(AFI_IP6, argv[0]);
+ metric = atoi (argv[3]->arg);
+ type = proto_redistnum(AFI_IP6, argv[1]->arg);
if (type < 0)
{
- vty_out(vty, "Invalid type %s%s", argv[0], VTY_NEWLINE);
+ vty_out(vty, "Invalid type %s%s", argv[1]->arg, VTY_NEWLINE);
return CMD_WARNING;
}
{
int type;
- type = proto_redistnum(AFI_IP6, argv[0]);
+ type = proto_redistnum(AFI_IP6, argv[1]->arg);
if (type < 0)
{
- vty_out(vty, "Invalid type %s%s", argv[0], VTY_NEWLINE);
+ vty_out(vty, "Invalid type %s%s", argv[1]->arg, VTY_NEWLINE);
return CMD_WARNING;
}
- ripng_redistribute_routemap_set (type, argv[1]);
+ ripng_redistribute_routemap_set (type, argv[3]->arg);
zclient_redistribute (ZEBRA_REDISTRIBUTE_ADD, zclient, AFI_IP6, type, 0,
VRF_DEFAULT);
return CMD_SUCCESS;
int type;
int metric;
- type = proto_redistnum(AFI_IP6, argv[0]);
- metric = atoi (argv[1]);
+ type = proto_redistnum(AFI_IP6, argv[1]->arg);
+ metric = atoi (argv[3]->arg);
if (type < 0)
{
- vty_out(vty, "Invalid type %s%s", argv[0], VTY_NEWLINE);
+ vty_out(vty, "Invalid type %s%s", argv[1]->arg, VTY_NEWLINE);
return CMD_WARNING;
}
ripng_redistribute_metric_set (type, metric);
- ripng_redistribute_routemap_set (type, argv[2]);
+ ripng_redistribute_routemap_set (type, argv[5]->arg);
zclient_redistribute (ZEBRA_REDISTRIBUTE_ADD, zclient, AFI_IP6, type, 0, VRF_DEFAULT);
return CMD_SUCCESS;
}
struct prefix_ipv6 p;
struct route_node *rp;
- ret = str2prefix_ipv6 (argv[0], (struct prefix_ipv6 *)&p);
+ ret = str2prefix_ipv6 (argv[1]->arg, (struct prefix_ipv6 *)&p);
if (ret <= 0)
{
vty_out (vty, "Malformed address%s", VTY_NEWLINE);
struct prefix_ipv6 p;
struct route_node *rp;
- ret = str2prefix_ipv6 (argv[0], (struct prefix_ipv6 *)&p);
+ ret = str2prefix_ipv6 (argv[2]->arg, (struct prefix_ipv6 *)&p);
if (ret <= 0)
{
vty_out (vty, "Malformed address%s", VTY_NEWLINE);
struct prefix p;
struct route_node *node;
- ret = str2prefix_ipv6 (argv[0], (struct prefix_ipv6 *)&p);
+ ret = str2prefix_ipv6 (argv[1]->arg, (struct prefix_ipv6 *)&p);
if (ret <= 0)
{
vty_out (vty, "Malformed address%s", VTY_NEWLINE);
struct prefix p;
struct route_node *rn;
- ret = str2prefix_ipv6 (argv[0], (struct prefix_ipv6 *) &p);
+ ret = str2prefix_ipv6 (argv[2]->arg, (struct prefix_ipv6 *) &p);
if (ret <= 0)
{
vty_out (vty, "Malformed address%s", VTY_NEWLINE);
{
if (ripng)
{
- ripng->default_metric = atoi (argv[0]);
+ ripng->default_metric = atoi (argv[1]->arg);
}
return CMD_SUCCESS;
}
unsigned long timeout;
unsigned long garbage;
- VTY_GET_INTEGER_RANGE("update timer", update, argv[0], 0, 65535);
- VTY_GET_INTEGER_RANGE("timeout timer", timeout, argv[1], 0, 65535);
- VTY_GET_INTEGER_RANGE("garbage timer", garbage, argv[2], 0, 65535);
+ VTY_GET_INTEGER_RANGE("update timer", update, argv[2]->arg, 0, 65535);
+ VTY_GET_INTEGER_RANGE("timeout timer", timeout, argv[3]->arg, 0, 65535);
+ VTY_GET_INTEGER_RANGE("garbage timer", garbage, argv[4]->arg, 0, 65535);
/* Set each timer value. */
ripng->update_time = update;
"Routing information timeout timer. Default is 180.\n"
"Garbage collection timer. Default is 120.\n")
-DEFUN (show_ipv6_protocols, show_ipv6_protocols_cmd,
+DEFUN (show_ipv6_protocols,
+ show_ipv6_protocols_cmd,
"show ipv6 protocols",
SHOW_STR
IPV6_STR
'.LINE', # where is this defined?
'LINE',
'BANDWIDTH',
+ 'IPV6ADDR',
+ 'IF_OR_ADDR',
'INTERFACE',
'PERCENTAGE',
'IFNAME',
line = line.replace('" VRF_ALL_CMD_STR "', 'vrf all')
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)')
# endswith
line = line.replace('" CMD_AS_RANGE,', ' <1-4294967295>",')
line = line.replace('" CMD_RANGE_STR(1, MULTIPATH_NUM),', '<1-255>",')
line = line.replace('" CMD_RANGE_STR(1, MAXTTL),', '<1-255>",')
line = line.replace('" BFD_CMD_DETECT_MULT_RANGE BFD_CMD_MIN_RX_RANGE BFD_CMD_MIN_TX_RANGE,', '<2-255> <50-60000> <50-60000>",')
- line = line.replace('" OSPF_LSA_TYPES_CMD_STR,', ' asbr-summary|external|network|router|summary|nssa-external|opaque-link|opaque-area|opaque-as",')
-
+ line = line.replace('" OSPF_LSA_TYPES_CMD_STR,',
+ ' asbr-summary|external|network|router|summary|nssa-external|opaque-link|opaque-area|opaque-as",')
line = line.replace('" BGP_UPDATE_SOURCE_REQ_STR,', ' (A.B.C.D|X:X::X:X|WORD)",')
line = line.replace('" BGP_UPDATE_SOURCE_OPT_STR,', ' {A.B.C.D|X:X::X:X|WORD}",')
line = line.replace('" QUAGGA_IP_REDIST_STR_BGPD,', ' (kernel|connected|static|rip|ospf|isis|pim|table)",')
line = line.replace('" QUAGGA_IP6_REDIST_STR_ZEBRA,', ' (kernel|connected|static|ripng|ospf6|isis|bgp|table)",')
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)",')
# startswith
line = line.replace('LISTEN_RANGE_CMD "', '"bgp listen range (A.B.C.D/M|X:X::X:X/M) ')