return CMD_WARNING;
}
-/* add "match address" */
-DEFUN (ospf6_routemap_match_address_prefixlist,
- ospf6_routemap_match_address_prefixlist_cmd,
- "match ipv6 address prefix-list WORD",
- "Match values\n"
- IPV6_STR
- "Match address of route\n"
- "Match entries of prefix-lists\n"
- "IPv6 prefix-list name\n")
-{
- VTY_DECLVAR_CONTEXT(route_map_index, route_map_index);
- int idx_word = 4;
- int ret = route_map_add_match (route_map_index,
- "ipv6 address prefix-list", argv[idx_word]->arg);
- return route_map_command_status (vty, ret);
-}
-
-/* delete "match address" */
-DEFUN (ospf6_routemap_no_match_address_prefixlist,
- ospf6_routemap_no_match_address_prefixlist_cmd,
- "no match ipv6 address prefix-list WORD",
- NO_STR
- "Match values\n"
- IPV6_STR
- "Match address of route\n"
- "Match entries of prefix-lists\n"
- "IPv6 prefix-list name\n")
-{
- VTY_DECLVAR_CONTEXT(route_map_index, route_map_index);
- int idx_word = 5;
- int ret = route_map_delete_match (route_map_index,
- "ipv6 address prefix-list", argv[idx_word]->arg);
- return route_map_command_status (vty, ret);
-}
-
-/* "match interface" */
-DEFUN (ospf6_routemap_match_interface,
- ospf6_routemap_match_interface_cmd,
- "match interface WORD",
- MATCH_STR
- "Match first hop interface of route\n"
- "Interface name\n")
-{
- VTY_DECLVAR_CONTEXT(route_map_index, route_map_index);
- int idx_word = 2;
- return route_map_add_match (route_map_index,
- "interface", argv[idx_word]->arg);
-}
-
-/* "no match interface WORD" */
-DEFUN (ospf6_routemap_no_match_interface,
- ospf6_routemap_no_match_interface_cmd,
- "no match interface [WORD]",
- NO_STR
- MATCH_STR
- "Match first hop interface of route\n"
- "Interface name\n")
-{
- VTY_DECLVAR_CONTEXT(route_map_index, route_map_index);
- int idx_word = 3;
- int ret;
-
- if (argc == 4)
- ret = route_map_delete_match (route_map_index,
- "interface", argv[idx_word]->arg);
- else
- ret = route_map_delete_match (route_map_index,
- "interface", NULL);
- return route_map_command_status (vty, ret);
-}
-
/* add "set metric-type" */
DEFUN (ospf6_routemap_set_metric_type,
ospf6_routemap_set_metric_type_cmd,
return route_map_command_status (vty, ret);
}
-/* add "set tag" */
-DEFUN (ospf6_routemap_set_tag,
- ospf6_routemap_set_tag_cmd,
- "set tag (1-4294967295)",
- "Set value\n"
- "Tag value for routing protocol\n"
- "Tag value\n")
-{
- VTY_DECLVAR_CONTEXT(route_map_index, route_map_index);
- int ret = route_map_add_set (route_map_index,
- "tag", argv[2]->arg);
- return route_map_command_status (vty, ret);
-}
-
-/* delete "set tag" */
-DEFUN (ospf6_routemap_no_set_tag,
- ospf6_routemap_no_set_tag_cmd,
- "no set tag [(1-4294967295)]",
- NO_STR
- "Set value\n"
- "Tag value for routing protocol\n"
- "Tag value\n")
-{
- char *tag = (argc == 4) ? argv[3]->arg : NULL;
- VTY_DECLVAR_CONTEXT (route_map_index, index);
- int ret = route_map_delete_set (index, "tag", tag);
- return route_map_command_status (vty, ret);
-}
-
static void
ospf6_routemap_init (void)
{
route_map_install_set (&ospf6_routemap_rule_set_forwarding_cmd);
route_map_install_set (&ospf6_routemap_rule_set_tag_cmd);
- /* Match address prefix-list */
- install_element (RMAP_NODE, &ospf6_routemap_match_address_prefixlist_cmd);
- install_element (RMAP_NODE, &ospf6_routemap_no_match_address_prefixlist_cmd);
-
- /* Match interface */
- install_element (RMAP_NODE, &ospf6_routemap_match_interface_cmd);
- install_element (RMAP_NODE, &ospf6_routemap_no_match_interface_cmd);
-
/* ASE Metric Type (e.g. Type-1/Type-2) */
install_element (RMAP_NODE, &ospf6_routemap_set_metric_type_cmd);
install_element (RMAP_NODE, &ospf6_routemap_no_set_metric_type_cmd);
/* ASE Metric */
install_element (RMAP_NODE, &ospf6_routemap_set_forwarding_cmd);
install_element (RMAP_NODE, &ospf6_routemap_no_set_forwarding_cmd);
-
- /* Tag */
- install_element (RMAP_NODE, &ospf6_routemap_set_tag_cmd);
- install_element (RMAP_NODE, &ospf6_routemap_no_set_tag_cmd);
}