summaryrefslogtreecommitdiff
path: root/zebra/zebra_vty.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/zebra_vty.c')
-rw-r--r--zebra/zebra_vty.c1182
1 files changed, 950 insertions, 232 deletions
diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c
index 505da4923c..99d7bd6fdb 100644
--- a/zebra/zebra_vty.c
+++ b/zebra/zebra_vty.c
@@ -201,7 +201,10 @@ DEFUN (ip_mroute_dist,
"Nexthop interface name\n"
"Distance\n")
{
- return zebra_static_ipv4 (vty, SAFI_MULTICAST, 1, argv[2]->arg, NULL, argv[3]->arg, NULL, NULL, argc > 2 ? argv[4]->arg : NULL, NULL);
+ int idx_ipv4_prefixlen = 2;
+ int idx_ipv4_ifname = 3;
+ int idx_number = 4;
+ return zebra_static_ipv4 (vty, SAFI_MULTICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname]->arg, NULL, NULL, argc > 2 ? argv[idx_number]->arg : NULL, NULL);
}
@@ -226,7 +229,10 @@ DEFUN (no_ip_mroute_dist,
"Nexthop interface name\n"
"Distance\n")
{
- return zebra_static_ipv4 (vty, SAFI_MULTICAST, 0, argv[3]->arg, NULL, argv[4]->arg, NULL, NULL, argc > 2 ? argv[5]->arg : NULL, NULL);
+ int idx_ipv4_prefixlen = 3;
+ int idx_ipv4_ifname = 4;
+ int idx_number = 5;
+ return zebra_static_ipv4 (vty, SAFI_MULTICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname]->arg, NULL, NULL, argc > 2 ? argv[idx_number]->arg : NULL, NULL);
}
@@ -242,16 +248,17 @@ DEFUN (ip_multicast_mode,
"Lookup both, use entry with lower distance\n"
"Lookup both, use entry with longer prefix\n")
{
+ int idx_rpf_lookup_mode = 3;
- if (!strncmp (argv[3]->arg, "u", 1))
+ if (!strncmp (argv[idx_rpf_lookup_mode]->arg, "u", 1))
multicast_mode_ipv4_set (MCAST_URIB_ONLY);
- else if (!strncmp (argv[3]->arg, "mrib-o", 6))
+ else if (!strncmp (argv[idx_rpf_lookup_mode]->arg, "mrib-o", 6))
multicast_mode_ipv4_set (MCAST_MRIB_ONLY);
- else if (!strncmp (argv[3]->arg, "mrib-t", 6))
+ else if (!strncmp (argv[idx_rpf_lookup_mode]->arg, "mrib-t", 6))
multicast_mode_ipv4_set (MCAST_MIX_MRIB_FIRST);
- else if (!strncmp (argv[3]->arg, "low", 3))
+ else if (!strncmp (argv[idx_rpf_lookup_mode]->arg, "low", 3))
multicast_mode_ipv4_set (MCAST_MIX_DISTANCE);
- else if (!strncmp (argv[3]->arg, "lon", 3))
+ else if (!strncmp (argv[idx_rpf_lookup_mode]->arg, "lon", 3))
multicast_mode_ipv4_set (MCAST_MIX_PFXLEN);
else
{
@@ -307,12 +314,13 @@ DEFUN (show_ip_rpf_addr,
"Display RPF information for multicast source\n"
"IP multicast source address (e.g. 10.0.0.0)\n")
{
+ int idx_ipv4 = 3;
struct in_addr addr;
struct route_node *rn;
struct rib *rib;
int ret;
- ret = inet_aton (argv[3]->arg, &addr);
+ ret = inet_aton (argv[idx_ipv4]->arg, &addr);
if (ret == 0)
{
vty_out (vty, "%% Malformed address%s", VTY_NEWLINE);
@@ -340,7 +348,9 @@ DEFUN (ip_route,
"IP gateway interface name\n"
"Null interface\n")
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, NULL, NULL,
+ int idx_ipv4_prefixlen = 2;
+ int idx_ipv4_ifname_null = 3;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname_null]->arg, NULL, NULL,
NULL, NULL);
}
@@ -356,7 +366,10 @@ DEFUN (ip_route_tag,
"Set tag for this route\n"
"Tag value\n")
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, NULL, argv[5]->arg,
+ int idx_ipv4_prefixlen = 2;
+ int idx_ipv4_ifname_null = 3;
+ int idx_number = 5;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname_null]->arg, NULL, argv[idx_number]->arg,
NULL, NULL);
}
@@ -371,7 +384,10 @@ DEFUN (ip_route_flags,
"Emit an ICMP unreachable when matched\n"
"Silently discard pkts when matched\n")
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, NULL,
+ int idx_ipv4_prefixlen = 2;
+ int idx_ipv4_ifname = 3;
+ int idx_reject_blackhole = 4;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, NULL,
NULL, NULL);
}
@@ -389,7 +405,11 @@ DEFUN (ip_route_flags_tag,
"Tag value\n")
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, argv[6]->arg,
+ int idx_ipv4_prefixlen = 2;
+ int idx_ipv4_ifname = 3;
+ int idx_reject_blackhole = 4;
+ int idx_number = 6;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg,
NULL, NULL);
}
@@ -402,7 +422,9 @@ DEFUN (ip_route_flags2,
"Emit an ICMP unreachable when matched\n"
"Silently discard pkts when matched\n")
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, NULL, argv[3]->arg, NULL,
+ int idx_ipv4_prefixlen = 2;
+ int idx_reject_blackhole = 3;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, NULL, argv[idx_reject_blackhole]->arg, NULL,
NULL, NULL);
}
@@ -418,7 +440,10 @@ DEFUN (ip_route_flags2_tag,
"Tag value\n")
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, NULL, argv[3]->arg, argv[5]->arg,
+ int idx_ipv4_prefixlen = 2;
+ int idx_reject_blackhole = 3;
+ int idx_number = 5;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg,
NULL, NULL);
}
@@ -434,7 +459,10 @@ DEFUN (ip_route_mask,
"IP gateway interface name\n"
"Null interface\n")
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, NULL,
+ int idx_ipv4 = 2;
+ int idx_ipv4_2 = 3;
+ int idx_ipv4_ifname_null = 4;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname_null]->arg, NULL, NULL,
NULL, NULL);
}
@@ -452,7 +480,11 @@ DEFUN (ip_route_mask_tag,
"Tag value\n")
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, argv[6]->arg,
+ int idx_ipv4 = 2;
+ int idx_ipv4_2 = 3;
+ int idx_ipv4_ifname_null = 4;
+ int idx_number = 6;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname_null]->arg, NULL, argv[idx_number]->arg,
NULL, NULL);
}
@@ -468,7 +500,11 @@ DEFUN (ip_route_mask_flags,
"Emit an ICMP unreachable when matched\n"
"Silently discard pkts when matched\n")
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL,
+ int idx_ipv4 = 2;
+ int idx_ipv4_2 = 3;
+ int idx_ipv4_ifname = 4;
+ int idx_reject_blackhole = 5;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, NULL,
NULL, NULL);
}
@@ -487,7 +523,12 @@ DEFUN (ip_route_mask_flags_tag,
"Tag value\n")
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[7]->arg,
+ int idx_ipv4 = 2;
+ int idx_ipv4_2 = 3;
+ int idx_ipv4_ifname = 4;
+ int idx_reject_blackhole = 5;
+ int idx_number = 7;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg,
NULL, NULL);
}
@@ -501,7 +542,10 @@ DEFUN (ip_route_mask_flags2,
"Emit an ICMP unreachable when matched\n"
"Silently discard pkts when matched\n")
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, NULL,
+ int idx_ipv4 = 2;
+ int idx_ipv4_2 = 3;
+ int idx_reject_blackhole = 4;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, NULL, argv[idx_reject_blackhole]->arg, NULL,
NULL, NULL);
}
@@ -517,7 +561,11 @@ DEFUN (ip_route_mask_flags2_tag,
"Set tag for this route\n"
"Tag value\n")
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, argv[6]->arg,
+ int idx_ipv4 = 2;
+ int idx_ipv4_2 = 3;
+ int idx_reject_blackhole = 4;
+ int idx_number = 6;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg,
NULL, NULL);
}
@@ -533,8 +581,11 @@ DEFUN (ip_route_distance,
"Null interface\n"
"Distance value for this route\n")
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, NULL, NULL,
- argv[4]->arg, NULL);
+ int idx_ipv4_prefixlen = 2;
+ int idx_ipv4_ifname_null = 3;
+ int idx_number = 4;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname_null]->arg, NULL, NULL,
+ argv[idx_number]->arg, NULL);
}
DEFUN (ip_route_tag_distance,
@@ -551,8 +602,12 @@ DEFUN (ip_route_tag_distance,
"Distance value for this route\n")
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, NULL, argv[5]->arg,
- argv[6]->arg, NULL);
+ int idx_ipv4_prefixlen = 2;
+ int idx_ipv4_ifname_null = 3;
+ int idx_number = 5;
+ int idx_number_2 = 6;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname_null]->arg, NULL, argv[idx_number]->arg,
+ argv[idx_number_2]->arg, NULL);
}
DEFUN (ip_route_flags_distance,
@@ -567,8 +622,12 @@ DEFUN (ip_route_flags_distance,
"Silently discard pkts when matched\n"
"Distance value for this route\n")
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, NULL,
- argv[5]->arg, NULL);
+ int idx_ipv4_prefixlen = 2;
+ int idx_ipv4_ifname = 3;
+ int idx_reject_blackhole = 4;
+ int idx_number = 5;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, NULL,
+ argv[idx_number]->arg, NULL);
}
DEFUN (ip_route_flags_tag_distance,
@@ -585,8 +644,13 @@ DEFUN (ip_route_flags_tag_distance,
"Tag value\n"
"Distance value for this route\n")
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, argv[6]->arg,
- argv[7]->arg, NULL);
+ int idx_ipv4_prefixlen = 2;
+ int idx_ipv4_ifname = 3;
+ int idx_reject_blackhole = 4;
+ int idx_number = 6;
+ int idx_number_2 = 7;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg,
+ argv[idx_number_2]->arg, NULL);
}
DEFUN (ip_route_flags_distance2,
@@ -599,8 +663,11 @@ DEFUN (ip_route_flags_distance2,
"Silently discard pkts when matched\n"
"Distance value for this route\n")
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, NULL, argv[3]->arg, NULL,
- argv[4]->arg, NULL);
+ int idx_ipv4_prefixlen = 2;
+ int idx_reject_blackhole = 3;
+ int idx_number = 4;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, NULL, argv[idx_reject_blackhole]->arg, NULL,
+ argv[idx_number]->arg, NULL);
}
DEFUN (ip_route_flags_tag_distance2,
@@ -615,8 +682,12 @@ DEFUN (ip_route_flags_tag_distance2,
"Tag value\n"
"Distance value for this route\n")
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, NULL, argv[3]->arg, argv[5]->arg,
- argv[6]->arg, NULL);
+ int idx_ipv4_prefixlen = 2;
+ int idx_reject_blackhole = 3;
+ int idx_number = 5;
+ int idx_number_2 = 6;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg,
+ argv[idx_number_2]->arg, NULL);
}
DEFUN (ip_route_mask_distance,
@@ -631,8 +702,12 @@ DEFUN (ip_route_mask_distance,
"Null interface\n"
"Distance value for this route\n")
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, NULL,
- argv[5]->arg, NULL);
+ int idx_ipv4 = 2;
+ int idx_ipv4_2 = 3;
+ int idx_ipv4_ifname_null = 4;
+ int idx_number = 5;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname_null]->arg, NULL, NULL,
+ argv[idx_number]->arg, NULL);
}
DEFUN (ip_route_mask_tag_distance,
@@ -649,8 +724,13 @@ DEFUN (ip_route_mask_tag_distance,
"Tag value\n"
"Distance value for this route\n")
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, argv[6]->arg,
- argv[7]->arg, NULL);
+ int idx_ipv4 = 2;
+ int idx_ipv4_2 = 3;
+ int idx_ipv4_ifname_null = 4;
+ int idx_number = 6;
+ int idx_number_2 = 7;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname_null]->arg, NULL, argv[idx_number]->arg,
+ argv[idx_number_2]->arg, NULL);
}
DEFUN (ip_route_mask_flags_tag_distance,
@@ -668,8 +748,14 @@ DEFUN (ip_route_mask_flags_tag_distance,
"Emit an ICMP unreachable when matched\n"
"Silently discard pkts when matched\n")
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[7]->arg,
- argv[8]->arg, NULL);
+ int idx_ipv4 = 2;
+ int idx_ipv4_2 = 3;
+ int idx_ipv4_ifname = 4;
+ int idx_reject_blackhole = 5;
+ int idx_number = 7;
+ int idx_number_2 = 8;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg,
+ argv[idx_number_2]->arg, NULL);
}
@@ -686,8 +772,13 @@ DEFUN (ip_route_mask_flags_distance,
"Silently discard pkts when matched\n"
"Distance value for this route\n")
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL,
- argv[6]->arg, NULL);
+ int idx_ipv4 = 2;
+ int idx_ipv4_2 = 3;
+ int idx_ipv4_ifname = 4;
+ int idx_reject_blackhole = 5;
+ int idx_number = 6;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, NULL,
+ argv[idx_number]->arg, NULL);
}
DEFUN (ip_route_mask_flags_distance2,
@@ -701,8 +792,12 @@ DEFUN (ip_route_mask_flags_distance2,
"Silently discard pkts when matched\n"
"Distance value for this route\n")
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, NULL,
- argv[5]->arg, NULL);
+ int idx_ipv4 = 2;
+ int idx_ipv4_2 = 3;
+ int idx_reject_blackhole = 4;
+ int idx_number = 5;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, NULL, argv[idx_reject_blackhole]->arg, NULL,
+ argv[idx_number]->arg, NULL);
}
DEFUN (ip_route_mask_flags_tag_distance2,
@@ -718,8 +813,13 @@ DEFUN (ip_route_mask_flags_tag_distance2,
"Emit an ICMP unreachable when matched\n"
"Silently discard pkts when matched\n")
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, argv[6]->arg,
- argv[7]->arg, NULL);
+ int idx_ipv4 = 2;
+ int idx_ipv4_2 = 3;
+ int idx_reject_blackhole = 4;
+ int idx_number = 6;
+ int idx_number_2 = 7;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg,
+ argv[idx_number_2]->arg, NULL);
}
/*
@@ -746,7 +846,9 @@ DEFUN (no_ip_route,
"IP gateway interface name\n"
"Null interface\n")
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, NULL, NULL,
+ int idx_ipv4_prefixlen = 3;
+ int idx_ipv4_ifname_null = 4;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname_null]->arg, NULL, NULL,
NULL, NULL);
}
@@ -778,7 +880,10 @@ DEFUN (no_ip_route_tag,
"Tag of this route\n"
"Tag value\n")
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, NULL, argv[6]->arg,
+ int idx_ipv4_prefixlen = 3;
+ int idx_ipv4_ifname_null = 4;
+ int idx_number = 6;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname_null]->arg, NULL, argv[idx_number]->arg,
NULL, NULL);
}
@@ -794,7 +899,8 @@ DEFUN (no_ip_route_flags2,
"Emit an ICMP unreachable when matched\n"
"Silently discard pkts when matched\n")
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, NULL, NULL, NULL,
+ int idx_ipv4_prefixlen = 3;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, NULL, NULL, NULL,
NULL, NULL);
}
@@ -810,7 +916,9 @@ DEFUN (no_ip_route_flags2_tag,
"Tag of this route\n"
"Tag value\n")
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, NULL, NULL, argv[4]->arg,
+ int idx_ipv4_prefixlen = 3;
+ int idx_reject_blackhole = 4;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, NULL, NULL, argv[idx_reject_blackhole]->arg,
NULL, NULL);
}
@@ -840,7 +948,10 @@ DEFUN (no_ip_route_mask,
"IP gateway interface name\n"
"Null interface\n")
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL,
+ int idx_ipv4 = 3;
+ int idx_ipv4_2 = 4;
+ int idx_ipv4_ifname_null = 5;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname_null]->arg, NULL, NULL,
NULL, NULL);
}
@@ -874,7 +985,11 @@ DEFUN (no_ip_route_mask_tag,
"Tag of this route\n"
"Tag value\n")
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[7]->arg,
+ int idx_ipv4 = 3;
+ int idx_ipv4_2 = 4;
+ int idx_ipv4_ifname_null = 5;
+ int idx_number = 7;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname_null]->arg, NULL, argv[idx_number]->arg,
NULL, NULL);
}
@@ -891,7 +1006,9 @@ DEFUN (no_ip_route_mask_flags2,
"Emit an ICMP unreachable when matched\n"
"Silently discard pkts when matched\n")
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, NULL, NULL, NULL,
+ int idx_ipv4 = 3;
+ int idx_ipv4_2 = 4;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, NULL, NULL, NULL,
NULL, NULL);
}
@@ -908,7 +1025,10 @@ DEFUN (no_ip_route_mask_flags2_tag,
"Tag of this route\n"
"Tag value\n")
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, NULL, NULL, argv[5]->arg,
+ int idx_ipv4 = 3;
+ int idx_ipv4_2 = 4;
+ int idx_reject_blackhole = 5;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, NULL, NULL, argv[idx_reject_blackhole]->arg,
NULL, NULL);
}
@@ -924,8 +1044,11 @@ DEFUN (no_ip_route_distance,
"Null interface\n"
"Distance value for this route\n")
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, NULL, NULL,
- argv[5]->arg, NULL);
+ int idx_ipv4_prefixlen = 3;
+ int idx_ipv4_ifname_null = 4;
+ int idx_number = 5;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname_null]->arg, NULL, NULL,
+ argv[idx_number]->arg, NULL);
}
DEFUN (no_ip_route_tag_distance,
@@ -942,8 +1065,12 @@ DEFUN (no_ip_route_tag_distance,
"Tag value\n"
"Distance value for this route\n")
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, NULL, argv[6]->arg,
- argv[7]->arg, NULL);
+ int idx_ipv4_prefixlen = 3;
+ int idx_ipv4_ifname_null = 4;
+ int idx_number = 6;
+ int idx_number_2 = 7;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname_null]->arg, NULL, argv[idx_number]->arg,
+ argv[idx_number_2]->arg, NULL);
}
DEFUN (no_ip_route_flags_distance,
@@ -959,8 +1086,12 @@ DEFUN (no_ip_route_flags_distance,
"Silently discard pkts when matched\n"
"Distance value for this route\n")
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, argv[5]->arg, NULL,
- argv[6]->arg, NULL);
+ int idx_ipv4_prefixlen = 3;
+ int idx_ipv4_ifname = 4;
+ int idx_reject_blackhole = 5;
+ int idx_number = 6;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, NULL,
+ argv[idx_number]->arg, NULL);
}
DEFUN (no_ip_route_flags_tag_distance,
@@ -978,8 +1109,13 @@ DEFUN (no_ip_route_flags_tag_distance,
"Tag value\n"
"Distance value for this route\n")
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, argv[5]->arg, argv[7]->arg,
- argv[8]->arg, NULL);
+ int idx_ipv4_prefixlen = 3;
+ int idx_ipv4_ifname = 4;
+ int idx_reject_blackhole = 5;
+ int idx_number = 7;
+ int idx_number_2 = 8;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg,
+ argv[idx_number_2]->arg, NULL);
}
DEFUN (no_ip_route_flags_distance2,
@@ -993,8 +1129,11 @@ DEFUN (no_ip_route_flags_distance2,
"Silently discard pkts when matched\n"
"Distance value for this route\n")
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, NULL, argv[4]->arg, NULL,
- argv[5]->arg, NULL);
+ int idx_ipv4_prefixlen = 3;
+ int idx_reject_blackhole = 4;
+ int idx_number = 5;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, NULL, argv[idx_reject_blackhole]->arg, NULL,
+ argv[idx_number]->arg, NULL);
}
DEFUN (no_ip_route_flags_tag_distance2,
@@ -1010,8 +1149,12 @@ DEFUN (no_ip_route_flags_tag_distance2,
"Tag value\n"
"Distance value for this route\n")
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, NULL, argv[4]->arg, argv[6]->arg,
- argv[7]->arg, NULL);
+ int idx_ipv4_prefixlen = 3;
+ int idx_reject_blackhole = 4;
+ int idx_number = 6;
+ int idx_number_2 = 7;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg,
+ argv[idx_number_2]->arg, NULL);
}
DEFUN (no_ip_route_mask_distance,
@@ -1027,8 +1170,12 @@ DEFUN (no_ip_route_mask_distance,
"Null interface\n"
"Distance value for this route\n")
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL,
- argv[6]->arg, NULL);
+ int idx_ipv4 = 3;
+ int idx_ipv4_2 = 4;
+ int idx_ipv4_ifname_null = 5;
+ int idx_number = 6;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname_null]->arg, NULL, NULL,
+ argv[idx_number]->arg, NULL);
}
DEFUN (no_ip_route_mask_tag_distance,
@@ -1046,8 +1193,13 @@ DEFUN (no_ip_route_mask_tag_distance,
"Tag value\n"
"Distance value for this route\n")
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[7]->arg,
- argv[8]->arg, NULL);
+ int idx_ipv4 = 3;
+ int idx_ipv4_2 = 4;
+ int idx_ipv4_ifname_null = 5;
+ int idx_number = 7;
+ int idx_number_2 = 8;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname_null]->arg, NULL, argv[idx_number]->arg,
+ argv[idx_number_2]->arg, NULL);
}
DEFUN (no_ip_route_mask_flags_distance,
@@ -1064,8 +1216,13 @@ DEFUN (no_ip_route_mask_flags_distance,
"Silently discard pkts when matched\n"
"Distance value for this route\n")
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, NULL,
- argv[7]->arg, NULL);
+ int idx_ipv4 = 3;
+ int idx_ipv4_2 = 4;
+ int idx_ipv4_ifname = 5;
+ int idx_reject_blackhole = 6;
+ int idx_number = 7;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, NULL,
+ argv[idx_number]->arg, NULL);
}
DEFUN (no_ip_route_mask_flags_tag_distance,
@@ -1084,8 +1241,14 @@ DEFUN (no_ip_route_mask_flags_tag_distance,
"Tag value\n"
"Distance value for this route\n")
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, argv[8]->arg,
- argv[9]->arg, NULL);
+ int idx_ipv4 = 3;
+ int idx_ipv4_2 = 4;
+ int idx_ipv4_ifname = 5;
+ int idx_reject_blackhole = 6;
+ int idx_number = 8;
+ int idx_number_2 = 9;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg,
+ argv[idx_number_2]->arg, NULL);
}
DEFUN (no_ip_route_mask_flags_distance2,
@@ -1100,8 +1263,12 @@ DEFUN (no_ip_route_mask_flags_distance2,
"Silently discard pkts when matched\n"
"Distance value for this route\n")
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, NULL,
- argv[6]->arg, NULL);
+ int idx_ipv4 = 3;
+ int idx_ipv4_2 = 4;
+ int idx_reject_blackhole = 5;
+ int idx_number = 6;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, NULL, argv[idx_reject_blackhole]->arg, NULL,
+ argv[idx_number]->arg, NULL);
}
DEFUN (no_ip_route_mask_flags_tag_distance2,
@@ -1118,8 +1285,13 @@ DEFUN (no_ip_route_mask_flags_tag_distance2,
"Tag value\n"
"Distance value for this route\n")
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, argv[7]->arg,
- argv[8]->arg, NULL);
+ int idx_ipv4 = 3;
+ int idx_ipv4_2 = 4;
+ int idx_reject_blackhole = 5;
+ int idx_number = 7;
+ int idx_number_2 = 8;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg,
+ argv[idx_number_2]->arg, NULL);
}
/* Static route configuration. */
@@ -1134,7 +1306,10 @@ DEFUN (ip_route_vrf,
"Null interface\n"
VRF_CMD_HELP_STR)
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, NULL, NULL, NULL, argv[5]->arg);
+ int idx_ipv4_prefixlen = 2;
+ int idx_ipv4_ifname_null = 3;
+ int idx_name = 5;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname_null]->arg, NULL, NULL, NULL, argv[idx_name]->arg);
}
DEFUN (ip_route_tag_vrf,
@@ -1150,7 +1325,11 @@ DEFUN (ip_route_tag_vrf,
"Tag value\n"
VRF_CMD_HELP_STR)
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, NULL, argv[5]->arg, NULL, argv[7]->arg);
+ int idx_ipv4_prefixlen = 2;
+ int idx_ipv4_ifname_null = 3;
+ int idx_number = 5;
+ int idx_name = 7;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname_null]->arg, NULL, argv[idx_number]->arg, NULL, argv[idx_name]->arg);
}
DEFUN (ip_route_flags_vrf,
@@ -1165,7 +1344,11 @@ DEFUN (ip_route_flags_vrf,
"Silently discard pkts when matched\n"
VRF_CMD_HELP_STR)
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, NULL, NULL, argv[6]->arg);
+ int idx_ipv4_prefixlen = 2;
+ int idx_ipv4_ifname = 3;
+ int idx_reject_blackhole = 4;
+ int idx_name = 6;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, NULL, NULL, argv[idx_name]->arg);
}
DEFUN (ip_route_flags_tag_vrf,
@@ -1183,7 +1366,12 @@ DEFUN (ip_route_flags_tag_vrf,
VRF_CMD_HELP_STR)
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, argv[6]->arg, NULL, argv[8]->arg);
+ int idx_ipv4_prefixlen = 2;
+ int idx_ipv4_ifname = 3;
+ int idx_reject_blackhole = 4;
+ int idx_number = 6;
+ int idx_name = 8;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, NULL, argv[idx_name]->arg);
}
DEFUN (ip_route_flags2_vrf,
@@ -1196,7 +1384,10 @@ DEFUN (ip_route_flags2_vrf,
"Silently discard pkts when matched\n"
VRF_CMD_HELP_STR)
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, NULL, argv[3]->arg, NULL, NULL, argv[5]->arg);
+ int idx_ipv4_prefixlen = 2;
+ int idx_reject_blackhole = 3;
+ int idx_name = 5;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, NULL, argv[idx_reject_blackhole]->arg, NULL, NULL, argv[idx_name]->arg);
}
DEFUN (ip_route_flags2_tag_vrf,
@@ -1212,7 +1403,11 @@ DEFUN (ip_route_flags2_tag_vrf,
VRF_CMD_HELP_STR)
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, NULL, argv[3]->arg, argv[5]->arg, NULL, argv[7]->arg);
+ int idx_ipv4_prefixlen = 2;
+ int idx_reject_blackhole = 3;
+ int idx_number = 5;
+ int idx_name = 7;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, NULL, argv[idx_name]->arg);
}
/* Mask as A.B.C.D format. */
@@ -1228,7 +1423,11 @@ DEFUN (ip_route_mask_vrf,
"Null interface\n"
VRF_CMD_HELP_STR)
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, NULL, NULL, argv[6]->arg);
+ int idx_ipv4 = 2;
+ int idx_ipv4_2 = 3;
+ int idx_ipv4_ifname_null = 4;
+ int idx_name = 6;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname_null]->arg, NULL, NULL, NULL, argv[idx_name]->arg);
}
DEFUN (ip_route_mask_tag_vrf,
@@ -1246,7 +1445,12 @@ DEFUN (ip_route_mask_tag_vrf,
VRF_CMD_HELP_STR)
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, argv[6]->arg, NULL, argv[8]->arg);
+ int idx_ipv4 = 2;
+ int idx_ipv4_2 = 3;
+ int idx_ipv4_ifname_null = 4;
+ int idx_number = 6;
+ int idx_name = 8;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname_null]->arg, NULL, argv[idx_number]->arg, NULL, argv[idx_name]->arg);
}
DEFUN (ip_route_mask_flags_vrf,
@@ -1262,7 +1466,12 @@ DEFUN (ip_route_mask_flags_vrf,
"Silently discard pkts when matched\n"
VRF_CMD_HELP_STR)
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, argv[7]->arg);
+ int idx_ipv4 = 2;
+ int idx_ipv4_2 = 3;
+ int idx_ipv4_ifname = 4;
+ int idx_reject_blackhole = 5;
+ int idx_name = 7;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, NULL, NULL, argv[idx_name]->arg);
}
DEFUN (ip_route_mask_flags_tag_vrf,
@@ -1281,7 +1490,13 @@ DEFUN (ip_route_mask_flags_tag_vrf,
VRF_CMD_HELP_STR)
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[7]->arg, NULL, argv[9]->arg);
+ int idx_ipv4 = 2;
+ int idx_ipv4_2 = 3;
+ int idx_ipv4_ifname = 4;
+ int idx_reject_blackhole = 5;
+ int idx_number = 7;
+ int idx_name = 9;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, NULL, argv[idx_name]->arg);
}
DEFUN (ip_route_mask_flags2_vrf,
@@ -1295,7 +1510,11 @@ DEFUN (ip_route_mask_flags2_vrf,
"Silently discard pkts when matched\n"
VRF_CMD_HELP_STR)
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, NULL, NULL, argv[6]->arg);
+ int idx_ipv4 = 2;
+ int idx_ipv4_2 = 3;
+ int idx_reject_blackhole = 4;
+ int idx_name = 6;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, NULL, argv[idx_reject_blackhole]->arg, NULL, NULL, argv[idx_name]->arg);
}
DEFUN (ip_route_mask_flags2_tag_vrf,
@@ -1311,7 +1530,12 @@ DEFUN (ip_route_mask_flags2_tag_vrf,
"Tag value\n"
VRF_CMD_HELP_STR)
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, argv[6]->arg, NULL, argv[8]->arg);
+ int idx_ipv4 = 2;
+ int idx_ipv4_2 = 3;
+ int idx_reject_blackhole = 4;
+ int idx_number = 6;
+ int idx_name = 8;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, NULL, argv[idx_name]->arg);
}
/* Distance option value. */
@@ -1327,7 +1551,11 @@ DEFUN (ip_route_distance_vrf,
"Distance value for this route\n"
VRF_CMD_HELP_STR)
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, NULL, NULL, argv[4]->arg, argv[6]->arg);
+ int idx_ipv4_prefixlen = 2;
+ int idx_ipv4_ifname_null = 3;
+ int idx_number = 4;
+ int idx_name = 6;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname_null]->arg, NULL, NULL, argv[idx_number]->arg, argv[idx_name]->arg);
}
DEFUN (ip_route_tag_distance_vrf,
@@ -1345,7 +1573,12 @@ DEFUN (ip_route_tag_distance_vrf,
VRF_CMD_HELP_STR)
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, NULL, argv[5]->arg, argv[6]->arg, argv[8]->arg);
+ int idx_ipv4_prefixlen = 2;
+ int idx_ipv4_ifname_null = 3;
+ int idx_number = 5;
+ int idx_number_2 = 6;
+ int idx_name = 8;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname_null]->arg, NULL, argv[idx_number]->arg, argv[idx_number_2]->arg, argv[idx_name]->arg);
}
DEFUN (ip_route_flags_distance_vrf,
@@ -1361,7 +1594,12 @@ DEFUN (ip_route_flags_distance_vrf,
"Distance value for this route\n"
VRF_CMD_HELP_STR)
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, argv[7]->arg);
+ int idx_ipv4_prefixlen = 2;
+ int idx_ipv4_ifname = 3;
+ int idx_reject_blackhole = 4;
+ int idx_number = 5;
+ int idx_name = 7;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, NULL, argv[idx_number]->arg, argv[idx_name]->arg);
}
DEFUN (ip_route_flags_tag_distance_vrf,
@@ -1379,7 +1617,13 @@ DEFUN (ip_route_flags_tag_distance_vrf,
"Distance value for this route\n"
VRF_CMD_HELP_STR)
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, argv[6]->arg, argv[7]->arg, argv[9]->arg);
+ int idx_ipv4_prefixlen = 2;
+ int idx_ipv4_ifname = 3;
+ int idx_reject_blackhole = 4;
+ int idx_number = 6;
+ int idx_number_2 = 7;
+ int idx_name = 9;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, argv[idx_number_2]->arg, argv[idx_name]->arg);
}
DEFUN (ip_route_flags_distance2_vrf,
@@ -1393,7 +1637,11 @@ DEFUN (ip_route_flags_distance2_vrf,
"Distance value for this route\n"
VRF_CMD_HELP_STR)
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, NULL, argv[3]->arg, NULL, argv[4]->arg, argv[6]->arg);
+ int idx_ipv4_prefixlen = 2;
+ int idx_reject_blackhole = 3;
+ int idx_number = 4;
+ int idx_name = 6;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, NULL, argv[idx_reject_blackhole]->arg, NULL, argv[idx_number]->arg, argv[idx_name]->arg);
}
DEFUN (ip_route_flags_tag_distance2_vrf,
@@ -1409,7 +1657,12 @@ DEFUN (ip_route_flags_tag_distance2_vrf,
"Distance value for this route\n"
VRF_CMD_HELP_STR)
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, NULL, argv[3]->arg, argv[5]->arg, argv[6]->arg, argv[8]->arg);
+ int idx_ipv4_prefixlen = 2;
+ int idx_reject_blackhole = 3;
+ int idx_number = 5;
+ int idx_number_2 = 6;
+ int idx_name = 8;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, argv[idx_number_2]->arg, argv[idx_name]->arg);
}
DEFUN (ip_route_mask_distance_vrf,
@@ -1425,7 +1678,12 @@ DEFUN (ip_route_mask_distance_vrf,
"Distance value for this route\n"
VRF_CMD_HELP_STR)
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, NULL, argv[5]->arg, argv[7]->arg);
+ int idx_ipv4 = 2;
+ int idx_ipv4_2 = 3;
+ int idx_ipv4_ifname_null = 4;
+ int idx_number = 5;
+ int idx_name = 7;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname_null]->arg, NULL, NULL, argv[idx_number]->arg, argv[idx_name]->arg);
}
DEFUN (ip_route_mask_tag_distance_vrf,
@@ -1443,7 +1701,13 @@ DEFUN (ip_route_mask_tag_distance_vrf,
"Distance value for this route\n"
VRF_CMD_HELP_STR)
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, argv[6]->arg, argv[7]->arg, argv[9]->arg);
+ int idx_ipv4 = 2;
+ int idx_ipv4_2 = 3;
+ int idx_ipv4_ifname_null = 4;
+ int idx_number = 6;
+ int idx_number_2 = 7;
+ int idx_name = 9;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname_null]->arg, NULL, argv[idx_number]->arg, argv[idx_number_2]->arg, argv[idx_name]->arg);
}
DEFUN (ip_route_mask_flags_tag_distance_vrf,
@@ -1462,7 +1726,14 @@ DEFUN (ip_route_mask_flags_tag_distance_vrf,
"Silently discard pkts when matched\n"
VRF_CMD_HELP_STR)
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[7]->arg, argv[8]->arg, argv[10]->arg);
+ int idx_ipv4 = 2;
+ int idx_ipv4_2 = 3;
+ int idx_ipv4_ifname = 4;
+ int idx_reject_blackhole = 5;
+ int idx_number = 7;
+ int idx_number_2 = 8;
+ int idx_name = 10;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, argv[idx_number_2]->arg, argv[idx_name]->arg);
}
@@ -1480,7 +1751,13 @@ DEFUN (ip_route_mask_flags_distance_vrf,
"Distance value for this route\n"
VRF_CMD_HELP_STR)
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[6]->arg, argv[8]->arg);
+ int idx_ipv4 = 2;
+ int idx_ipv4_2 = 3;
+ int idx_ipv4_ifname = 4;
+ int idx_reject_blackhole = 5;
+ int idx_number = 6;
+ int idx_name = 8;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, NULL, argv[idx_number]->arg, argv[idx_name]->arg);
}
DEFUN (ip_route_mask_flags_distance2_vrf,
@@ -1495,7 +1772,12 @@ DEFUN (ip_route_mask_flags_distance2_vrf,
"Distance value for this route\n"
VRF_CMD_HELP_STR)
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, NULL, argv[5]->arg, argv[7]->arg);
+ int idx_ipv4 = 2;
+ int idx_ipv4_2 = 3;
+ int idx_reject_blackhole = 4;
+ int idx_number = 5;
+ int idx_name = 7;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, NULL, argv[idx_reject_blackhole]->arg, NULL, argv[idx_number]->arg, argv[idx_name]->arg);
}
DEFUN (ip_route_mask_flags_tag_distance2_vrf,
@@ -1512,7 +1794,13 @@ DEFUN (ip_route_mask_flags_tag_distance2_vrf,
"Silently discard pkts when matched\n"
VRF_CMD_HELP_STR)
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, argv[6]->arg, argv[7]->arg, argv[9]->arg);
+ int idx_ipv4 = 2;
+ int idx_ipv4_2 = 3;
+ int idx_reject_blackhole = 4;
+ int idx_number = 6;
+ int idx_number_2 = 7;
+ int idx_name = 9;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, argv[idx_number_2]->arg, argv[idx_name]->arg);
}
DEFUN (no_ip_route_vrf,
@@ -1527,7 +1815,10 @@ DEFUN (no_ip_route_vrf,
"Null interface\n"
VRF_CMD_HELP_STR)
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, NULL, NULL, NULL, argv[6]->arg);
+ int idx_ipv4_prefixlen = 3;
+ int idx_ipv4_ifname_null = 4;
+ int idx_name = 6;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname_null]->arg, NULL, NULL, NULL, argv[idx_name]->arg);
}
DEFUN (no_ip_route_flags_vrf,
@@ -1543,7 +1834,11 @@ DEFUN (no_ip_route_flags_vrf,
"Silently discard pkts when matched\n"
VRF_CMD_HELP_STR)
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, argv[5]->arg, NULL, NULL, argv[7]->arg);
+ int idx_ipv4_prefixlen = 3;
+ int idx_ipv4_ifname = 4;
+ int idx_reject_blackhole = 5;
+ int idx_name = 7;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, NULL, NULL, argv[idx_name]->arg);
}
DEFUN (no_ip_route_tag_vrf,
@@ -1560,7 +1855,11 @@ DEFUN (no_ip_route_tag_vrf,
"Tag value\n"
VRF_CMD_HELP_STR)
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, NULL, argv[6]->arg, NULL, argv[8]->arg);
+ int idx_ipv4_prefixlen = 3;
+ int idx_ipv4_ifname_null = 4;
+ int idx_number = 6;
+ int idx_name = 8;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname_null]->arg, NULL, argv[idx_number]->arg, NULL, argv[idx_name]->arg);
}
DEFUN (no_ip_route_flags_tag_vrf,
@@ -1578,7 +1877,12 @@ DEFUN (no_ip_route_flags_tag_vrf,
"Tag value\n"
VRF_CMD_HELP_STR)
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, argv[5]->arg, argv[7]->arg, NULL, argv[9]->arg);
+ int idx_ipv4_prefixlen = 3;
+ int idx_ipv4_ifname = 4;
+ int idx_reject_blackhole = 5;
+ int idx_number = 7;
+ int idx_name = 9;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, NULL, argv[idx_name]->arg);
}
DEFUN (no_ip_route_flags2_vrf,
@@ -1592,7 +1896,10 @@ DEFUN (no_ip_route_flags2_vrf,
"Silently discard pkts when matched\n"
VRF_CMD_HELP_STR)
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, NULL, argv[4]->arg, NULL, NULL, argv[6]->arg);
+ int idx_ipv4_prefixlen = 3;
+ int idx_reject_blackhole = 4;
+ int idx_name = 6;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, NULL, argv[idx_reject_blackhole]->arg, NULL, NULL, argv[idx_name]->arg);
}
DEFUN (no_ip_route_flags2_tag_vrf,
@@ -1608,7 +1915,11 @@ DEFUN (no_ip_route_flags2_tag_vrf,
"Tag value\n"
VRF_CMD_HELP_STR)
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, NULL, argv[4]->arg, argv[6]->arg, NULL, argv[8]->arg);
+ int idx_ipv4_prefixlen = 3;
+ int idx_reject_blackhole = 4;
+ int idx_number = 6;
+ int idx_name = 8;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, NULL, argv[idx_name]->arg);
}
DEFUN (no_ip_route_mask_vrf,
@@ -1624,7 +1935,11 @@ DEFUN (no_ip_route_mask_vrf,
"Null interface\n"
VRF_CMD_HELP_STR)
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, NULL, argv[7]->arg);
+ int idx_ipv4 = 3;
+ int idx_ipv4_2 = 4;
+ int idx_ipv4_ifname_null = 5;
+ int idx_name = 7;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname_null]->arg, NULL, NULL, NULL, argv[idx_name]->arg);
}
DEFUN (no_ip_route_mask_flags_vrf,
@@ -1641,7 +1956,12 @@ DEFUN (no_ip_route_mask_flags_vrf,
"Silently discard pkts when matched\n"
VRF_CMD_HELP_STR)
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, NULL, NULL, argv[8]->arg);
+ int idx_ipv4 = 3;
+ int idx_ipv4_2 = 4;
+ int idx_ipv4_ifname = 5;
+ int idx_reject_blackhole = 6;
+ int idx_name = 8;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, NULL, NULL, argv[idx_name]->arg);
}
DEFUN (no_ip_route_mask_tag_vrf,
@@ -1659,7 +1979,12 @@ DEFUN (no_ip_route_mask_tag_vrf,
"Tag value\n"
VRF_CMD_HELP_STR)
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[7]->arg, NULL, argv[9]->arg);
+ int idx_ipv4 = 3;
+ int idx_ipv4_2 = 4;
+ int idx_ipv4_ifname_null = 5;
+ int idx_number = 7;
+ int idx_name = 9;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname_null]->arg, NULL, argv[idx_number]->arg, NULL, argv[idx_name]->arg);
}
DEFUN (no_ip_route_mask_flags_tag_vrf,
@@ -1678,7 +2003,13 @@ DEFUN (no_ip_route_mask_flags_tag_vrf,
"Tag value\n"
VRF_CMD_HELP_STR)
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, argv[8]->arg, NULL, argv[10]->arg);
+ int idx_ipv4 = 3;
+ int idx_ipv4_2 = 4;
+ int idx_ipv4_ifname = 5;
+ int idx_reject_blackhole = 6;
+ int idx_number = 8;
+ int idx_name = 10;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, NULL, argv[idx_name]->arg);
}
DEFUN (no_ip_route_mask_flags2_vrf,
@@ -1693,7 +2024,11 @@ DEFUN (no_ip_route_mask_flags2_vrf,
"Silently discard pkts when matched\n"
VRF_CMD_HELP_STR)
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, NULL, NULL, argv[7]->arg);
+ int idx_ipv4 = 3;
+ int idx_ipv4_2 = 4;
+ int idx_reject_blackhole = 5;
+ int idx_name = 7;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, NULL, argv[idx_reject_blackhole]->arg, NULL, NULL, argv[idx_name]->arg);
}
DEFUN (no_ip_route_mask_flags2_tag_vrf,
@@ -1710,7 +2045,12 @@ DEFUN (no_ip_route_mask_flags2_tag_vrf,
"Tag value\n"
VRF_CMD_HELP_STR)
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, argv[7]->arg, NULL, argv[9]->arg);
+ int idx_ipv4 = 3;
+ int idx_ipv4_2 = 4;
+ int idx_reject_blackhole = 5;
+ int idx_number = 7;
+ int idx_name = 9;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, NULL, argv[idx_name]->arg);
}
@@ -1727,7 +2067,11 @@ DEFUN (no_ip_route_distance_vrf,
"Distance value for this route\n"
VRF_CMD_HELP_STR)
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, NULL, NULL, argv[5]->arg, argv[7]->arg);
+ int idx_ipv4_prefixlen = 3;
+ int idx_ipv4_ifname_null = 4;
+ int idx_number = 5;
+ int idx_name = 7;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname_null]->arg, NULL, NULL, argv[idx_number]->arg, argv[idx_name]->arg);
}
DEFUN (no_ip_route_tag_distance_vrf,
@@ -1745,7 +2089,12 @@ DEFUN (no_ip_route_tag_distance_vrf,
"Distance value for this route\n"
VRF_CMD_HELP_STR)
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, NULL, argv[6]->arg, argv[7]->arg, argv[9]->arg);
+ int idx_ipv4_prefixlen = 3;
+ int idx_ipv4_ifname_null = 4;
+ int idx_number = 6;
+ int idx_number_2 = 7;
+ int idx_name = 9;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname_null]->arg, NULL, argv[idx_number]->arg, argv[idx_number_2]->arg, argv[idx_name]->arg);
}
DEFUN (no_ip_route_flags_distance_vrf,
@@ -1762,7 +2111,12 @@ DEFUN (no_ip_route_flags_distance_vrf,
"Distance value for this route\n"
VRF_CMD_HELP_STR)
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, argv[5]->arg, NULL, argv[6]->arg, argv[8]->arg);
+ int idx_ipv4_prefixlen = 3;
+ int idx_ipv4_ifname = 4;
+ int idx_reject_blackhole = 5;
+ int idx_number = 6;
+ int idx_name = 8;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, NULL, argv[idx_number]->arg, argv[idx_name]->arg);
}
DEFUN (no_ip_route_flags_tag_distance_vrf,
@@ -1781,7 +2135,13 @@ DEFUN (no_ip_route_flags_tag_distance_vrf,
"Distance value for this route\n"
VRF_CMD_HELP_STR)
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, argv[5]->arg, argv[7]->arg, argv[8]->arg,argv[10]->arg);
+ int idx_ipv4_prefixlen = 3;
+ int idx_ipv4_ifname = 4;
+ int idx_reject_blackhole = 5;
+ int idx_number = 7;
+ int idx_number_2 = 8;
+ int idx_name = 10;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, argv[idx_number_2]->arg,argv[idx_name]->arg);
}
DEFUN (no_ip_route_flags_distance2_vrf,
@@ -1796,7 +2156,11 @@ DEFUN (no_ip_route_flags_distance2_vrf,
"Distance value for this route\n"
VRF_CMD_HELP_STR)
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, NULL, argv[4]->arg, NULL, argv[5]->arg, argv[7]->arg);
+ int idx_ipv4_prefixlen = 3;
+ int idx_reject_blackhole = 4;
+ int idx_number = 5;
+ int idx_name = 7;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, NULL, argv[idx_reject_blackhole]->arg, NULL, argv[idx_number]->arg, argv[idx_name]->arg);
}
DEFUN (no_ip_route_flags_tag_distance2_vrf,
@@ -1813,7 +2177,12 @@ DEFUN (no_ip_route_flags_tag_distance2_vrf,
"Distance value for this route\n"
VRF_CMD_HELP_STR)
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, NULL, argv[4]->arg, argv[6]->arg , argv[7]->arg, argv[9]->arg);
+ int idx_ipv4_prefixlen = 3;
+ int idx_reject_blackhole = 4;
+ int idx_number = 6;
+ int idx_number_2 = 7;
+ int idx_name = 9;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg , argv[idx_number_2]->arg, argv[idx_name]->arg);
}
DEFUN (no_ip_route_mask_distance_vrf,
@@ -1830,7 +2199,12 @@ DEFUN (no_ip_route_mask_distance_vrf,
"Distance value for this route\n"
VRF_CMD_HELP_STR)
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, argv[6]->arg, argv[8]->arg);
+ int idx_ipv4 = 3;
+ int idx_ipv4_2 = 4;
+ int idx_ipv4_ifname_null = 5;
+ int idx_number = 6;
+ int idx_name = 8;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname_null]->arg, NULL, NULL, argv[idx_number]->arg, argv[idx_name]->arg);
}
DEFUN (no_ip_route_mask_tag_distance_vrf,
@@ -1849,7 +2223,13 @@ DEFUN (no_ip_route_mask_tag_distance_vrf,
"Distance value for this route\n"
VRF_CMD_HELP_STR)
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[7]->arg, argv[8]->arg, argv[10]->arg);
+ int idx_ipv4 = 3;
+ int idx_ipv4_2 = 4;
+ int idx_ipv4_ifname_null = 5;
+ int idx_number = 7;
+ int idx_number_2 = 8;
+ int idx_name = 10;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname_null]->arg, NULL, argv[idx_number]->arg, argv[idx_number_2]->arg, argv[idx_name]->arg);
}
DEFUN (no_ip_route_mask_flags_distance_vrf,
@@ -1867,7 +2247,13 @@ DEFUN (no_ip_route_mask_flags_distance_vrf,
"Distance value for this route\n"
VRF_CMD_HELP_STR)
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, NULL, argv[7]->arg, argv[9]->arg);
+ int idx_ipv4 = 3;
+ int idx_ipv4_2 = 4;
+ int idx_ipv4_ifname = 5;
+ int idx_reject_blackhole = 6;
+ int idx_number = 7;
+ int idx_name = 9;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, NULL, argv[idx_number]->arg, argv[idx_name]->arg);
}
DEFUN (no_ip_route_mask_flags_tag_distance_vrf,
@@ -1887,7 +2273,14 @@ DEFUN (no_ip_route_mask_flags_tag_distance_vrf,
"Distance value for this route\n"
VRF_CMD_HELP_STR)
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, argv[8]->arg, argv[9]->arg, argv[11]->arg);
+ int idx_ipv4 = 3;
+ int idx_ipv4_2 = 4;
+ int idx_ipv4_ifname = 5;
+ int idx_reject_blackhole = 6;
+ int idx_number = 8;
+ int idx_number_2 = 9;
+ int idx_name = 11;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, argv[idx_number_2]->arg, argv[idx_name]->arg);
}
DEFUN (no_ip_route_mask_flags_distance2_vrf,
@@ -1903,7 +2296,12 @@ DEFUN (no_ip_route_mask_flags_distance2_vrf,
"Distance value for this route\n"
VRF_CMD_HELP_STR)
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, NULL, argv[6]->arg, argv[8]->arg);
+ int idx_ipv4 = 3;
+ int idx_ipv4_2 = 4;
+ int idx_reject_blackhole = 5;
+ int idx_number = 6;
+ int idx_name = 8;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, NULL, argv[idx_reject_blackhole]->arg, NULL, argv[idx_number]->arg, argv[idx_name]->arg);
}
DEFUN (no_ip_route_mask_flags_tag_distance2_vrf,
@@ -1921,7 +2319,13 @@ DEFUN (no_ip_route_mask_flags_tag_distance2_vrf,
"Distance value for this route\n"
VRF_CMD_HELP_STR)
{
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, argv[7]->arg, argv[8]->arg, argv[10]->arg);
+ int idx_ipv4 = 3;
+ int idx_ipv4_2 = 4;
+ int idx_reject_blackhole = 5;
+ int idx_number = 7;
+ int idx_number_2 = 8;
+ int idx_name = 10;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, argv[idx_number_2]->arg, argv[idx_name]->arg);
}
/* New RIB. Detailed information for IPv4 route. */
@@ -2442,12 +2846,13 @@ DEFUN (show_ip_route_vrf,
"IP routing table\n"
VRF_CMD_HELP_STR)
{
+ int idx_json = 5;
u_char uj = use_json(argc, argv);
if (argc == 1 && uj)
return do_show_ip_route (vty, NULL, SAFI_UNICAST, uj);
else
- return do_show_ip_route (vty, argv[5]->arg, SAFI_UNICAST, uj);
+ return do_show_ip_route (vty, argv[idx_json]->arg, SAFI_UNICAST, uj);
}
/*
@@ -2626,6 +3031,7 @@ DEFUN (show_ip_route_tag,
"Show only routes with tag\n"
"Tag value\n")
{
+ int idx_number = 4;
struct route_table *table;
struct route_node *rn;
struct rib *rib;
@@ -2636,10 +3042,10 @@ DEFUN (show_ip_route_tag,
if (argc > 1)
{
tag = atoi(argv[1]);
- VRF_GET_ID (vrf_id, argv[4]->arg);
+ VRF_GET_ID (vrf_id, argv[idx_number]->arg);
}
else
- tag = atoi(argv[4]->arg);
+ tag = atoi(argv[idx_number]->arg);
table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, vrf_id);
if (! table)
@@ -2683,6 +3089,7 @@ DEFUN (show_ip_route_prefix_longer,
"IP prefix <network>/<length>, e.g., 35.0.0.0/8\n"
"Show route matching the specified Network/Mask pair only\n")
{
+ int idx_ipv4_prefixlen = 3;
struct route_table *table;
struct route_node *rn;
struct rib *rib;
@@ -2694,10 +3101,10 @@ DEFUN (show_ip_route_prefix_longer,
if (argc > 1)
{
ret = str2prefix (argv[1], &p);
- VRF_GET_ID (vrf_id, argv[3]->arg);
+ VRF_GET_ID (vrf_id, argv[idx_ipv4_prefixlen]->arg);
}
else
- ret = str2prefix (argv[3]->arg, &p);
+ ret = str2prefix (argv[idx_ipv4_prefixlen]->arg, &p);
if (! ret)
{
@@ -2847,13 +3254,14 @@ DEFUN (show_ip_route_ospf_instance,
"Open Shortest Path First (OSPFv2)\n"
"Instance ID\n")
{
+ int idx_number = 4;
struct route_table *table;
struct route_node *rn;
struct rib *rib;
int first = 1;
u_short instance = 0;
- VTY_GET_INTEGER ("Instance", instance, argv[4]->arg);
+ VTY_GET_INTEGER ("Instance", instance, argv[idx_number]->arg);
table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, VRF_DEFAULT);
if (! table)
@@ -2892,6 +3300,7 @@ DEFUN (show_ip_route_addr,
"IP routing table\n"
"Network in the IP routing table to display\n")
{
+ int idx_ipv4 = 3;
int ret;
struct prefix_ipv4 p;
struct route_table *table;
@@ -2900,11 +3309,11 @@ DEFUN (show_ip_route_addr,
if (argc > 1)
{
- VRF_GET_ID (vrf_id, argv[3]->arg);
+ VRF_GET_ID (vrf_id, argv[idx_ipv4]->arg);
ret = str2prefix_ipv4 (argv[1], &p);
}
else
- ret = str2prefix_ipv4 (argv[3]->arg, &p);
+ ret = str2prefix_ipv4 (argv[idx_ipv4]->arg, &p);
if (ret <= 0)
{
@@ -2949,6 +3358,7 @@ DEFUN (show_ip_route_prefix,
"IP routing table\n"
"IP prefix <network>/<length>, e.g., 35.0.0.0/8\n")
{
+ int idx_ipv4_prefixlen = 3;
int ret;
struct prefix_ipv4 p;
struct route_table *table;
@@ -2957,11 +3367,11 @@ DEFUN (show_ip_route_prefix,
if (argc > 1)
{
- VRF_GET_ID (vrf_id, argv[3]->arg);
+ VRF_GET_ID (vrf_id, argv[idx_ipv4_prefixlen]->arg);
ret = str2prefix_ipv4 (argv[1], &p);
}
else
- ret = str2prefix_ipv4 (argv[3]->arg, &p);
+ ret = str2prefix_ipv4 (argv[idx_ipv4_prefixlen]->arg, &p);
if (ret <= 0)
{
@@ -3264,6 +3674,7 @@ DEFUN (show_ip_route_vrf_all_tag,
"Show only routes with tag\n"
"Tag value\n")
{
+ int idx_number = 6;
struct route_table *table;
struct route_node *rn;
struct rib *rib;
@@ -3273,8 +3684,8 @@ DEFUN (show_ip_route_vrf_all_tag,
int vrf_header = 1;
u_short tag = 0;
- if (argv[6]->arg)
- tag = atoi(argv[6]->arg);
+ if (argv[idx_number]->arg)
+ tag = atoi(argv[idx_number]->arg);
for (iter = vrf_first (); iter != VRF_ITER_INVALID; iter = vrf_next (iter))
{
@@ -3317,6 +3728,7 @@ DEFUN (show_ip_route_vrf_all_prefix_longer,
"IP prefix <network>/<length>, e.g., 35.0.0.0/8\n"
"Show route matching the specified Network/Mask pair only\n")
{
+ int idx_ipv4_prefixlen = 5;
struct route_table *table;
struct route_node *rn;
struct rib *rib;
@@ -3327,7 +3739,7 @@ DEFUN (show_ip_route_vrf_all_prefix_longer,
int first = 1;
int vrf_header = 1;
- ret = str2prefix (argv[5]->arg, &p);
+ ret = str2prefix (argv[idx_ipv4_prefixlen]->arg, &p);
if (! ret)
{
vty_out (vty, "%% Malformed Prefix%s", VTY_NEWLINE);
@@ -3482,6 +3894,7 @@ DEFUN (show_ip_route_vrf_all_addr,
VRF_ALL_CMD_HELP_STR
"Network in the IP routing table to display\n")
{
+ int idx_ipv4 = 5;
int ret;
struct prefix_ipv4 p;
struct route_table *table;
@@ -3489,7 +3902,7 @@ DEFUN (show_ip_route_vrf_all_addr,
struct zebra_vrf *zvrf;
vrf_iter_t iter;
- ret = str2prefix_ipv4 (argv[5]->arg, &p);
+ ret = str2prefix_ipv4 (argv[idx_ipv4]->arg, &p);
if (ret <= 0)
{
vty_out (vty, "%% Malformed IPv4 address%s", VTY_NEWLINE);
@@ -3523,6 +3936,7 @@ DEFUN (show_ip_route_vrf_all_prefix,
VRF_ALL_CMD_HELP_STR
"IP prefix <network>/<length>, e.g., 35.0.0.0/8\n")
{
+ int idx_ipv4_prefixlen = 5;
int ret;
struct prefix_ipv4 p;
struct route_table *table;
@@ -3530,7 +3944,7 @@ DEFUN (show_ip_route_vrf_all_prefix,
struct zebra_vrf *zvrf;
vrf_iter_t iter;
- ret = str2prefix_ipv4 (argv[5]->arg, &p);
+ ret = str2prefix_ipv4 (argv[idx_ipv4_prefixlen]->arg, &p);
if (ret <= 0)
{
vty_out (vty, "%% Malformed IPv4 address%s", VTY_NEWLINE);
@@ -3789,7 +4203,9 @@ DEFUN (ipv6_route,
"IPv6 gateway address\n"
"IPv6 gateway interface name\n")
{
- return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, NULL, NULL, NULL, NULL);
+ int idx_ipv6_prefixlen = 2;
+ int idx_ipv6_ifname = 3;
+ return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, NULL, NULL, NULL, NULL);
}
DEFUN (ipv6_route_tag,
@@ -3803,7 +4219,10 @@ DEFUN (ipv6_route_tag,
"Set tag for this route\n"
"Tag value\n")
{
- return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, NULL, argv[5]->arg, NULL, NULL);
+ int idx_ipv6_prefixlen = 2;
+ int idx_ipv6_ifname = 3;
+ int idx_number = 5;
+ return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, NULL, argv[idx_number]->arg, NULL, NULL);
}
DEFUN (ipv6_route_flags,
@@ -3817,7 +4236,10 @@ DEFUN (ipv6_route_flags,
"Emit an ICMP unreachable when matched\n"
"Silently discard pkts when matched\n")
{
- return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, NULL, NULL, NULL);
+ int idx_ipv6_prefixlen = 2;
+ int idx_ipv6_ifname = 3;
+ int idx_reject_blackhole = 4;
+ return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, argv[idx_reject_blackhole]->arg, NULL, NULL, NULL);
}
DEFUN (ipv6_route_flags_tag,
@@ -3833,7 +4255,11 @@ DEFUN (ipv6_route_flags_tag,
"Set tag for this route\n"
"Tag value\n")
{
- return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, argv[6]->arg, NULL, NULL);
+ int idx_ipv6_prefixlen = 2;
+ int idx_ipv6_ifname = 3;
+ int idx_reject_blackhole = 4;
+ int idx_number = 6;
+ return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, NULL, NULL);
}
DEFUN (ipv6_route_ifname,
@@ -3845,7 +4271,10 @@ DEFUN (ipv6_route_ifname,
"IPv6 gateway address\n"
"IPv6 gateway interface name\n")
{
- return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, NULL, NULL, NULL);
+ int idx_ipv6_prefixlen = 2;
+ int idx_ipv6 = 3;
+ int idx_interface = 4;
+ return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, NULL, NULL, NULL, NULL);
}
DEFUN (ipv6_route_ifname_tag,
ipv6_route_ifname_tag_cmd,
@@ -3858,7 +4287,11 @@ DEFUN (ipv6_route_ifname_tag,
"Set tag for this route\n"
"Tag value\n")
{
- return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, argv[6]->arg, NULL, NULL);
+ int idx_ipv6_prefixlen = 2;
+ int idx_ipv6 = 3;
+ int idx_interface = 4;
+ int idx_number = 6;
+ return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, NULL, argv[idx_number]->arg, NULL, NULL);
}
DEFUN (ipv6_route_ifname_flags,
@@ -3872,7 +4305,11 @@ DEFUN (ipv6_route_ifname_flags,
"Emit an ICMP unreachable when matched\n"
"Silently discard pkts when matched\n")
{
- return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, NULL);
+ int idx_ipv6_prefixlen = 2;
+ int idx_ipv6 = 3;
+ int idx_interface = 4;
+ int idx_reject_blackhole = 5;
+ return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, argv[idx_reject_blackhole]->arg, NULL, NULL, NULL);
}
DEFUN (ipv6_route_ifname_flags_tag,
@@ -3888,7 +4325,12 @@ DEFUN (ipv6_route_ifname_flags_tag,
"Set tag for this route\n"
"Tag value\n")
{
- return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[7]->arg, NULL, NULL);
+ int idx_ipv6_prefixlen = 2;
+ int idx_ipv6 = 3;
+ int idx_interface = 4;
+ int idx_reject_blackhole = 5;
+ int idx_number = 7;
+ return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, NULL, NULL);
}
DEFUN (ipv6_route_pref,
@@ -3901,7 +4343,10 @@ DEFUN (ipv6_route_pref,
"IPv6 gateway interface name\n"
"Distance value for this prefix\n")
{
- return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, NULL, NULL, argv[4]->arg, NULL);
+ int idx_ipv6_prefixlen = 2;
+ int idx_ipv6_ifname = 3;
+ int idx_number = 4;
+ return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, NULL, NULL, argv[idx_number]->arg, NULL);
}
DEFUN (ipv6_route_pref_tag,
@@ -3916,7 +4361,11 @@ DEFUN (ipv6_route_pref_tag,
"Tag value\n"
"Distance value for this prefix\n")
{
- return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, NULL, argv[5]->arg, argv[6]->arg, NULL);
+ int idx_ipv6_prefixlen = 2;
+ int idx_ipv6_ifname = 3;
+ int idx_number = 5;
+ int idx_number_2 = 6;
+ return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, NULL, argv[idx_number]->arg, argv[idx_number_2]->arg, NULL);
}
DEFUN (ipv6_route_flags_pref,
@@ -3931,7 +4380,11 @@ DEFUN (ipv6_route_flags_pref,
"Silently discard pkts when matched\n"
"Distance value for this prefix\n")
{
- return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, NULL, argv[5]->arg, NULL);
+ int idx_ipv6_prefixlen = 2;
+ int idx_ipv6_ifname = 3;
+ int idx_reject_blackhole = 4;
+ int idx_number = 5;
+ return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, argv[idx_reject_blackhole]->arg, NULL, argv[idx_number]->arg, NULL);
}
DEFUN (ipv6_route_flags_pref_tag,
@@ -3948,7 +4401,12 @@ DEFUN (ipv6_route_flags_pref_tag,
"Tag value\n"
"Distance value for this prefix\n")
{
- return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, argv[6]->arg, argv[7]->arg, NULL);
+ int idx_ipv6_prefixlen = 2;
+ int idx_ipv6_ifname = 3;
+ int idx_reject_blackhole = 4;
+ int idx_number = 6;
+ int idx_number_2 = 7;
+ return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, argv[idx_number_2]->arg, NULL);
}
DEFUN (ipv6_route_ifname_pref,
@@ -3961,7 +4419,11 @@ DEFUN (ipv6_route_ifname_pref,
"IPv6 gateway interface name\n"
"Distance value for this prefix\n")
{
- return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, NULL, argv[5]->arg, NULL);
+ int idx_ipv6_prefixlen = 2;
+ int idx_ipv6 = 3;
+ int idx_interface = 4;
+ int idx_number = 5;
+ return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, NULL, NULL, argv[idx_number]->arg, NULL);
}
DEFUN (ipv6_route_ifname_pref_tag,
@@ -3976,7 +4438,12 @@ DEFUN (ipv6_route_ifname_pref_tag,
"Tag value\n"
"Distance value for this prefix\n")
{
- return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, argv[6]->arg, argv[7]->arg, NULL);
+ int idx_ipv6_prefixlen = 2;
+ int idx_ipv6 = 3;
+ int idx_interface = 4;
+ int idx_number = 6;
+ int idx_number_2 = 7;
+ return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, NULL, argv[idx_number]->arg, argv[idx_number_2]->arg, NULL);
}
DEFUN (ipv6_route_ifname_flags_pref,
@@ -3991,7 +4458,12 @@ DEFUN (ipv6_route_ifname_flags_pref,
"Silently discard pkts when matched\n"
"Distance value for this prefix\n")
{
- return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[6]->arg, NULL);
+ int idx_ipv6_prefixlen = 2;
+ int idx_ipv6 = 3;
+ int idx_interface = 4;
+ int idx_reject_blackhole = 5;
+ int idx_number = 6;
+ return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, argv[idx_reject_blackhole]->arg, NULL, argv[idx_number]->arg, NULL);
}
DEFUN (ipv6_route_ifname_flags_pref_tag,
@@ -4008,7 +4480,13 @@ DEFUN (ipv6_route_ifname_flags_pref_tag,
"Tag value\n"
"Distance value for this prefix\n")
{
- return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[7]->arg, argv[8]->arg, NULL);
+ int idx_ipv6_prefixlen = 2;
+ int idx_ipv6 = 3;
+ int idx_interface = 4;
+ int idx_reject_blackhole = 5;
+ int idx_number = 7;
+ int idx_number_2 = 8;
+ return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, argv[idx_number_2]->arg, NULL);
}
DEFUN (no_ipv6_route,
@@ -4021,7 +4499,9 @@ DEFUN (no_ipv6_route,
"IPv6 gateway address\n"
"IPv6 gateway interface name\n")
{
- return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, NULL, NULL, NULL, NULL);
+ int idx_ipv6_prefixlen = 3;
+ int idx_ipv6_ifname = 4;
+ return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, NULL, NULL, NULL, NULL);
}
DEFUN (no_ipv6_route_tag,
@@ -4036,7 +4516,10 @@ DEFUN (no_ipv6_route_tag,
"Set tag for this route\n"
"Tag value\n")
{
- return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, NULL, argv[6]->arg, NULL, NULL);
+ int idx_ipv6_prefixlen = 3;
+ int idx_ipv6_ifname = 4;
+ int idx_number = 6;
+ return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, NULL, argv[idx_number]->arg, NULL, NULL);
}
DEFUN (no_ipv6_route_flags,
@@ -4051,7 +4534,10 @@ DEFUN (no_ipv6_route_flags,
"Emit an ICMP unreachable when matched\n"
"Silently discard pkts when matched\n")
{
- return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, NULL, NULL, NULL);
+ int idx_ipv6_prefixlen = 3;
+ int idx_ipv6_ifname = 4;
+ int idx_reject_blackhole = 5;
+ return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, argv[idx_reject_blackhole]->arg, NULL, NULL, NULL);
}
DEFUN (no_ipv6_route_flags_tag,
@@ -4068,7 +4554,11 @@ DEFUN (no_ipv6_route_flags_tag,
"Set tag for this route\n"
"Tag value\n")
{
- return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, argv[7]->arg, NULL, NULL);
+ int idx_ipv6_prefixlen = 3;
+ int idx_ipv6_ifname = 4;
+ int idx_reject_blackhole = 5;
+ int idx_number = 7;
+ return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, NULL, NULL);
}
DEFUN (no_ipv6_route_ifname,
@@ -4081,7 +4571,10 @@ DEFUN (no_ipv6_route_ifname,
"IPv6 gateway address\n"
"IPv6 gateway interface name\n")
{
- return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, NULL, NULL);
+ int idx_ipv6_prefixlen = 3;
+ int idx_ipv6 = 4;
+ int idx_interface = 5;
+ return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, NULL, NULL, NULL, NULL);
}
DEFUN (no_ipv6_route_ifname_tag,
@@ -4096,7 +4589,11 @@ DEFUN (no_ipv6_route_ifname_tag,
"Set tag for this route\n"
"Tag value\n")
{
- return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[7]->arg, NULL, NULL);
+ int idx_ipv6_prefixlen = 3;
+ int idx_ipv6 = 4;
+ int idx_interface = 5;
+ int idx_number = 7;
+ return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, NULL, argv[idx_number]->arg, NULL, NULL);
}
DEFUN (no_ipv6_route_ifname_flags,
@@ -4111,7 +4608,11 @@ DEFUN (no_ipv6_route_ifname_flags,
"Emit an ICMP unreachable when matched\n"
"Silently discard pkts when matched\n")
{
- return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, NULL, NULL, NULL);
+ int idx_ipv6_prefixlen = 3;
+ int idx_ipv6 = 4;
+ int idx_interface = 5;
+ int idx_reject_blackhole = 6;
+ return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, argv[idx_reject_blackhole]->arg, NULL, NULL, NULL);
}
DEFUN (no_ipv6_route_ifname_flags_tag,
@@ -4128,7 +4629,12 @@ DEFUN (no_ipv6_route_ifname_flags_tag,
"Set tag for this route\n"
"Tag value\n")
{
- return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, argv[8]->arg, NULL, NULL);
+ int idx_ipv6_prefixlen = 3;
+ int idx_ipv6 = 4;
+ int idx_interface = 5;
+ int idx_reject_blackhole = 6;
+ int idx_number = 8;
+ return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, NULL, NULL);
}
DEFUN (no_ipv6_route_pref,
@@ -4142,7 +4648,10 @@ DEFUN (no_ipv6_route_pref,
"IPv6 gateway interface name\n"
"Distance value for this prefix\n")
{
- return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, NULL, NULL, argv[5]->arg, NULL);
+ int idx_ipv6_prefixlen = 3;
+ int idx_ipv6_ifname = 4;
+ int idx_number = 5;
+ return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, NULL, NULL, argv[idx_number]->arg, NULL);
}
DEFUN (no_ipv6_route_pref_tag,
@@ -4158,7 +4667,11 @@ DEFUN (no_ipv6_route_pref_tag,
"Tag value\n"
"Distance value for this prefix\n")
{
- return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, NULL, argv[6]->arg, argv[7]->arg, NULL);
+ int idx_ipv6_prefixlen = 3;
+ int idx_ipv6_ifname = 4;
+ int idx_number = 6;
+ int idx_number_2 = 7;
+ return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, NULL, argv[idx_number]->arg, argv[idx_number_2]->arg, NULL);
}
DEFUN (no_ipv6_route_flags_pref,
@@ -4174,8 +4687,12 @@ DEFUN (no_ipv6_route_flags_pref,
"Silently discard pkts when matched\n"
"Distance value for this prefix\n")
{
- /* We do not care about argv[5]->arg */
- return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, NULL, argv[6]->arg, NULL);
+ int idx_ipv6_prefixlen = 3;
+ int idx_ipv6_ifname = 4;
+ int idx_reject_blackhole = 5;
+ int idx_number = 6;
+ /* We do not care about argv[idx_reject_blackhole]->arg */
+ return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, argv[idx_reject_blackhole]->arg, NULL, argv[idx_number]->arg, NULL);
}
DEFUN (no_ipv6_route_flags_pref_tag,
@@ -4193,8 +4710,13 @@ DEFUN (no_ipv6_route_flags_pref_tag,
"Tag value\n"
"Distance value for this prefix\n")
{
- /* We do not care about argv[5]->arg */
- return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, argv[7]->arg, argv[8]->arg, NULL);
+ int idx_ipv6_prefixlen = 3;
+ int idx_ipv6_ifname = 4;
+ int idx_reject_blackhole = 5;
+ int idx_number = 7;
+ int idx_number_2 = 8;
+ /* We do not care about argv[idx_reject_blackhole]->arg */
+ return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, argv[idx_number_2]->arg, NULL);
}
DEFUN (no_ipv6_route_ifname_pref,
@@ -4208,7 +4730,11 @@ DEFUN (no_ipv6_route_ifname_pref,
"IPv6 gateway interface name\n"
"Distance value for this prefix\n")
{
- return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, argv[6]->arg, NULL);
+ int idx_ipv6_prefixlen = 3;
+ int idx_ipv6 = 4;
+ int idx_interface = 5;
+ int idx_number = 6;
+ return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, NULL, NULL, argv[idx_number]->arg, NULL);
}
DEFUN (no_ipv6_route_ifname_pref_tag,
@@ -4224,7 +4750,12 @@ DEFUN (no_ipv6_route_ifname_pref_tag,
"Tag value\n"
"Distance value for this prefix\n")
{
- return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[7]->arg, argv[8]->arg, NULL);
+ int idx_ipv6_prefixlen = 3;
+ int idx_ipv6 = 4;
+ int idx_interface = 5;
+ int idx_number = 7;
+ int idx_number_2 = 8;
+ return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, NULL, argv[idx_number]->arg, argv[idx_number_2]->arg, NULL);
}
DEFUN (no_ipv6_route_ifname_flags_pref,
@@ -4240,7 +4771,12 @@ DEFUN (no_ipv6_route_ifname_flags_pref,
"Silently discard pkts when matched\n"
"Distance value for this prefix\n")
{
- return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, NULL, argv[7]->arg, NULL);
+ int idx_ipv6_prefixlen = 3;
+ int idx_ipv6 = 4;
+ int idx_interface = 5;
+ int idx_reject_blackhole = 6;
+ int idx_number = 7;
+ return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, argv[idx_reject_blackhole]->arg, NULL, argv[idx_number]->arg, NULL);
}
DEFUN (no_ipv6_route_ifname_flags_pref_tag,
@@ -4258,7 +4794,13 @@ DEFUN (no_ipv6_route_ifname_flags_pref_tag,
"Tag value\n"
"Distance value for this prefix\n")
{
- return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, argv[8]->arg, argv[9]->arg, NULL);
+ int idx_ipv6_prefixlen = 3;
+ int idx_ipv6 = 4;
+ int idx_interface = 5;
+ int idx_reject_blackhole = 6;
+ int idx_number = 8;
+ int idx_number_2 = 9;
+ return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, argv[idx_number_2]->arg, NULL);
}
DEFUN (ipv6_route_vrf,
@@ -4271,7 +4813,10 @@ DEFUN (ipv6_route_vrf,
"IPv6 gateway interface name\n"
VRF_CMD_HELP_STR)
{
- return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, NULL, NULL, NULL, argv[5]->arg);
+ int idx_ipv6_prefixlen = 2;
+ int idx_ipv6_ifname = 3;
+ int idx_name = 5;
+ return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, NULL, NULL, NULL, argv[idx_name]->arg);
}
DEFUN (ipv6_route_tag_vrf,
@@ -4286,7 +4831,11 @@ DEFUN (ipv6_route_tag_vrf,
"Tag value\n"
VRF_CMD_HELP_STR)
{
- return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, NULL, argv[5]->arg, NULL, argv[7]->arg);
+ int idx_ipv6_prefixlen = 2;
+ int idx_ipv6_ifname = 3;
+ int idx_number = 5;
+ int idx_name = 7;
+ return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, NULL, argv[idx_number]->arg, NULL, argv[idx_name]->arg);
}
DEFUN (ipv6_route_flags_vrf,
@@ -4301,7 +4850,11 @@ DEFUN (ipv6_route_flags_vrf,
"Silently discard pkts when matched\n"
VRF_CMD_HELP_STR)
{
- return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, NULL, NULL, argv[6]->arg);
+ int idx_ipv6_prefixlen = 2;
+ int idx_ipv6_ifname = 3;
+ int idx_reject_blackhole = 4;
+ int idx_name = 6;
+ return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, argv[idx_reject_blackhole]->arg, NULL, NULL, argv[idx_name]->arg);
}
DEFUN (ipv6_route_flags_tag_vrf,
@@ -4318,7 +4871,12 @@ DEFUN (ipv6_route_flags_tag_vrf,
"Tag value\n"
VRF_CMD_HELP_STR)
{
- return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, argv[6]->arg, NULL, argv[8]->arg);
+ int idx_ipv6_prefixlen = 2;
+ int idx_ipv6_ifname = 3;
+ int idx_reject_blackhole = 4;
+ int idx_number = 6;
+ int idx_name = 8;
+ return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, NULL, argv[idx_name]->arg);
}
DEFUN (ipv6_route_ifname_vrf,
@@ -4331,7 +4889,11 @@ DEFUN (ipv6_route_ifname_vrf,
"IPv6 gateway interface name\n"
VRF_CMD_HELP_STR)
{
- return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, NULL, NULL, argv[6]->arg);
+ int idx_ipv6_prefixlen = 2;
+ int idx_ipv6 = 3;
+ int idx_interface = 4;
+ int idx_name = 6;
+ return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, NULL, NULL, NULL, argv[idx_name]->arg);
}
DEFUN (ipv6_route_ifname_tag_vrf,
ipv6_route_ifname_tag_vrf_cmd,
@@ -4345,7 +4907,12 @@ DEFUN (ipv6_route_ifname_tag_vrf,
"Tag value\n"
VRF_CMD_HELP_STR)
{
- return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, argv[6]->arg, NULL, argv[8]->arg);
+ int idx_ipv6_prefixlen = 2;
+ int idx_ipv6 = 3;
+ int idx_interface = 4;
+ int idx_number = 6;
+ int idx_name = 8;
+ return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, NULL, argv[idx_number]->arg, NULL, argv[idx_name]->arg);
}
DEFUN (ipv6_route_ifname_flags_vrf,
@@ -4360,7 +4927,12 @@ DEFUN (ipv6_route_ifname_flags_vrf,
"Silently discard pkts when matched\n"
VRF_CMD_HELP_STR)
{
- return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, argv[7]->arg);
+ int idx_ipv6_prefixlen = 2;
+ int idx_ipv6 = 3;
+ int idx_interface = 4;
+ int idx_reject_blackhole = 5;
+ int idx_name = 7;
+ return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, argv[idx_reject_blackhole]->arg, NULL, NULL, argv[idx_name]->arg);
}
DEFUN (ipv6_route_ifname_flags_tag_vrf,
@@ -4377,7 +4949,13 @@ DEFUN (ipv6_route_ifname_flags_tag_vrf,
"Tag value\n"
VRF_CMD_HELP_STR)
{
- return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[7]->arg, NULL, argv[9]->arg);
+ int idx_ipv6_prefixlen = 2;
+ int idx_ipv6 = 3;
+ int idx_interface = 4;
+ int idx_reject_blackhole = 5;
+ int idx_number = 7;
+ int idx_name = 9;
+ return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, NULL, argv[idx_name]->arg);
}
DEFUN (ipv6_route_pref_vrf,
@@ -4391,7 +4969,11 @@ DEFUN (ipv6_route_pref_vrf,
"Distance value for this prefix\n"
VRF_CMD_HELP_STR)
{
- return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, NULL, NULL, argv[4]->arg, argv[6]->arg);
+ int idx_ipv6_prefixlen = 2;
+ int idx_ipv6_ifname = 3;
+ int idx_number = 4;
+ int idx_name = 6;
+ return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, NULL, NULL, argv[idx_number]->arg, argv[idx_name]->arg);
}
DEFUN (ipv6_route_pref_tag_vrf,
@@ -4407,7 +4989,12 @@ DEFUN (ipv6_route_pref_tag_vrf,
"Distance value for this prefix\n"
VRF_CMD_HELP_STR)
{
- return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, NULL, argv[5]->arg, argv[6]->arg, argv[8]->arg);
+ int idx_ipv6_prefixlen = 2;
+ int idx_ipv6_ifname = 3;
+ int idx_number = 5;
+ int idx_number_2 = 6;
+ int idx_name = 8;
+ return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, NULL, argv[idx_number]->arg, argv[idx_number_2]->arg, argv[idx_name]->arg);
}
DEFUN (ipv6_route_flags_pref_vrf,
@@ -4423,7 +5010,12 @@ DEFUN (ipv6_route_flags_pref_vrf,
"Distance value for this prefix\n"
VRF_CMD_HELP_STR)
{
- return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, NULL, argv[5]->arg, argv[7]->arg);
+ int idx_ipv6_prefixlen = 2;
+ int idx_ipv6_ifname = 3;
+ int idx_reject_blackhole = 4;
+ int idx_number = 5;
+ int idx_name = 7;
+ return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, argv[idx_reject_blackhole]->arg, NULL, argv[idx_number]->arg, argv[idx_name]->arg);
}
DEFUN (ipv6_route_flags_pref_tag_vrf,
@@ -4441,7 +5033,13 @@ DEFUN (ipv6_route_flags_pref_tag_vrf,
"Distance value for this prefix\n"
VRF_CMD_HELP_STR)
{
- return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, argv[6]->arg, argv[7]->arg, argv[9]->arg);
+ int idx_ipv6_prefixlen = 2;
+ int idx_ipv6_ifname = 3;
+ int idx_reject_blackhole = 4;
+ int idx_number = 6;
+ int idx_number_2 = 7;
+ int idx_name = 9;
+ return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, argv[idx_number_2]->arg, argv[idx_name]->arg);
}
DEFUN (ipv6_route_ifname_pref_vrf,
@@ -4455,7 +5053,12 @@ DEFUN (ipv6_route_ifname_pref_vrf,
"Distance value for this prefix\n"
VRF_CMD_HELP_STR)
{
- return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, NULL, argv[5]->arg, argv[7]->arg);
+ int idx_ipv6_prefixlen = 2;
+ int idx_ipv6 = 3;
+ int idx_interface = 4;
+ int idx_number = 5;
+ int idx_name = 7;
+ return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, NULL, NULL, argv[idx_number]->arg, argv[idx_name]->arg);
}
DEFUN (ipv6_route_ifname_pref_tag_vrf,
@@ -4471,7 +5074,13 @@ DEFUN (ipv6_route_ifname_pref_tag_vrf,
"Distance value for this prefix\n"
VRF_CMD_HELP_STR)
{
- return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, argv[6]->arg, argv[7]->arg, argv[9]->arg);
+ int idx_ipv6_prefixlen = 2;
+ int idx_ipv6 = 3;
+ int idx_interface = 4;
+ int idx_number = 6;
+ int idx_number_2 = 7;
+ int idx_name = 9;
+ return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, NULL, argv[idx_number]->arg, argv[idx_number_2]->arg, argv[idx_name]->arg);
}
DEFUN (ipv6_route_ifname_flags_pref_vrf,
@@ -4487,7 +5096,13 @@ DEFUN (ipv6_route_ifname_flags_pref_vrf,
"Distance value for this prefix\n"
VRF_CMD_HELP_STR)
{
- return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[6]->arg, argv[8]->arg);
+ int idx_ipv6_prefixlen = 2;
+ int idx_ipv6 = 3;
+ int idx_interface = 4;
+ int idx_reject_blackhole = 5;
+ int idx_number = 6;
+ int idx_name = 8;
+ return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, argv[idx_reject_blackhole]->arg, NULL, argv[idx_number]->arg, argv[idx_name]->arg);
}
DEFUN (ipv6_route_ifname_flags_pref_tag_vrf,
@@ -4505,7 +5120,14 @@ DEFUN (ipv6_route_ifname_flags_pref_tag_vrf,
"Distance value for this prefix\n"
VRF_CMD_HELP_STR)
{
- return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[7]->arg, argv[8]->arg, argv[10]->arg);
+ int idx_ipv6_prefixlen = 2;
+ int idx_ipv6 = 3;
+ int idx_interface = 4;
+ int idx_reject_blackhole = 5;
+ int idx_number = 7;
+ int idx_number_2 = 8;
+ int idx_name = 10;
+ return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, argv[idx_number_2]->arg, argv[idx_name]->arg);
}
DEFUN (no_ipv6_route_vrf,
@@ -4519,7 +5141,10 @@ DEFUN (no_ipv6_route_vrf,
"IPv6 gateway interface name\n"
VRF_CMD_HELP_STR)
{
- return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, NULL, NULL, NULL, argv[6]->arg);
+ int idx_ipv6_prefixlen = 3;
+ int idx_ipv6_ifname = 4;
+ int idx_name = 6;
+ return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, NULL, NULL, NULL, argv[idx_name]->arg);
}
DEFUN (no_ipv6_route_tag_vrf,
@@ -4535,7 +5160,11 @@ DEFUN (no_ipv6_route_tag_vrf,
"Tag value\n"
VRF_CMD_HELP_STR)
{
- return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, NULL, argv[6]->arg, NULL, argv[8]->arg);
+ int idx_ipv6_prefixlen = 3;
+ int idx_ipv6_ifname = 4;
+ int idx_number = 6;
+ int idx_name = 8;
+ return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, NULL, argv[idx_number]->arg, NULL, argv[idx_name]->arg);
}
DEFUN (no_ipv6_route_flags_vrf,
@@ -4551,7 +5180,11 @@ DEFUN (no_ipv6_route_flags_vrf,
"Silently discard pkts when matched\n"
VRF_CMD_HELP_STR)
{
- return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, NULL, NULL, argv[7]->arg);
+ int idx_ipv6_prefixlen = 3;
+ int idx_ipv6_ifname = 4;
+ int idx_reject_blackhole = 5;
+ int idx_name = 7;
+ return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, argv[idx_reject_blackhole]->arg, NULL, NULL, argv[idx_name]->arg);
}
DEFUN (no_ipv6_route_flags_tag_vrf,
@@ -4569,7 +5202,12 @@ DEFUN (no_ipv6_route_flags_tag_vrf,
"Tag value\n"
VRF_CMD_HELP_STR)
{
- return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, argv[7]->arg, NULL, argv[9]->arg);
+ int idx_ipv6_prefixlen = 3;
+ int idx_ipv6_ifname = 4;
+ int idx_reject_blackhole = 5;
+ int idx_number = 7;
+ int idx_name = 9;
+ return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, NULL, argv[idx_name]->arg);
}
DEFUN (no_ipv6_route_ifname_vrf,
@@ -4583,7 +5221,11 @@ DEFUN (no_ipv6_route_ifname_vrf,
"IPv6 gateway interface name\n"
VRF_CMD_HELP_STR)
{
- return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, NULL, argv[7]->arg);
+ int idx_ipv6_prefixlen = 3;
+ int idx_ipv6 = 4;
+ int idx_interface = 5;
+ int idx_name = 7;
+ return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, NULL, NULL, NULL, argv[idx_name]->arg);
}
DEFUN (no_ipv6_route_ifname_tag_vrf,
@@ -4599,7 +5241,12 @@ DEFUN (no_ipv6_route_ifname_tag_vrf,
"Tag value\n"
VRF_CMD_HELP_STR)
{
- return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[7]->arg, NULL, argv[9]->arg);
+ int idx_ipv6_prefixlen = 3;
+ int idx_ipv6 = 4;
+ int idx_interface = 5;
+ int idx_number = 7;
+ int idx_name = 9;
+ return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, NULL, argv[idx_number]->arg, NULL, argv[idx_name]->arg);
}
DEFUN (no_ipv6_route_ifname_flags_vrf,
@@ -4615,7 +5262,12 @@ DEFUN (no_ipv6_route_ifname_flags_vrf,
"Silently discard pkts when matched\n"
VRF_CMD_HELP_STR)
{
- return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, NULL, NULL, argv[8]->arg);
+ int idx_ipv6_prefixlen = 3;
+ int idx_ipv6 = 4;
+ int idx_interface = 5;
+ int idx_reject_blackhole = 6;
+ int idx_name = 8;
+ return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, argv[idx_reject_blackhole]->arg, NULL, NULL, argv[idx_name]->arg);
}
DEFUN (no_ipv6_route_ifname_flags_tag_vrf,
@@ -4633,7 +5285,13 @@ DEFUN (no_ipv6_route_ifname_flags_tag_vrf,
"Tag value\n"
VRF_CMD_HELP_STR)
{
- return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, argv[8]->arg, NULL, argv[10]->arg);
+ int idx_ipv6_prefixlen = 3;
+ int idx_ipv6 = 4;
+ int idx_interface = 5;
+ int idx_reject_blackhole = 6;
+ int idx_number = 8;
+ int idx_name = 10;
+ return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, NULL, argv[idx_name]->arg);
}
DEFUN (no_ipv6_route_pref_vrf,
@@ -4648,7 +5306,11 @@ DEFUN (no_ipv6_route_pref_vrf,
"Distance value for this prefix\n"
VRF_CMD_HELP_STR)
{
- return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, NULL, NULL, argv[5]->arg, argv[7]->arg);
+ int idx_ipv6_prefixlen = 3;
+ int idx_ipv6_ifname = 4;
+ int idx_number = 5;
+ int idx_name = 7;
+ return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, NULL, NULL, argv[idx_number]->arg, argv[idx_name]->arg);
}
DEFUN (no_ipv6_route_pref_tag_vrf,
@@ -4665,7 +5327,12 @@ DEFUN (no_ipv6_route_pref_tag_vrf,
"Distance value for this prefix\n"
VRF_CMD_HELP_STR)
{
- return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, NULL, argv[6]->arg, argv[7]->arg, argv[9]->arg);
+ int idx_ipv6_prefixlen = 3;
+ int idx_ipv6_ifname = 4;
+ int idx_number = 6;
+ int idx_number_2 = 7;
+ int idx_name = 9;
+ return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, NULL, argv[idx_number]->arg, argv[idx_number_2]->arg, argv[idx_name]->arg);
}
DEFUN (no_ipv6_route_flags_pref_vrf,
@@ -4682,8 +5349,13 @@ DEFUN (no_ipv6_route_flags_pref_vrf,
"Distance value for this prefix\n"
VRF_CMD_HELP_STR)
{
- /* We do not care about argv[5]->arg */
- return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, NULL, argv[6]->arg, argv[8]->arg);
+ int idx_ipv6_prefixlen = 3;
+ int idx_ipv6_ifname = 4;
+ int idx_reject_blackhole = 5;
+ int idx_number = 6;
+ int idx_name = 8;
+ /* We do not care about argv[idx_reject_blackhole]->arg */
+ return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, argv[idx_reject_blackhole]->arg, NULL, argv[idx_number]->arg, argv[idx_name]->arg);
}
DEFUN (no_ipv6_route_flags_pref_tag_vrf,
@@ -4702,8 +5374,14 @@ DEFUN (no_ipv6_route_flags_pref_tag_vrf,
"Distance value for this prefix\n"
VRF_CMD_HELP_STR)
{
- /* We do not care about argv[5]->arg */
- return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, argv[7]->arg, argv[8]->arg, argv[10]->arg);
+ int idx_ipv6_prefixlen = 3;
+ int idx_ipv6_ifname = 4;
+ int idx_reject_blackhole = 5;
+ int idx_number = 7;
+ int idx_number_2 = 8;
+ int idx_name = 10;
+ /* We do not care about argv[idx_reject_blackhole]->arg */
+ return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, argv[idx_number_2]->arg, argv[idx_name]->arg);
}
DEFUN (no_ipv6_route_ifname_pref_vrf,
@@ -4718,7 +5396,12 @@ DEFUN (no_ipv6_route_ifname_pref_vrf,
"Distance value for this prefix\n"
VRF_CMD_HELP_STR)
{
- return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, argv[6]->arg, argv[8]->arg);
+ int idx_ipv6_prefixlen = 3;
+ int idx_ipv6 = 4;
+ int idx_interface = 5;
+ int idx_number = 6;
+ int idx_name = 8;
+ return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, NULL, NULL, argv[idx_number]->arg, argv[idx_name]->arg);
}
DEFUN (no_ipv6_route_ifname_pref_tag_vrf,
@@ -4735,7 +5418,13 @@ DEFUN (no_ipv6_route_ifname_pref_tag_vrf,
"Distance value for this prefix\n"
VRF_CMD_HELP_STR)
{
- return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[7]->arg, argv[8]->arg, argv[10]->arg);
+ int idx_ipv6_prefixlen = 3;
+ int idx_ipv6 = 4;
+ int idx_interface = 5;
+ int idx_number = 7;
+ int idx_number_2 = 8;
+ int idx_name = 10;
+ return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, NULL, argv[idx_number]->arg, argv[idx_number_2]->arg, argv[idx_name]->arg);
}
DEFUN (no_ipv6_route_ifname_flags_pref_vrf,
@@ -4752,7 +5441,13 @@ DEFUN (no_ipv6_route_ifname_flags_pref_vrf,
"Distance value for this prefix\n"
VRF_CMD_HELP_STR)
{
- return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, NULL, argv[7]->arg, argv[9]->arg);
+ int idx_ipv6_prefixlen = 3;
+ int idx_ipv6 = 4;
+ int idx_interface = 5;
+ int idx_reject_blackhole = 6;
+ int idx_number = 7;
+ int idx_name = 9;
+ return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, argv[idx_reject_blackhole]->arg, NULL, argv[idx_number]->arg, argv[idx_name]->arg);
}
DEFUN (no_ipv6_route_ifname_flags_pref_tag_vrf,
@@ -4771,7 +5466,14 @@ DEFUN (no_ipv6_route_ifname_flags_pref_tag_vrf,
"Distance value for this prefix\n"
VRF_CMD_HELP_STR)
{
- return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, argv[8]->arg, argv[9]->arg, argv[11]->arg);
+ int idx_ipv6_prefixlen = 3;
+ int idx_ipv6 = 4;
+ int idx_interface = 5;
+ int idx_reject_blackhole = 6;
+ int idx_number = 8;
+ int idx_number_2 = 9;
+ int idx_name = 11;
+ return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, argv[idx_number_2]->arg, argv[idx_name]->arg);
}
/*
@@ -4790,6 +5492,7 @@ DEFUN (show_ipv6_route,
IP_STR
"IPv6 routing table\n")
{
+ int idx_json = 3;
struct route_table *table;
struct route_node *rn;
struct rib *rib;
@@ -4801,14 +5504,14 @@ DEFUN (show_ipv6_route,
json_object *json_prefix = NULL;
u_char uj = use_json(argc, argv);
- if (argc > 0 && argv[3]->arg && strcmp(argv[3]->arg, "json") != 0)
+ if (argc > 0 && argv[idx_json]->arg && strcmp(argv[idx_json]->arg, "json") != 0)
{
- if (!(zvrf = zebra_vrf_list_lookup_by_name (argv[3]->arg)))
+ if (!(zvrf = zebra_vrf_list_lookup_by_name (argv[idx_json]->arg)))
{
if (uj)
vty_out (vty, "{}%s", VTY_NEWLINE);
else
- vty_out (vty, "vrf %s not defined%s", argv[3]->arg, VTY_NEWLINE);
+ vty_out (vty, "vrf %s not defined%s", argv[idx_json]->arg, VTY_NEWLINE);
return CMD_SUCCESS;
}
@@ -4817,7 +5520,7 @@ DEFUN (show_ipv6_route,
if (uj)
vty_out (vty, "{}%s", VTY_NEWLINE);
else
- vty_out (vty, "vrf %s inactive%s", argv[3]->arg, VTY_NEWLINE);
+ vty_out (vty, "vrf %s inactive%s", argv[idx_json]->arg, VTY_NEWLINE);
return CMD_SUCCESS;
}
else
@@ -4898,6 +5601,7 @@ DEFUN (show_ipv6_route_tag,
"Show only routes with tag\n"
"Tag value\n")
{
+ int idx_number = 4;
struct route_table *table;
struct route_node *rn;
struct rib *rib;
@@ -4907,11 +5611,11 @@ DEFUN (show_ipv6_route_tag,
if (argc > 1)
{
- VRF_GET_ID (vrf_id, argv[4]->arg);
+ VRF_GET_ID (vrf_id, argv[idx_number]->arg);
tag = atoi(argv[1]);
}
else
- tag = atoi(argv[4]->arg);
+ tag = atoi(argv[idx_number]->arg);
table = zebra_vrf_table (AFI_IP6, SAFI_UNICAST, vrf_id);
if (! table)
@@ -4955,6 +5659,7 @@ DEFUN (show_ipv6_route_prefix_longer,
"IPv6 prefix\n"
"Show route matching the specified Network/Mask pair only\n")
{
+ int idx_ipv6_prefixlen = 3;
struct route_table *table;
struct route_node *rn;
struct rib *rib;
@@ -4965,11 +5670,11 @@ DEFUN (show_ipv6_route_prefix_longer,
if (argc > 1)
{
- VRF_GET_ID (vrf_id, argv[3]->arg);
+ VRF_GET_ID (vrf_id, argv[idx_ipv6_prefixlen]->arg);
ret = str2prefix (argv[1], &p);
}
else
- ret = str2prefix (argv[3]->arg, &p);
+ ret = str2prefix (argv[idx_ipv6_prefixlen]->arg, &p);
if (! ret)
{
@@ -5015,6 +5720,7 @@ DEFUN (show_ipv6_route_protocol,
"IP routing table\n"
QUAGGA_IP6_REDIST_HELP_STR_ZEBRA)
{
+ int idx_protocol = 3;
int type;
struct route_table *table;
struct route_node *rn;
@@ -5025,7 +5731,7 @@ DEFUN (show_ipv6_route_protocol,
if ( argc >1 )
{
VRF_GET_ID (vrf_id, argv[4]->arg);
- type = proto_redistnum (AFI_IP6, argv[3]->arg);
+ type = proto_redistnum (AFI_IP6, argv[idx_protocol]->arg);
}
else
type = proto_redistnum (AFI_IP6, argv[4]->arg);
@@ -5074,6 +5780,7 @@ DEFUN (show_ipv6_route_addr,
"IPv6 routing table\n"
"IPv6 Address\n")
{
+ int idx_ipv6 = 3;
int ret;
struct prefix_ipv6 p;
struct route_table *table;
@@ -5082,11 +5789,11 @@ DEFUN (show_ipv6_route_addr,
if (argc > 1 )
{
- VRF_GET_ID (vrf_id, argv[3]->arg);
+ VRF_GET_ID (vrf_id, argv[idx_ipv6]->arg);
ret = str2prefix_ipv6 (argv[1], &p);
}
else
- ret = str2prefix_ipv6 (argv[3]->arg, &p);
+ ret = str2prefix_ipv6 (argv[idx_ipv6]->arg, &p);
if (ret <= 0)
{
@@ -5131,6 +5838,7 @@ DEFUN (show_ipv6_route_prefix,
"IPv6 routing table\n"
"IPv6 prefix\n")
{
+ int idx_ipv6_prefixlen = 3;
int ret;
struct prefix_ipv6 p;
struct route_table *table;
@@ -5139,11 +5847,11 @@ DEFUN (show_ipv6_route_prefix,
if (argc > 1)
{
- VRF_GET_ID (vrf_id, argv[3]->arg);
+ VRF_GET_ID (vrf_id, argv[idx_ipv6_prefixlen]->arg);
ret = str2prefix_ipv6 (argv[1], &p);
}
else
- ret = str2prefix_ipv6 (argv[3]->arg, &p);
+ ret = str2prefix_ipv6 (argv[idx_ipv6_prefixlen]->arg, &p);
if (ret <= 0)
{
@@ -5346,6 +6054,7 @@ DEFUN (show_ipv6_route_vrf_all_tag,
"Show only routes with tag\n"
"Tag value\n")
{
+ int idx_number = 6;
struct route_table *table;
struct route_node *rn;
struct rib *rib;
@@ -5355,8 +6064,8 @@ DEFUN (show_ipv6_route_vrf_all_tag,
int vrf_header = 1;
u_short tag = 0;
- if (argv[6]->arg)
- tag = atoi(argv[6]->arg);
+ if (argv[idx_number]->arg)
+ tag = atoi(argv[idx_number]->arg);
for (iter = vrf_first (); iter != VRF_ITER_INVALID; iter = vrf_next (iter))
{
@@ -5400,6 +6109,7 @@ DEFUN (show_ipv6_route_vrf_all_prefix_longer,
"IPv6 prefix\n"
"Show route matching the specified Network/Mask pair only\n")
{
+ int idx_ipv6_prefixlen = 5;
struct route_table *table;
struct route_node *rn;
struct rib *rib;
@@ -5410,7 +6120,7 @@ DEFUN (show_ipv6_route_vrf_all_prefix_longer,
int first = 1;
int vrf_header = 1;
- ret = str2prefix (argv[5]->arg, &p);
+ ret = str2prefix (argv[idx_ipv6_prefixlen]->arg, &p);
if (! ret)
{
vty_out (vty, "%% Malformed Prefix%s", VTY_NEWLINE);
@@ -5511,6 +6221,7 @@ DEFUN (show_ipv6_route_vrf_all_addr,
VRF_ALL_CMD_HELP_STR
"IPv6 Address\n")
{
+ int idx_ipv6 = 5;
int ret;
struct prefix_ipv6 p;
struct route_table *table;
@@ -5518,7 +6229,7 @@ DEFUN (show_ipv6_route_vrf_all_addr,
struct zebra_vrf *zvrf;
vrf_iter_t iter;
- ret = str2prefix_ipv6 (argv[5]->arg, &p);
+ ret = str2prefix_ipv6 (argv[idx_ipv6]->arg, &p);
if (ret <= 0)
{
vty_out (vty, "Malformed IPv6 address%s", VTY_NEWLINE);
@@ -5552,6 +6263,7 @@ DEFUN (show_ipv6_route_vrf_all_prefix,
VRF_ALL_CMD_HELP_STR
"IPv6 prefix\n")
{
+ int idx_ipv6_prefixlen = 5;
int ret;
struct prefix_ipv6 p;
struct route_table *table;
@@ -5559,7 +6271,7 @@ DEFUN (show_ipv6_route_vrf_all_prefix,
struct zebra_vrf *zvrf;
vrf_iter_t iter;
- ret = str2prefix_ipv6 (argv[5]->arg, &p);
+ ret = str2prefix_ipv6 (argv[idx_ipv6_prefixlen]->arg, &p);
if (ret <= 0)
{
vty_out (vty, "Malformed IPv6 prefix%s", VTY_NEWLINE);
@@ -5807,11 +6519,13 @@ DEFUN (ip_zebra_import_table_distance,
"Distance for imported routes\n"
"Default distance value\n")
{
+ int idx_number = 2;
+ int idx_number_2 = 4;
u_int32_t table_id = 0;
int distance = ZEBRA_TABLE_DISTANCE_DEFAULT;
if (argc)
- VTY_GET_INTEGER("table", table_id, argv[2]->arg);
+ VTY_GET_INTEGER("table", table_id, argv[idx_number]->arg);
if (!is_zebra_valid_kernel_table(table_id))
{
@@ -5828,7 +6542,7 @@ DEFUN (ip_zebra_import_table_distance,
}
if (argc > 1)
- VTY_GET_INTEGER_RANGE("distance", distance, argv[4]->arg, 1, 255);
+ VTY_GET_INTEGER_RANGE("distance", distance, argv[idx_number_2]->arg, 1, 255);
return (zebra_import_table(AFI_IP, table_id, distance, NULL, 1));
}
@@ -5855,12 +6569,15 @@ DEFUN (ip_zebra_import_table_distance_routemap,
"route-map for filtering\n"
"route-map name\n")
{
+ int idx_number = 2;
+ int idx_number_2 = 4;
+ int idx_word = 6;
u_int32_t table_id = 0;
int distance = ZEBRA_TABLE_DISTANCE_DEFAULT;
const char *rmap_name;
if (argc)
- VTY_GET_INTEGER("table", table_id, argv[2]->arg);
+ VTY_GET_INTEGER("table", table_id, argv[idx_number]->arg);
if (!is_zebra_valid_kernel_table(table_id))
{
@@ -5878,11 +6595,11 @@ DEFUN (ip_zebra_import_table_distance_routemap,
if (argc > 2)
{
- VTY_GET_INTEGER_RANGE("distance", distance, argv[4]->arg, 1, 255);
- rmap_name = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[6]->arg);
+ VTY_GET_INTEGER_RANGE("distance", distance, argv[idx_number_2]->arg, 1, 255);
+ rmap_name = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[idx_word]->arg);
}
else
- rmap_name = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[4]->arg);
+ rmap_name = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[idx_number_2]->arg);
return (zebra_import_table(AFI_IP, table_id, distance, rmap_name, 1));
}
@@ -5905,10 +6622,11 @@ DEFUN (no_ip_zebra_import_table,
"import routes from non-main kernel table\n"
"kernel routing table id\n")
{
+ int idx_number = 3;
u_int32_t table_id = 0;
if (argc)
- VTY_GET_INTEGER("table", table_id, argv[3]->arg);
+ VTY_GET_INTEGER("table", table_id, argv[idx_number]->arg);
if (!is_zebra_valid_kernel_table(table_id))
{