summaryrefslogtreecommitdiff
path: root/lib/routemap_cli.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/routemap_cli.c')
-rw-r--r--lib/routemap_cli.c49
1 files changed, 25 insertions, 24 deletions
diff --git a/lib/routemap_cli.c b/lib/routemap_cli.c
index e2db511fc0..d7d4a9a81f 100644
--- a/lib/routemap_cli.c
+++ b/lib/routemap_cli.c
@@ -103,7 +103,8 @@ DEFPY_YANG(
return nb_cli_apply_changes(vty, NULL);
}
-int route_map_instance_cmp(struct lyd_node *dnode1, struct lyd_node *dnode2)
+int route_map_instance_cmp(const struct lyd_node *dnode1,
+ const struct lyd_node *dnode2)
{
uint16_t seq1 = yang_dnode_get_uint16(dnode1, "./sequence");
uint16_t seq2 = yang_dnode_get_uint16(dnode2, "./sequence");
@@ -111,7 +112,7 @@ int route_map_instance_cmp(struct lyd_node *dnode1, struct lyd_node *dnode2)
return seq1 - seq2;
}
-void route_map_instance_show(struct vty *vty, struct lyd_node *dnode,
+void route_map_instance_show(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
const char *name = yang_dnode_get_string(dnode, "../name");
@@ -122,7 +123,7 @@ void route_map_instance_show(struct vty *vty, struct lyd_node *dnode,
}
-void route_map_instance_show_end(struct vty *vty, struct lyd_node *dnode)
+void route_map_instance_show_end(struct vty *vty, const struct lyd_node *dnode)
{
vty_out(vty, "exit\n");
vty_out(vty, "!\n");
@@ -165,7 +166,7 @@ DEFPY_YANG(
DEFPY_YANG(
match_ip_address, match_ip_address_cmd,
- "match ip address WORD$name",
+ "match ip address ACCESSLIST4_NAME$name",
MATCH_STR
IP_STR
"Match address of route\n"
@@ -185,7 +186,7 @@ DEFPY_YANG(
DEFPY_YANG(
no_match_ip_address, no_match_ip_address_cmd,
- "no match ip address [WORD]",
+ "no match ip address [ACCESSLIST4_NAME]",
NO_STR
MATCH_STR
IP_STR
@@ -203,7 +204,7 @@ DEFPY_YANG(
DEFPY_YANG(
match_ip_address_prefix_list,
match_ip_address_prefix_list_cmd,
- "match ip address prefix-list WORD$name",
+ "match ip address prefix-list PREFIXLIST_NAME$name",
MATCH_STR
IP_STR
"Match address of route\n"
@@ -224,7 +225,7 @@ DEFPY_YANG(
DEFPY_YANG(
no_match_ip_address_prefix_list, no_match_ip_address_prefix_list_cmd,
- "no match ip address prefix-list [WORD]",
+ "no match ip address prefix-list [PREFIXLIST_NAME]",
NO_STR
MATCH_STR
IP_STR
@@ -242,7 +243,7 @@ DEFPY_YANG(
DEFPY_YANG(
match_ip_next_hop, match_ip_next_hop_cmd,
- "match ip next-hop WORD$name",
+ "match ip next-hop ACCESSLIST4_NAME$name",
MATCH_STR
IP_STR
"Match next-hop address of route\n"
@@ -262,7 +263,7 @@ DEFPY_YANG(
DEFPY_YANG(
no_match_ip_next_hop, no_match_ip_next_hop_cmd,
- "no match ip next-hop [WORD]",
+ "no match ip next-hop [ACCESSLIST4_NAME]",
NO_STR
MATCH_STR
IP_STR
@@ -280,7 +281,7 @@ DEFPY_YANG(
DEFPY_YANG(
match_ip_next_hop_prefix_list,
match_ip_next_hop_prefix_list_cmd,
- "match ip next-hop prefix-list WORD$name",
+ "match ip next-hop prefix-list PREFIXLIST_NAME$name",
MATCH_STR
IP_STR
"Match next-hop address of route\n"
@@ -302,7 +303,7 @@ DEFPY_YANG(
DEFPY_YANG(
no_match_ip_next_hop_prefix_list,
no_match_ip_next_hop_prefix_list_cmd,
- "no match ip next-hop prefix-list [WORD]",
+ "no match ip next-hop prefix-list [PREFIXLIST_NAME]",
NO_STR
MATCH_STR
IP_STR
@@ -357,7 +358,7 @@ DEFPY_YANG(
DEFPY_YANG(
match_ipv6_address, match_ipv6_address_cmd,
- "match ipv6 address WORD$name",
+ "match ipv6 address ACCESSLIST6_NAME$name",
MATCH_STR
IPV6_STR
"Match IPv6 address of route\n"
@@ -377,7 +378,7 @@ DEFPY_YANG(
DEFPY_YANG(
no_match_ipv6_address, no_match_ipv6_address_cmd,
- "no match ipv6 address [WORD]",
+ "no match ipv6 address [ACCESSLIST6_NAME]",
NO_STR
MATCH_STR
IPV6_STR
@@ -394,7 +395,7 @@ DEFPY_YANG(
DEFPY_YANG(
match_ipv6_address_prefix_list, match_ipv6_address_prefix_list_cmd,
- "match ipv6 address prefix-list WORD$name",
+ "match ipv6 address prefix-list PREFIXLIST_NAME$name",
MATCH_STR
IPV6_STR
"Match address of route\n"
@@ -416,7 +417,7 @@ DEFPY_YANG(
DEFPY_YANG(
no_match_ipv6_address_prefix_list,
no_match_ipv6_address_prefix_list_cmd,
- "no match ipv6 address prefix-list [WORD]",
+ "no match ipv6 address prefix-list [PREFIXLIST_NAME]",
NO_STR
MATCH_STR
IPV6_STR
@@ -538,11 +539,11 @@ DEFPY_YANG(
return nb_cli_apply_changes(vty, NULL);
}
-void route_map_condition_show(struct vty *vty, struct lyd_node *dnode,
+void route_map_condition_show(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
const char *condition = yang_dnode_get_string(dnode, "./condition");
- struct lyd_node *ln;
+ const struct lyd_node *ln;
const char *acl;
if (IS_MATCH_INTERFACE(condition)) {
@@ -1013,11 +1014,11 @@ DEFUN_YANG (no_set_srte_color,
}
-void route_map_action_show(struct vty *vty, struct lyd_node *dnode,
+void route_map_action_show(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
const char *action = yang_dnode_get_string(dnode, "./action");
- struct lyd_node *ln;
+ const struct lyd_node *ln;
const char *acl;
if (IS_SET_IPv4_NH(action)) {
@@ -1355,7 +1356,7 @@ ALIAS_YANG(
"Continue on a different entry within the route-map\n"
"Route-map entry sequence number\n")
-void route_map_exit_policy_show(struct vty *vty, struct lyd_node *dnode,
+void route_map_exit_policy_show(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
int exit_policy = yang_dnode_get_enum(dnode, NULL);
@@ -1397,7 +1398,7 @@ DEFPY_YANG(
return nb_cli_apply_changes(vty, NULL);
}
-void route_map_call_show(struct vty *vty, struct lyd_node *dnode,
+void route_map_call_show(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " call %s\n", yang_dnode_get_string(dnode, NULL));
@@ -1431,7 +1432,7 @@ DEFUN_YANG (no_rmap_description,
return nb_cli_apply_changes(vty, NULL);
}
-void route_map_description_show(struct vty *vty, struct lyd_node *dnode,
+void route_map_description_show(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " description %s\n", yang_dnode_get_string(dnode, NULL));
@@ -1460,7 +1461,7 @@ DEFPY_YANG(
}
void route_map_optimization_disabled_show(struct vty *vty,
- struct lyd_node *dnode,
+ const struct lyd_node *dnode,
bool show_defaults)
{
const char *name = yang_dnode_get_string(dnode, "../name");
@@ -1507,7 +1508,7 @@ DEFPY_HIDDEN(
static int route_map_config_write(struct vty *vty)
{
- struct lyd_node *dnode;
+ const struct lyd_node *dnode;
int written = 0;
dnode = yang_dnode_get(running_config->dnode,