mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-09 09:46:54 +00:00
* routemap.[ch]: Added "description ..." command.
Closes Bugzilla #167.
This commit is contained in:
parent
3a2ce6a14e
commit
4a8164e5b3
@ -1,3 +1,7 @@
|
|||||||
|
2005-04-08 Hasso Tepper <hasso at quagga.net>
|
||||||
|
|
||||||
|
* routemap.[ch]: Added "description ..." command.
|
||||||
|
|
||||||
2005-04-08 Hasso Tepper <hasso at quagga.net>
|
2005-04-08 Hasso Tepper <hasso at quagga.net>
|
||||||
|
|
||||||
* prefix.[hc]: Pass argument to the inet6_ntoa by value making it more
|
* prefix.[hc]: Pass argument to the inet6_ntoa by value making it more
|
||||||
|
@ -1188,6 +1188,42 @@ DEFUN (no_rmap_call,
|
|||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DEFUN (rmap_description,
|
||||||
|
rmap_description_cmd,
|
||||||
|
"description .LINE",
|
||||||
|
"Route-map comment\n"
|
||||||
|
"Comment describing this route-map rule\n")
|
||||||
|
{
|
||||||
|
struct route_map_index *index;
|
||||||
|
|
||||||
|
index = vty->index;
|
||||||
|
if (index)
|
||||||
|
{
|
||||||
|
if (index->description)
|
||||||
|
XFREE (MTYPE_TMP, index->description);
|
||||||
|
index->description = argv_concat (argv, argc, 0);
|
||||||
|
}
|
||||||
|
return CMD_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
DEFUN (no_rmap_description,
|
||||||
|
no_rmap_description_cmd,
|
||||||
|
"no description",
|
||||||
|
NO_STR
|
||||||
|
"Route-map comment\n")
|
||||||
|
{
|
||||||
|
struct route_map_index *index;
|
||||||
|
|
||||||
|
index = vty->index;
|
||||||
|
if (index)
|
||||||
|
{
|
||||||
|
if (index->description)
|
||||||
|
XFREE (MTYPE_TMP, index->description);
|
||||||
|
index->description = NULL;
|
||||||
|
}
|
||||||
|
return CMD_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
/* Configuration write function. */
|
/* Configuration write function. */
|
||||||
int
|
int
|
||||||
route_map_config_write (struct vty *vty)
|
route_map_config_write (struct vty *vty)
|
||||||
@ -1211,6 +1247,9 @@ route_map_config_write (struct vty *vty)
|
|||||||
route_map_type_str (index->type),
|
route_map_type_str (index->type),
|
||||||
index->pref, VTY_NEWLINE);
|
index->pref, VTY_NEWLINE);
|
||||||
|
|
||||||
|
if (index->description)
|
||||||
|
vty_out (vty, " description %s%s", index->description, VTY_NEWLINE);
|
||||||
|
|
||||||
for (rule = index->match_list.head; rule; rule = rule->next)
|
for (rule = index->match_list.head; rule; rule = rule->next)
|
||||||
vty_out (vty, " match %s %s%s", rule->cmd->str,
|
vty_out (vty, " match %s %s%s", rule->cmd->str,
|
||||||
rule->rule_str ? rule->rule_str : "",
|
rule->rule_str ? rule->rule_str : "",
|
||||||
@ -1269,6 +1308,10 @@ route_map_init_vty ()
|
|||||||
install_element (RMAP_NODE, &rmap_call_cmd);
|
install_element (RMAP_NODE, &rmap_call_cmd);
|
||||||
install_element (RMAP_NODE, &no_rmap_call_cmd);
|
install_element (RMAP_NODE, &no_rmap_call_cmd);
|
||||||
|
|
||||||
|
/* Install description commands. */
|
||||||
|
install_element (RMAP_NODE, &rmap_description_cmd);
|
||||||
|
install_element (RMAP_NODE, &no_rmap_description_cmd);
|
||||||
|
|
||||||
/* Install show command */
|
/* Install show command */
|
||||||
install_element (ENABLE_NODE, &rmap_show_cmd);
|
install_element (ENABLE_NODE, &rmap_show_cmd);
|
||||||
install_element (ENABLE_NODE, &rmap_show_name_cmd);
|
install_element (ENABLE_NODE, &rmap_show_name_cmd);
|
||||||
|
@ -108,6 +108,7 @@ struct route_map_rule_list
|
|||||||
struct route_map_index
|
struct route_map_index
|
||||||
{
|
{
|
||||||
struct route_map *map;
|
struct route_map *map;
|
||||||
|
char *description;
|
||||||
|
|
||||||
/* Preference of this route map rule. */
|
/* Preference of this route map rule. */
|
||||||
int pref;
|
int pref;
|
||||||
|
Loading…
Reference in New Issue
Block a user