return CMD_SUCCESS;
}
-/* Static route configuration. */
-DEFUN (ip_route,
- ip_route_cmd,
- "ip route A.B.C.D/M <A.B.C.D|INTERFACE|null0>",
- IP_STR
- "Establish static routes\n"
- "IP destination prefix (e.g. 10.0.0.0/8)\n"
- "IP gateway address\n"
- "IP gateway interface name\n"
- "Null interface\n")
+static void
+zebra_vty_ip_route_tdv_helper (int argc, struct cmd_token *argv[],
+ int idx_curr, char **tag,
+ char **distance, char **vrf)
{
- 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);
+ if (argc > idx_curr)
+ {
+ if (strmatch (argv[idx_curr]->text, "tag"))
+ {
+ *tag = argv[idx_curr]->arg;
+ idx_curr++;
+ }
+
+ if (strmatch (argv[idx_curr]->text, "vrf"))
+ {
+ *distance = NULL;
+ *vrf = argv[idx_curr]->arg;
+ }
+ else
+ {
+ *distance = argv[idx_curr]->arg;
+ *vrf = argv[++idx_curr]->arg;
+ }
+ }
+
+ return;
}
-DEFUN (ip_route_tag,
- ip_route_tag_cmd,
- "ip route A.B.C.D/M <A.B.C.D|INTERFACE|null0> tag (1-65535)",
+
+/* Static route configuration. */
+DEFUN (ip_route,
+ ip_route_cmd,
+ "ip route A.B.C.D/M <A.B.C.D|INTERFACE|null0> [tag (1-65535)] [(1-255)] [vrf NAME]",
IP_STR
"Establish static routes\n"
"IP destination prefix (e.g. 10.0.0.0/8)\n"
"IP gateway interface name\n"
"Null interface\n"
"Set tag for this route\n"
- "Tag value\n")
+ "Tag value\n"
+ "Distance value for this route\n"
+ VRF_CMD_HELP_STR)
{
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);
+ int idx_curr = 4;
+ char *tag, *distance, *vrf;
+
+ tag = distance = vrf = NULL;
+ zebra_vty_ip_route_tdv_helper (argc, argv, idx_curr, &tag, &distance, &vrf);
+
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 1,
+ argv[idx_ipv4_prefixlen]->arg,
+ NULL,
+ argv[idx_ipv4_ifname_null]->arg,
+ NULL,
+ tag, distance, vrf);
}
DEFUN (ip_route_flags,
ip_route_flags_cmd,
- "ip route A.B.C.D/M <A.B.C.D|INTERFACE> <reject|blackhole>",
- IP_STR
- "Establish static routes\n"
- "IP destination prefix (e.g. 10.0.0.0/8)\n"
- "IP gateway address\n"
- "IP gateway interface name\n"
- "Emit an ICMP unreachable when matched\n"
- "Silently discard pkts when matched\n")
-{
- 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);
-}
-
-DEFUN (ip_route_flags_tag,
- ip_route_flags_tag_cmd,
- "ip route A.B.C.D/M <A.B.C.D|INTERFACE> <reject|blackhole> tag (1-65535)",
+ "ip route A.B.C.D/M <A.B.C.D|INTERFACE> <reject|blackhole> [tag (1-65535)] [(1-255)] [vrf NAME]",
IP_STR
"Establish static routes\n"
"IP destination prefix (e.g. 10.0.0.0/8)\n"
"Emit an ICMP unreachable when matched\n"
"Silently discard pkts when matched\n"
"Set tag for this route\n"
- "Tag value\n")
-
+ "Tag value\n"
+ "Distance value for this route\n"
+ VRF_CMD_HELP_STR)
{
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);
+ int idx_curr = 5;
+ char *tag, *distance, *vrf;
+
+ tag = distance = vrf = NULL;
+ zebra_vty_ip_route_tdv_helper (argc, argv, idx_curr, &tag, &distance, &vrf);
+
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 1,
+ argv[idx_ipv4_prefixlen]->arg,
+ NULL,
+ argv[idx_ipv4_ifname]->arg,
+ argv[idx_reject_blackhole]->arg,
+ tag, distance, vrf);
}
DEFUN (ip_route_flags2,
ip_route_flags2_cmd,
- "ip route A.B.C.D/M <reject|blackhole>",
- IP_STR
- "Establish static routes\n"
- "IP destination prefix (e.g. 10.0.0.0/8)\n"
- "Emit an ICMP unreachable when matched\n"
- "Silently discard pkts when matched\n")
-{
- 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);
-}
-
-DEFUN (ip_route_flags2_tag,
- ip_route_flags2_tag_cmd,
- "ip route A.B.C.D/M <reject|blackhole> tag (1-65535)",
+ "ip route A.B.C.D/M <reject|blackhole> [tag (1-65535)] [(1-255)] [vrf NAME]",
IP_STR
"Establish static routes\n"
"IP destination prefix (e.g. 10.0.0.0/8)\n"
"Emit an ICMP unreachable when matched\n"
"Silently discard pkts when matched\n"
"Set tag for this route\n"
- "Tag value\n")
-
+ "Tag value\n"
+ "Distance value for this route\n"
+ VRF_CMD_HELP_STR)
{
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);
+ int idx_curr = 4;
+ char *tag, *distance, *vrf;
+
+ tag = distance = vrf = NULL;
+ zebra_vty_ip_route_tdv_helper (argc, argv, idx_curr, &tag, &distance, &vrf);
+
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 1,
+ argv[idx_ipv4_prefixlen]->arg,
+ NULL,
+ NULL,
+ argv[idx_reject_blackhole]->arg,
+ tag, distance, vrf);
}
/* Mask as A.B.C.D format. */
DEFUN (ip_route_mask,
ip_route_mask_cmd,
- "ip route A.B.C.D A.B.C.D <A.B.C.D|INTERFACE|null0>",
- IP_STR
- "Establish static routes\n"
- "IP destination prefix\n"
- "IP destination prefix mask\n"
- "IP gateway address\n"
- "IP gateway interface name\n"
- "Null interface\n")
-{
- 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);
-}
-
-DEFUN (ip_route_mask_tag,
- ip_route_mask_tag_cmd,
- "ip route A.B.C.D A.B.C.D <A.B.C.D|INTERFACE|null0> tag (1-65535)",
+ "ip route A.B.C.D A.B.C.D <A.B.C.D|INTERFACE|null0> [tag (1-65535)] [(1-255)] [vrf NAME]",
IP_STR
"Establish static routes\n"
"IP destination prefix\n"
"IP gateway interface name\n"
"Null interface\n"
"Set tag for this route\n"
- "Tag value\n")
-
+ "Tag value\n"
+ "Distance value for this route\n"
+ VRF_CMD_HELP_STR)
{
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);
+ int idx_curr = 5;
+ char *tag, *distance, *vrf;
+
+ tag = distance = vrf = NULL;
+ zebra_vty_ip_route_tdv_helper (argc, argv, idx_curr, &tag, &distance, &vrf);
+
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 1,
+ argv[idx_ipv4]->arg,
+ argv[idx_ipv4_2]->arg,
+ argv[idx_ipv4_ifname_null]->arg,
+ NULL, tag, distance, vrf);
}
DEFUN (ip_route_mask_flags,
ip_route_mask_flags_cmd,
- "ip route A.B.C.D A.B.C.D <A.B.C.D|INTERFACE> <reject|blackhole>",
- IP_STR
- "Establish static routes\n"
- "IP destination prefix\n"
- "IP destination prefix mask\n"
- "IP gateway address\n"
- "IP gateway interface name\n"
- "Emit an ICMP unreachable when matched\n"
- "Silently discard pkts when matched\n")
-{
- 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);
-}
-
-DEFUN (ip_route_mask_flags_tag,
- ip_route_mask_flags_tag_cmd,
- "ip route A.B.C.D A.B.C.D <A.B.C.D|INTERFACE> <reject|blackhole> tag (1-65535)",
+ "ip route A.B.C.D A.B.C.D <A.B.C.D|INTERFACE> <reject|blackhole> [tag (1-65535)] [(1-255)] [vrf NAME]",
IP_STR
"Establish static routes\n"
"IP destination prefix\n"
"Emit an ICMP unreachable when matched\n"
"Silently discard pkts when matched\n"
"Set tag for this route\n"
- "Tag value\n")
-
+ "Tag value\n"
+ "Distance value for this route\n"
+ VRF_CMD_HELP_STR)
{
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);
+ int idx_curr = 6;
+ char *tag, *distance, *vrf;
+
+ tag = distance = vrf = NULL;
+ zebra_vty_ip_route_tdv_helper (argc, argv, idx_curr, &tag, &distance, &vrf);
+
+ 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,
+ tag, distance, vrf);
}
+
DEFUN (ip_route_mask_flags2,
ip_route_mask_flags2_cmd,
- "ip route A.B.C.D A.B.C.D <reject|blackhole>",
- IP_STR
- "Establish static routes\n"
- "IP destination prefix\n"
- "IP destination prefix mask\n"
- "Emit an ICMP unreachable when matched\n"
- "Silently discard pkts when matched\n")
-{
- 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);
-}
-
-DEFUN (ip_route_mask_flags2_tag,
- ip_route_mask_flags2_tag_cmd,
- "ip route A.B.C.D A.B.C.D <reject|blackhole> tag (1-65535)",
+ "ip route A.B.C.D A.B.C.D <reject|blackhole> [tag (1-65535)] [(1-255)] [vrf NAME]",
IP_STR
"Establish static routes\n"
"IP destination prefix\n"
"Emit an ICMP unreachable when matched\n"
"Silently discard pkts when matched\n"
"Set tag for this route\n"
- "Tag value\n")
+ "Tag value\n"
+ "Distance value for this route\n"
+ VRF_CMD_HELP_STR)
{
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);
+ int idx_curr = 5;
+ char *tag, *distance, *vrf;
+
+ tag = distance = vrf = NULL;
+ zebra_vty_ip_route_tdv_helper (argc, argv, idx_curr, &tag, &distance, &vrf);
+
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 1,
+ argv[idx_ipv4]->arg,
+ argv[idx_ipv4_2]->arg,
+ NULL,
+ argv[idx_reject_blackhole]->arg,
+ tag, distance, vrf);
}
-/* Distance option value. */
-DEFUN (ip_route_distance,
- ip_route_distance_cmd,
- "ip route A.B.C.D/M <A.B.C.D|INTERFACE|null0> (1-255)",
+/*
+ * CHECK ME - The following ALIASes need to be implemented in this DEFUN
+ * "no ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole)",
+ * NO_STR
+ * IP_STR
+ * "Establish static routes\n"
+ * "IP destination prefix (e.g. 10.0.0.0/8)\n"
+ * "IP gateway address\n"
+ * "IP gateway interface name\n"
+ * "Emit an ICMP unreachable when matched\n"
+ * "Silently discard pkts when matched\n"
+ *
+ */
+DEFUN (no_ip_route,
+ no_ip_route_cmd,
+ "no ip route A.B.C.D/M <A.B.C.D|INTERFACE|null0>",
+ NO_STR
IP_STR
"Establish static routes\n"
"IP destination prefix (e.g. 10.0.0.0/8)\n"
"IP gateway address\n"
"IP gateway interface name\n"
- "Null interface\n"
- "Distance value for this route\n")
+ "Null interface\n")
{
- 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);
+ 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);
}
-DEFUN (ip_route_tag_distance,
- ip_route_tag_distance_cmd,
- "ip route A.B.C.D/M <A.B.C.D|INTERFACE|null0> tag (1-65535) (1-255)",
+/*
+ * CHECK ME - The following ALIASes need to be implemented in this DEFUN
+ * "no ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-65535>",
+ * NO_STR
+ * IP_STR
+ * "Establish static routes\n"
+ * "IP destination prefix (e.g. 10.0.0.0/8)\n"
+ * "IP gateway address\n"
+ * "IP gateway interface name\n"
+ * "Emit an ICMP unreachable when matched\n"
+ * "Silently discard pkts when matched\n"
+ * "Tag of this route\n"
+ * "Tag value\n"
+ *
+ */
+DEFUN (no_ip_route_tag,
+ no_ip_route_tag_cmd,
+ "no ip route A.B.C.D/M <A.B.C.D|INTERFACE|null0> tag (1-65535)",
+ NO_STR
IP_STR
"Establish static routes\n"
"IP destination prefix (e.g. 10.0.0.0/8)\n"
"IP gateway address\n"
"IP gateway interface name\n"
"Null interface\n"
- "Set tag for this route\n"
- "Tag value\n"
- "Distance value for this route\n")
-
+ "Tag of this route\n"
+ "Tag value\n")
{
- 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);
+ 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);
}
-DEFUN (ip_route_flags_distance,
- ip_route_flags_distance_cmd,
- "ip route A.B.C.D/M <A.B.C.D|INTERFACE> <reject|blackhole> (1-255)",
+DEFUN (no_ip_route_flags2,
+ no_ip_route_flags2_cmd,
+ "no ip route A.B.C.D/M <reject|blackhole>",
+ NO_STR
IP_STR
"Establish static routes\n"
"IP destination prefix (e.g. 10.0.0.0/8)\n"
- "IP gateway address\n"
- "IP gateway interface name\n"
"Emit an ICMP unreachable when matched\n"
- "Silently discard pkts when matched\n"
- "Distance value for this route\n")
+ "Silently discard pkts when matched\n")
{
- 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);
+ int idx_ipv4_prefixlen = 3;
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, NULL, NULL, NULL,
+ NULL, NULL);
}
-DEFUN (ip_route_flags_tag_distance,
- ip_route_flags_tag_distance_cmd,
- "ip route A.B.C.D/M <A.B.C.D|INTERFACE> <reject|blackhole> tag (1-65535) (1-255)",
+DEFUN (no_ip_route_flags2_tag,
+ no_ip_route_flags2_tag_cmd,
+ "no ip route A.B.C.D/M <reject|blackhole> tag (1-65535)",
+ NO_STR
IP_STR
"Establish static routes\n"
"IP destination prefix (e.g. 10.0.0.0/8)\n"
- "IP gateway address\n"
- "IP gateway interface name\n"
"Emit an ICMP unreachable when matched\n"
"Silently discard pkts when matched\n"
- "Set tag for this route\n"
- "Tag value\n"
- "Distance value for this route\n")
+ "Tag of this route\n"
+ "Tag value\n")
{
- int idx_ipv4_prefixlen = 2;
- int idx_ipv4_ifname = 3;
+ 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, 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,
- ip_route_flags_distance2_cmd,
- "ip route A.B.C.D/M <reject|blackhole> (1-255)",
- IP_STR
- "Establish static routes\n"
- "IP destination prefix (e.g. 10.0.0.0/8)\n"
- "Emit an ICMP unreachable when matched\n"
- "Silently discard pkts when matched\n"
- "Distance value for this route\n")
-{
- 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,
- ip_route_flags_tag_distance2_cmd,
- "ip route A.B.C.D/M <reject|blackhole> tag (1-65535) (1-255)",
- IP_STR
- "Establish static routes\n"
- "IP destination prefix (e.g. 10.0.0.0/8)\n"
- "Emit an ICMP unreachable when matched\n"
- "Silently discard pkts when matched\n"
- "Set tag for this route\n"
- "Tag value\n"
- "Distance value for this route\n")
-{
- 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,
- ip_route_mask_distance_cmd,
- "ip route A.B.C.D A.B.C.D <A.B.C.D|INTERFACE|null0> (1-255)",
- IP_STR
- "Establish static routes\n"
- "IP destination prefix\n"
- "IP destination prefix mask\n"
- "IP gateway address\n"
- "IP gateway interface name\n"
- "Null interface\n"
- "Distance value for this route\n")
-{
- 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,
- ip_route_mask_tag_distance_cmd,
- "ip route A.B.C.D A.B.C.D <A.B.C.D|INTERFACE|null0> tag (1-65535) (1-255)",
- IP_STR
- "Establish static routes\n"
- "IP destination prefix\n"
- "IP destination prefix mask\n"
- "IP gateway address\n"
- "IP gateway interface name\n"
- "Null interface\n"
- "Set tag for this route\n"
- "Tag value\n"
- "Distance value for this route\n")
-{
- 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,
- ip_route_mask_flags_tag_distance_cmd,
- "ip route A.B.C.D A.B.C.D <A.B.C.D|INTERFACE> <reject|blackhole> tag (1-65535) (1-255)",
- IP_STR
- "Establish static routes\n"
- "IP destination prefix\n"
- "IP destination prefix mask\n"
- "IP gateway address\n"
- "IP gateway interface name\n"
- "Set tag for this route\n"
- "Tag value\n"
- "Distance value for this route\n"
- "Emit an ICMP unreachable when matched\n"
- "Silently discard pkts when matched\n")
-{
- 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);
-}
-
-
-DEFUN (ip_route_mask_flags_distance,
- ip_route_mask_flags_distance_cmd,
- "ip route A.B.C.D A.B.C.D <A.B.C.D|INTERFACE> <reject|blackhole> (1-255)",
- IP_STR
- "Establish static routes\n"
- "IP destination prefix\n"
- "IP destination prefix mask\n"
- "IP gateway address\n"
- "IP gateway interface name\n"
- "Emit an ICMP unreachable when matched\n"
- "Silently discard pkts when matched\n"
- "Distance value for this route\n")
-{
- 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,
- ip_route_mask_flags_distance2_cmd,
- "ip route A.B.C.D A.B.C.D <reject|blackhole> (1-255)",
- IP_STR
- "Establish static routes\n"
- "IP destination prefix\n"
- "IP destination prefix mask\n"
- "Emit an ICMP unreachable when matched\n"
- "Silently discard pkts when matched\n"
- "Distance value for this route\n")
-{
- 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,
- ip_route_mask_flags_tag_distance2_cmd,
- "ip route A.B.C.D A.B.C.D <reject|blackhole> tag (1-65535) (1-255)",
- IP_STR
- "Establish static routes\n"
- "IP destination prefix\n"
- "IP destination prefix mask\n"
- "Set tag for this route\n"
- "Tag value\n"
- "Distance value for this route\n"
- "Emit an ICMP unreachable when matched\n"
- "Silently discard pkts when matched\n")
-{
- 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);
-}
-
-/*
- * CHECK ME - The following ALIASes need to be implemented in this DEFUN
- * "no ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole)",
- * NO_STR
- * IP_STR
- * "Establish static routes\n"
- * "IP destination prefix (e.g. 10.0.0.0/8)\n"
- * "IP gateway address\n"
- * "IP gateway interface name\n"
- * "Emit an ICMP unreachable when matched\n"
- * "Silently discard pkts when matched\n"
- *
- */
-DEFUN (no_ip_route,
- no_ip_route_cmd,
- "no ip route A.B.C.D/M <A.B.C.D|INTERFACE|null0>",
- NO_STR
- IP_STR
- "Establish static routes\n"
- "IP destination prefix (e.g. 10.0.0.0/8)\n"
- "IP gateway address\n"
- "IP gateway interface name\n"
- "Null interface\n")
-{
- 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);
-}
-
-/*
- * CHECK ME - The following ALIASes need to be implemented in this DEFUN
- * "no ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-65535>",
- * NO_STR
- * IP_STR
- * "Establish static routes\n"
- * "IP destination prefix (e.g. 10.0.0.0/8)\n"
- * "IP gateway address\n"
- * "IP gateway interface name\n"
- * "Emit an ICMP unreachable when matched\n"
- * "Silently discard pkts when matched\n"
- * "Tag of this route\n"
- * "Tag value\n"
- *
- */
-DEFUN (no_ip_route_tag,
- no_ip_route_tag_cmd,
- "no ip route A.B.C.D/M <A.B.C.D|INTERFACE|null0> tag (1-65535)",
- NO_STR
- IP_STR
- "Establish static routes\n"
- "IP destination prefix (e.g. 10.0.0.0/8)\n"
- "IP gateway address\n"
- "IP gateway interface name\n"
- "Null interface\n"
- "Tag of this route\n"
- "Tag value\n")
-{
- 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);
-}
-
-
-
-DEFUN (no_ip_route_flags2,
- no_ip_route_flags2_cmd,
- "no ip route A.B.C.D/M <reject|blackhole>",
- NO_STR
- IP_STR
- "Establish static routes\n"
- "IP destination prefix (e.g. 10.0.0.0/8)\n"
- "Emit an ICMP unreachable when matched\n"
- "Silently discard pkts when matched\n")
-{
- int idx_ipv4_prefixlen = 3;
- return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, NULL, NULL, NULL,
- NULL, NULL);
-}
-
-DEFUN (no_ip_route_flags2_tag,
- no_ip_route_flags2_tag_cmd,
- "no ip route A.B.C.D/M <reject|blackhole> tag (1-65535)",
- NO_STR
- IP_STR
- "Establish static routes\n"
- "IP destination prefix (e.g. 10.0.0.0/8)\n"
- "Emit an ICMP unreachable when matched\n"
- "Silently discard pkts when matched\n"
- "Tag of this route\n"
- "Tag value\n")
-{
- 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);
+ return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, NULL, NULL, argv[idx_reject_blackhole]->arg,
+ NULL, NULL);
}
/*
argv[idx_number_2]->arg, NULL);
}
-/* Static route configuration. */
-DEFUN (ip_route_vrf,
- ip_route_vrf_cmd,
- "ip route A.B.C.D/M <A.B.C.D|INTERFACE|null0> vrf NAME",
- IP_STR
- "Establish static routes\n"
- "IP destination prefix (e.g. 10.0.0.0/8)\n"
- "IP gateway address\n"
- "IP gateway interface name\n"
- "Null interface\n"
- VRF_CMD_HELP_STR)
-{
- 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,
- ip_route_tag_vrf_cmd,
- "ip route A.B.C.D/M <A.B.C.D|INTERFACE|null0> tag (1-65535) vrf NAME",
- IP_STR
- "Establish static routes\n"
- "IP destination prefix (e.g. 10.0.0.0/8)\n"
- "IP gateway address\n"
- "IP gateway interface name\n"
- "Null interface\n"
- "Set tag for this route\n"
- "Tag value\n"
- VRF_CMD_HELP_STR)
-{
- 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,
- ip_route_flags_vrf_cmd,
- "ip route A.B.C.D/M <A.B.C.D|INTERFACE> <reject|blackhole> vrf NAME",
- IP_STR
- "Establish static routes\n"
- "IP destination prefix (e.g. 10.0.0.0/8)\n"
- "IP gateway address\n"
- "IP gateway interface name\n"
- "Emit an ICMP unreachable when matched\n"
- "Silently discard pkts when matched\n"
- VRF_CMD_HELP_STR)
-{
- 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,
- ip_route_flags_tag_vrf_cmd,
- "ip route A.B.C.D/M <A.B.C.D|INTERFACE> <reject|blackhole> tag (1-65535) vrf NAME",
- IP_STR
- "Establish static routes\n"
- "IP destination prefix (e.g. 10.0.0.0/8)\n"
- "IP gateway address\n"
- "IP gateway interface name\n"
- "Emit an ICMP unreachable when matched\n"
- "Silently discard pkts when matched\n"
- "Set tag for this route\n"
- "Tag value\n"
- VRF_CMD_HELP_STR)
-
-{
- 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,
- ip_route_flags2_vrf_cmd,
- "ip route A.B.C.D/M <reject|blackhole> vrf NAME",
- IP_STR
- "Establish static routes\n"
- "IP destination prefix (e.g. 10.0.0.0/8)\n"
- "Emit an ICMP unreachable when matched\n"
- "Silently discard pkts when matched\n"
- VRF_CMD_HELP_STR)
-{
- 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,
- ip_route_flags2_tag_vrf_cmd,
- "ip route A.B.C.D/M <reject|blackhole> tag (1-65535) vrf NAME",
- IP_STR
- "Establish static routes\n"
- "IP destination prefix (e.g. 10.0.0.0/8)\n"
- "Emit an ICMP unreachable when matched\n"
- "Silently discard pkts when matched\n"
- "Set tag for this route\n"
- "Tag value\n"
- VRF_CMD_HELP_STR)
-
-{
- 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. */
-DEFUN (ip_route_mask_vrf,
- ip_route_mask_vrf_cmd,
- "ip route A.B.C.D A.B.C.D <A.B.C.D|INTERFACE|null0> vrf NAME",
- IP_STR
- "Establish static routes\n"
- "IP destination prefix\n"
- "IP destination prefix mask\n"
- "IP gateway address\n"
- "IP gateway interface name\n"
- "Null interface\n"
- VRF_CMD_HELP_STR)
-{
- 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,
- ip_route_mask_tag_vrf_cmd,
- "ip route A.B.C.D A.B.C.D <A.B.C.D|INTERFACE|null0> tag (1-65535) vrf NAME",
- IP_STR
- "Establish static routes\n"
- "IP destination prefix\n"
- "IP destination prefix mask\n"
- "IP gateway address\n"
- "IP gateway interface name\n"
- "Null interface\n"
- "Set tag for this route\n"
- "Tag value\n"
- VRF_CMD_HELP_STR)
-
-{
- 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,
- ip_route_mask_flags_vrf_cmd,
- "ip route A.B.C.D A.B.C.D <A.B.C.D|INTERFACE> <reject|blackhole> vrf NAME",
- IP_STR
- "Establish static routes\n"
- "IP destination prefix\n"
- "IP destination prefix mask\n"
- "IP gateway address\n"
- "IP gateway interface name\n"
- "Emit an ICMP unreachable when matched\n"
- "Silently discard pkts when matched\n"
- VRF_CMD_HELP_STR)
-{
- 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,
- ip_route_mask_flags_tag_vrf_cmd,
- "ip route A.B.C.D A.B.C.D <A.B.C.D|INTERFACE> <reject|blackhole> tag (1-65535) vrf NAME",
- IP_STR
- "Establish static routes\n"
- "IP destination prefix\n"
- "IP destination prefix mask\n"
- "IP gateway address\n"
- "IP gateway interface name\n"
- "Emit an ICMP unreachable when matched\n"
- "Silently discard pkts when matched\n"
- "Set tag for this route\n"
- "Tag value\n"
- VRF_CMD_HELP_STR)
-
-{
- 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,
- ip_route_mask_flags2_vrf_cmd,
- "ip route A.B.C.D A.B.C.D <reject|blackhole> vrf NAME",
- IP_STR
- "Establish static routes\n"
- "IP destination prefix\n"
- "IP destination prefix mask\n"
- "Emit an ICMP unreachable when matched\n"
- "Silently discard pkts when matched\n"
- VRF_CMD_HELP_STR)
-{
- 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,
- ip_route_mask_flags2_tag_vrf_cmd,
- "ip route A.B.C.D A.B.C.D <reject|blackhole> tag (1-65535) vrf NAME",
- IP_STR
- "Establish static routes\n"
- "IP destination prefix\n"
- "IP destination prefix mask\n"
- "Emit an ICMP unreachable when matched\n"
- "Silently discard pkts when matched\n"
- "Set tag for this route\n"
- "Tag value\n"
- VRF_CMD_HELP_STR)
-{
- 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. */
-DEFUN (ip_route_distance_vrf,
- ip_route_distance_vrf_cmd,
- "ip route A.B.C.D/M <A.B.C.D|INTERFACE|null0> (1-255) vrf NAME",
- IP_STR
- "Establish static routes\n"
- "IP destination prefix (e.g. 10.0.0.0/8)\n"
- "IP gateway address\n"
- "IP gateway interface name\n"
- "Null interface\n"
- "Distance value for this route\n"
- VRF_CMD_HELP_STR)
-{
- 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,
- ip_route_tag_distance_vrf_cmd,
- "ip route A.B.C.D/M <A.B.C.D|INTERFACE|null0> tag (1-65535) (1-255) vrf NAME",
- IP_STR
- "Establish static routes\n"
- "IP destination prefix (e.g. 10.0.0.0/8)\n"
- "IP gateway address\n"
- "IP gateway interface name\n"
- "Null interface\n"
- "Set tag for this route\n"
- "Tag value\n"
- "Distance value for this route\n"
- VRF_CMD_HELP_STR)
-
-{
- 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,
- ip_route_flags_distance_vrf_cmd,
- "ip route A.B.C.D/M <A.B.C.D|INTERFACE> <reject|blackhole> (1-255) vrf NAME",
- IP_STR
- "Establish static routes\n"
- "IP destination prefix (e.g. 10.0.0.0/8)\n"
- "IP gateway address\n"
- "IP gateway interface name\n"
- "Emit an ICMP unreachable when matched\n"
- "Silently discard pkts when matched\n"
- "Distance value for this route\n"
- VRF_CMD_HELP_STR)
-{
- 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,
- ip_route_flags_tag_distance_vrf_cmd,
- "ip route A.B.C.D/M <A.B.C.D|INTERFACE> <reject|blackhole> tag (1-65535) (1-255) vrf NAME",
- IP_STR
- "Establish static routes\n"
- "IP destination prefix (e.g. 10.0.0.0/8)\n"
- "IP gateway address\n"
- "IP gateway interface name\n"
- "Emit an ICMP unreachable when matched\n"
- "Silently discard pkts when matched\n"
- "Set tag for this route\n"
- "Tag value\n"
- "Distance value for this route\n"
- VRF_CMD_HELP_STR)
-{
- 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,
- ip_route_flags_distance2_vrf_cmd,
- "ip route A.B.C.D/M <reject|blackhole> (1-255) vrf NAME",
- IP_STR
- "Establish static routes\n"
- "IP destination prefix (e.g. 10.0.0.0/8)\n"
- "Emit an ICMP unreachable when matched\n"
- "Silently discard pkts when matched\n"
- "Distance value for this route\n"
- VRF_CMD_HELP_STR)
-{
- 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,
- ip_route_flags_tag_distance2_vrf_cmd,
- "ip route A.B.C.D/M <reject|blackhole> tag (1-65535) (1-255) vrf NAME",
- IP_STR
- "Establish static routes\n"
- "IP destination prefix (e.g. 10.0.0.0/8)\n"
- "Emit an ICMP unreachable when matched\n"
- "Silently discard pkts when matched\n"
- "Set tag for this route\n"
- "Tag value\n"
- "Distance value for this route\n"
- VRF_CMD_HELP_STR)
-{
- 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,
- ip_route_mask_distance_vrf_cmd,
- "ip route A.B.C.D A.B.C.D <A.B.C.D|INTERFACE|null0> (1-255) vrf NAME",
- IP_STR
- "Establish static routes\n"
- "IP destination prefix\n"
- "IP destination prefix mask\n"
- "IP gateway address\n"
- "IP gateway interface name\n"
- "Null interface\n"
- "Distance value for this route\n"
- VRF_CMD_HELP_STR)
-{
- 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,
- ip_route_mask_tag_distance_vrf_cmd,
- "ip route A.B.C.D A.B.C.D <A.B.C.D|INTERFACE|null0> tag (1-65535) (1-255) vrf NAME",
- IP_STR
- "Establish static routes\n"
- "IP destination prefix\n"
- "IP destination prefix mask\n"
- "IP gateway address\n"
- "IP gateway interface name\n"
- "Null interface\n"
- "Set tag for this route\n"
- "Tag value\n"
- "Distance value for this route\n"
- VRF_CMD_HELP_STR)
-{
- 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,
- ip_route_mask_flags_tag_distance_vrf_cmd,
- "ip route A.B.C.D A.B.C.D <A.B.C.D|INTERFACE> <reject|blackhole> tag (1-65535) (1-255) vrf NAME",
- IP_STR
- "Establish static routes\n"
- "IP destination prefix\n"
- "IP destination prefix mask\n"
- "IP gateway address\n"
- "IP gateway interface name\n"
- "Set tag for this route\n"
- "Tag value\n"
- "Distance value for this route\n"
- "Emit an ICMP unreachable when matched\n"
- "Silently discard pkts when matched\n"
- VRF_CMD_HELP_STR)
-{
- 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);
-}
-
-
-DEFUN (ip_route_mask_flags_distance_vrf,
- ip_route_mask_flags_distance_vrf_cmd,
- "ip route A.B.C.D A.B.C.D <A.B.C.D|INTERFACE> <reject|blackhole> (1-255) vrf NAME",
- IP_STR
- "Establish static routes\n"
- "IP destination prefix\n"
- "IP destination prefix mask\n"
- "IP gateway address\n"
- "IP gateway interface name\n"
- "Emit an ICMP unreachable when matched\n"
- "Silently discard pkts when matched\n"
- "Distance value for this route\n"
- VRF_CMD_HELP_STR)
-{
- 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,
- ip_route_mask_flags_distance2_vrf_cmd,
- "ip route A.B.C.D A.B.C.D <reject|blackhole> (1-255) vrf NAME",
- IP_STR
- "Establish static routes\n"
- "IP destination prefix\n"
- "IP destination prefix mask\n"
- "Emit an ICMP unreachable when matched\n"
- "Silently discard pkts when matched\n"
- "Distance value for this route\n"
- VRF_CMD_HELP_STR)
-{
- 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,
- ip_route_mask_flags_tag_distance2_vrf_cmd,
- "ip route A.B.C.D A.B.C.D <reject|blackhole> tag (1-65535) (1-255) vrf NAME",
- IP_STR
- "Establish static routes\n"
- "IP destination prefix\n"
- "IP destination prefix mask\n"
- "Set tag for this route\n"
- "Tag value\n"
- "Distance value for this route\n"
- "Emit an ICMP unreachable when matched\n"
- "Silently discard pkts when matched\n"
- VRF_CMD_HELP_STR)
-{
- 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,
no_ip_route_vrf_cmd,
- "no ip route A.B.C.D/M <A.B.C.D|INTERFACE|null0> vrf NAME",
+ "no ip route A.B.C.D/M <A.B.C.D|INTERFACE|null0> " VRF_CMD_STR,
NO_STR
IP_STR
"Establish static routes\n"
DEFUN (no_ip_route_flags_vrf,
no_ip_route_flags_vrf_cmd,
- "no ip route A.B.C.D/M <A.B.C.D|INTERFACE> <reject|blackhole> vrf NAME",
+ "no ip route A.B.C.D/M <A.B.C.D|INTERFACE> <reject|blackhole> " VRF_CMD_STR,
NO_STR
IP_STR
"Establish static routes\n"
DEFUN (no_ip_route_tag_vrf,
no_ip_route_tag_vrf_cmd,
- "no ip route A.B.C.D/M <A.B.C.D|INTERFACE|null0> tag (1-65535) vrf NAME",
+ "no ip route A.B.C.D/M <A.B.C.D|INTERFACE|null0> tag (1-65535) " VRF_CMD_STR,
NO_STR
IP_STR
"Establish static routes\n"
DEFUN (no_ip_route_flags_tag_vrf,
no_ip_route_flags_tag_vrf_cmd,
- "no ip route A.B.C.D/M <A.B.C.D|INTERFACE> <reject|blackhole> tag (1-65535) vrf NAME",
+ "no ip route A.B.C.D/M <A.B.C.D|INTERFACE> <reject|blackhole> tag (1-65535) " VRF_CMD_STR,
NO_STR
IP_STR
"Establish static routes\n"
DEFUN (no_ip_route_flags2_vrf,
no_ip_route_flags2_vrf_cmd,
- "no ip route A.B.C.D/M <reject|blackhole> vrf NAME",
+ "no ip route A.B.C.D/M <reject|blackhole> " VRF_CMD_STR,
NO_STR
IP_STR
"Establish static routes\n"
DEFUN (no_ip_route_flags2_tag_vrf,
no_ip_route_flags2_tag_vrf_cmd,
- "no ip route A.B.C.D/M <reject|blackhole> tag (1-65535) vrf NAME",
+ "no ip route A.B.C.D/M <reject|blackhole> tag (1-65535) " VRF_CMD_STR,
NO_STR
IP_STR
"Establish static routes\n"
DEFUN (no_ip_route_mask_vrf,
no_ip_route_mask_vrf_cmd,
- "no ip route A.B.C.D A.B.C.D <A.B.C.D|INTERFACE|null0> vrf NAME",
+ "no ip route A.B.C.D A.B.C.D <A.B.C.D|INTERFACE|null0> " VRF_CMD_STR,
NO_STR
IP_STR
"Establish static routes\n"
DEFUN (no_ip_route_mask_flags_vrf,
no_ip_route_mask_flags_vrf_cmd,
- "no ip route A.B.C.D A.B.C.D <A.B.C.D|INTERFACE> <reject|blackhole> vrf NAME",
+ "no ip route A.B.C.D A.B.C.D <A.B.C.D|INTERFACE> <reject|blackhole> " VRF_CMD_STR,
NO_STR
IP_STR
"Establish static routes\n"
DEFUN (no_ip_route_mask_tag_vrf,
no_ip_route_mask_tag_vrf_cmd,
- "no ip route A.B.C.D A.B.C.D <A.B.C.D|INTERFACE|null0> tag (1-65535) vrf NAME",
+ "no ip route A.B.C.D A.B.C.D <A.B.C.D|INTERFACE|null0> tag (1-65535) " VRF_CMD_STR,
NO_STR
IP_STR
"Establish static routes\n"
DEFUN (no_ip_route_mask_flags_tag_vrf,
no_ip_route_mask_flags_tag_vrf_cmd,
- "no ip route A.B.C.D A.B.C.D <A.B.C.D|INTERFACE> <reject|blackhole> tag (1-65535) vrf NAME",
+ "no ip route A.B.C.D A.B.C.D <A.B.C.D|INTERFACE> <reject|blackhole> tag (1-65535) " VRF_CMD_STR,
NO_STR
IP_STR
"Establish static routes\n"
DEFUN (no_ip_route_mask_flags2_vrf,
no_ip_route_mask_flags2_vrf_cmd,
- "no ip route A.B.C.D A.B.C.D <reject|blackhole> vrf NAME",
+ "no ip route A.B.C.D A.B.C.D <reject|blackhole> " VRF_CMD_STR,
NO_STR
IP_STR
"Establish static routes\n"
DEFUN (no_ip_route_mask_flags2_tag_vrf,
no_ip_route_mask_flags2_tag_vrf_cmd,
- "no ip route A.B.C.D A.B.C.D <reject|blackhole> tag (1-65535) vrf NAME",
+ "no ip route A.B.C.D A.B.C.D <reject|blackhole> tag (1-65535) " VRF_CMD_STR,
NO_STR
IP_STR
"Establish static routes\n"
DEFUN (no_ip_route_distance_vrf,
no_ip_route_distance_vrf_cmd,
- "no ip route A.B.C.D/M <A.B.C.D|INTERFACE|null0> (1-255) vrf NAME",
+ "no ip route A.B.C.D/M <A.B.C.D|INTERFACE|null0> (1-255) " VRF_CMD_STR,
NO_STR
IP_STR
"Establish static routes\n"
DEFUN (no_ip_route_tag_distance_vrf,
no_ip_route_tag_distance_vrf_cmd,
- "no ip route A.B.C.D/M <A.B.C.D|INTERFACE|null0> tag (1-65535) (1-255) vrf NAME",
+ "no ip route A.B.C.D/M <A.B.C.D|INTERFACE|null0> tag (1-65535) (1-255) " VRF_CMD_STR,
NO_STR
IP_STR
"Establish static routes\n"
DEFUN (no_ip_route_flags_distance_vrf,
no_ip_route_flags_distance_vrf_cmd,
- "no ip route A.B.C.D/M <A.B.C.D|INTERFACE> <reject|blackhole> (1-255) vrf NAME",
+ "no ip route A.B.C.D/M <A.B.C.D|INTERFACE> <reject|blackhole> (1-255) " VRF_CMD_STR,
NO_STR
IP_STR
"Establish static routes\n"
DEFUN (no_ip_route_flags_tag_distance_vrf,
no_ip_route_flags_tag_distance_vrf_cmd,
- "no ip route A.B.C.D/M <A.B.C.D|INTERFACE> <reject|blackhole> tag (1-65535) (1-255) vrf NAME",
+ "no ip route A.B.C.D/M <A.B.C.D|INTERFACE> <reject|blackhole> tag (1-65535) (1-255) " VRF_CMD_STR,
NO_STR
IP_STR
"Establish static routes\n"
DEFUN (no_ip_route_flags_distance2_vrf,
no_ip_route_flags_distance2_vrf_cmd,
- "no ip route A.B.C.D/M <reject|blackhole> (1-255) vrf NAME",
+ "no ip route A.B.C.D/M <reject|blackhole> (1-255) " VRF_CMD_STR,
NO_STR
IP_STR
"Establish static routes\n"
DEFUN (no_ip_route_flags_tag_distance2_vrf,
no_ip_route_flags_tag_distance2_vrf_cmd,
- "no ip route A.B.C.D/M <reject|blackhole> tag (1-65535) (1-255) vrf NAME",
+ "no ip route A.B.C.D/M <reject|blackhole> tag (1-65535) (1-255) " VRF_CMD_STR,
NO_STR
IP_STR
"Establish static routes\n"
DEFUN (no_ip_route_mask_distance_vrf,
no_ip_route_mask_distance_vrf_cmd,
- "no ip route A.B.C.D A.B.C.D <A.B.C.D|INTERFACE|null0> (1-255) vrf NAME",
+ "no ip route A.B.C.D A.B.C.D <A.B.C.D|INTERFACE|null0> (1-255) " VRF_CMD_STR,
NO_STR
IP_STR
"Establish static routes\n"
DEFUN (no_ip_route_mask_tag_distance_vrf,
no_ip_route_mask_tag_distance_vrf_cmd,
- "no ip route A.B.C.D A.B.C.D <A.B.C.D|INTERFACE|null0> tag (1-65535) (1-255) vrf NAME",
+ "no ip route A.B.C.D A.B.C.D <A.B.C.D|INTERFACE|null0> tag (1-65535) (1-255) " VRF_CMD_STR,
NO_STR
IP_STR
"Establish static routes\n"
DEFUN (no_ip_route_mask_flags_distance_vrf,
no_ip_route_mask_flags_distance_vrf_cmd,
- "no ip route A.B.C.D A.B.C.D <A.B.C.D|INTERFACE> <reject|blackhole> (1-255) vrf NAME",
+ "no ip route A.B.C.D A.B.C.D <A.B.C.D|INTERFACE> <reject|blackhole> (1-255) " VRF_CMD_STR,
NO_STR
IP_STR
"Establish static routes\n"
DEFUN (no_ip_route_mask_flags_tag_distance_vrf,
no_ip_route_mask_flags_tag_distance_vrf_cmd,
- "no ip route A.B.C.D A.B.C.D <A.B.C.D|INTERFACE> <reject|blackhole> tag (1-65535) (1-255) vrf NAME",
+ "no ip route A.B.C.D A.B.C.D <A.B.C.D|INTERFACE> <reject|blackhole> tag (1-65535) (1-255) " VRF_CMD_STR,
NO_STR
IP_STR
"Establish static routes\n"
DEFUN (no_ip_route_mask_flags_distance2_vrf,
no_ip_route_mask_flags_distance2_vrf_cmd,
- "no ip route A.B.C.D A.B.C.D <reject|blackhole> (1-255) vrf NAME",
+ "no ip route A.B.C.D A.B.C.D <reject|blackhole> (1-255) " VRF_CMD_STR,
NO_STR
IP_STR
"Establish static routes\n"
DEFUN (no_ip_route_mask_flags_tag_distance2_vrf,
no_ip_route_mask_flags_tag_distance2_vrf_cmd,
- "no ip route A.B.C.D A.B.C.D <reject|blackhole> tag (1-65535) (1-255) vrf NAME",
+ "no ip route A.B.C.D A.B.C.D <reject|blackhole> tag (1-65535) (1-255) " VRF_CMD_STR,
NO_STR
IP_STR
"Establish static routes\n"
DEFUN (show_ip_route_vrf,
show_ip_route_vrf_cmd,
- "show ip route vrf NAME [json]",
+ "show ip route " VRF_CMD_STR " [json]",
SHOW_STR
IP_STR
"IP routing table\n"
DEFUN (show_ip_nht_vrf_all,
show_ip_nht_vrf_all_cmd,
- "show ip nht vrf all",
+ "show ip nht " VRF_ALL_CMD_STR,
SHOW_STR
IP_STR
"IP nexthop tracking table\n"
DEFUN (show_ipv6_nht_vrf_all,
show_ipv6_nht_vrf_all_cmd,
- "show ipv6 nht vrf all",
+ "show ipv6 nht " VRF_ALL_CMD_STR,
SHOW_STR
IP_STR
"IPv6 nexthop tracking table\n"
DEFUN (show_ip_route_protocol,
show_ip_route_protocol_cmd,
- "show ip route [vrf NAME] <kernel|connected|static|rip|ospf|isis|bgp|pim|table>",
+ "show ip route [vrf NAME] " QUAGGA_IP_REDIST_STR_ZEBRA,
SHOW_STR
IP_STR
"IP routing table\n"
DEFUN (show_ip_route_vrf_all,
show_ip_route_vrf_all_cmd,
- "show ip route vrf all",
+ "show ip route " VRF_ALL_CMD_STR,
SHOW_STR
IP_STR
"IP routing table\n"
DEFUN (show_ip_route_vrf_all_tag,
show_ip_route_vrf_all_tag_cmd,
- "show ip route vrf all tag (1-65535)",
+ "show ip route " VRF_ALL_CMD_STR " tag (1-65535)",
SHOW_STR
IP_STR
"IP routing table\n"
DEFUN (show_ip_route_vrf_all_prefix_longer,
show_ip_route_vrf_all_prefix_longer_cmd,
- "show ip route vrf all A.B.C.D/M longer-prefixes",
+ "show ip route " VRF_ALL_CMD_STR " A.B.C.D/M longer-prefixes",
SHOW_STR
IP_STR
"IP routing table\n"
DEFUN (show_ip_route_vrf_all_supernets,
show_ip_route_vrf_all_supernets_cmd,
- "show ip route vrf all supernets-only",
+ "show ip route " VRF_ALL_CMD_STR " supernets-only",
SHOW_STR
IP_STR
"IP routing table\n"
DEFUN (show_ip_route_vrf_all_protocol,
show_ip_route_vrf_all_protocol_cmd,
- "show ip route vrf all <kernel|connected|static|rip|ospf|isis|bgp|pim|table>",
+ "show ip route " VRF_ALL_CMD_STR " " QUAGGA_IP_REDIST_STR_ZEBRA,
SHOW_STR
IP_STR
"IP routing table\n"
DEFUN (show_ip_route_vrf_all_addr,
show_ip_route_vrf_all_addr_cmd,
- "show ip route vrf all A.B.C.D",
+ "show ip route " VRF_ALL_CMD_STR " A.B.C.D",
SHOW_STR
IP_STR
"IP routing table\n"
DEFUN (show_ip_route_vrf_all_prefix,
show_ip_route_vrf_all_prefix_cmd,
- "show ip route vrf all A.B.C.D/M",
+ "show ip route " VRF_ALL_CMD_STR " A.B.C.D/M",
SHOW_STR
IP_STR
"IP routing table\n"
DEFUN (show_ip_route_vrf_all_summary,
show_ip_route_vrf_all_summary_cmd,
- "show ip route vrf all summary ",
+ "show ip route " VRF_ALL_CMD_STR " summary ",
SHOW_STR
IP_STR
"IP routing table\n"
DEFUN (show_ip_route_vrf_all_summary_prefix,
show_ip_route_vrf_all_summary_prefix_cmd,
- "show ip route vrf all summary prefix",
+ "show ip route " VRF_ALL_CMD_STR " summary prefix",
SHOW_STR
IP_STR
"IP routing table\n"
DEFUN (ipv6_route_vrf,
ipv6_route_vrf_cmd,
- "ipv6 route X:X::X:X/M <X:X::X:X|INTERFACE> vrf NAME",
+ "ipv6 route X:X::X:X/M <X:X::X:X|INTERFACE> " VRF_CMD_STR,
IP_STR
"Establish static routes\n"
"IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
DEFUN (ipv6_route_tag_vrf,
ipv6_route_tag_vrf_cmd,
- "ipv6 route X:X::X:X/M <X:X::X:X|INTERFACE> tag (1-65535) vrf NAME",
+ "ipv6 route X:X::X:X/M <X:X::X:X|INTERFACE> tag (1-65535) " VRF_CMD_STR,
IP_STR
"Establish static routes\n"
"IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
DEFUN (ipv6_route_flags_vrf,
ipv6_route_flags_vrf_cmd,
- "ipv6 route X:X::X:X/M <X:X::X:X|INTERFACE> <reject|blackhole> vrf NAME",
+ "ipv6 route X:X::X:X/M <X:X::X:X|INTERFACE> <reject|blackhole> " VRF_CMD_STR,
IP_STR
"Establish static routes\n"
"IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
DEFUN (ipv6_route_flags_tag_vrf,
ipv6_route_flags_tag_vrf_cmd,
- "ipv6 route X:X::X:X/M <X:X::X:X|INTERFACE> <reject|blackhole> tag (1-65535) vrf NAME",
+ "ipv6 route X:X::X:X/M <X:X::X:X|INTERFACE> <reject|blackhole> tag (1-65535) " VRF_CMD_STR,
IP_STR
"Establish static routes\n"
"IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
DEFUN (ipv6_route_ifname_vrf,
ipv6_route_ifname_vrf_cmd,
- "ipv6 route X:X::X:X/M X:X::X:X INTERFACE vrf NAME",
+ "ipv6 route X:X::X:X/M X:X::X:X INTERFACE " VRF_CMD_STR,
IP_STR
"Establish static routes\n"
"IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
}
DEFUN (ipv6_route_ifname_tag_vrf,
ipv6_route_ifname_tag_vrf_cmd,
- "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) vrf NAME",
+ "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) " VRF_CMD_STR,
IP_STR
"Establish static routes\n"
"IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
DEFUN (ipv6_route_ifname_flags_vrf,
ipv6_route_ifname_flags_vrf_cmd,
- "ipv6 route X:X::X:X/M X:X::X:X INTERFACE <reject|blackhole> vrf NAME",
+ "ipv6 route X:X::X:X/M X:X::X:X INTERFACE <reject|blackhole> " VRF_CMD_STR,
IP_STR
"Establish static routes\n"
"IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
DEFUN (ipv6_route_ifname_flags_tag_vrf,
ipv6_route_ifname_flags_tag_vrf_cmd,
- "ipv6 route X:X::X:X/M X:X::X:X INTERFACE <reject|blackhole> tag (1-65535) vrf NAME",
+ "ipv6 route X:X::X:X/M X:X::X:X INTERFACE <reject|blackhole> tag (1-65535) " VRF_CMD_STR,
IP_STR
"Establish static routes\n"
"IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
DEFUN (ipv6_route_pref_vrf,
ipv6_route_pref_vrf_cmd,
- "ipv6 route X:X::X:X/M <X:X::X:X|INTERFACE> (1-255) vrf NAME",
+ "ipv6 route X:X::X:X/M <X:X::X:X|INTERFACE> (1-255) " VRF_CMD_STR,
IP_STR
"Establish static routes\n"
"IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
DEFUN (ipv6_route_pref_tag_vrf,
ipv6_route_pref_tag_vrf_cmd,
- "ipv6 route X:X::X:X/M <X:X::X:X|INTERFACE> tag (1-65535) (1-255) vrf NAME",
+ "ipv6 route X:X::X:X/M <X:X::X:X|INTERFACE> tag (1-65535) (1-255) " VRF_CMD_STR,
IP_STR
"Establish static routes\n"
"IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
DEFUN (ipv6_route_flags_pref_vrf,
ipv6_route_flags_pref_vrf_cmd,
- "ipv6 route X:X::X:X/M <X:X::X:X|INTERFACE> <reject|blackhole> (1-255) vrf NAME",
+ "ipv6 route X:X::X:X/M <X:X::X:X|INTERFACE> <reject|blackhole> (1-255) " VRF_CMD_STR,
IP_STR
"Establish static routes\n"
"IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
DEFUN (ipv6_route_flags_pref_tag_vrf,
ipv6_route_flags_pref_tag_vrf_cmd,
- "ipv6 route X:X::X:X/M <X:X::X:X|INTERFACE> <reject|blackhole> tag (1-65535) (1-255) vrf NAME",
+ "ipv6 route X:X::X:X/M <X:X::X:X|INTERFACE> <reject|blackhole> tag (1-65535) (1-255) " VRF_CMD_STR,
IP_STR
"Establish static routes\n"
"IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
DEFUN (ipv6_route_ifname_pref_vrf,
ipv6_route_ifname_pref_vrf_cmd,
- "ipv6 route X:X::X:X/M X:X::X:X INTERFACE (1-255) vrf NAME",
+ "ipv6 route X:X::X:X/M X:X::X:X INTERFACE (1-255) " VRF_CMD_STR,
IP_STR
"Establish static routes\n"
"IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
DEFUN (ipv6_route_ifname_pref_tag_vrf,
ipv6_route_ifname_pref_tag_vrf_cmd,
- "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) (1-255) vrf NAME",
+ "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) (1-255) " VRF_CMD_STR,
IP_STR
"Establish static routes\n"
"IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
DEFUN (ipv6_route_ifname_flags_pref_vrf,
ipv6_route_ifname_flags_pref_vrf_cmd,
- "ipv6 route X:X::X:X/M X:X::X:X INTERFACE <reject|blackhole> (1-255) vrf NAME",
+ "ipv6 route X:X::X:X/M X:X::X:X INTERFACE <reject|blackhole> (1-255) " VRF_CMD_STR,
IP_STR
"Establish static routes\n"
"IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
DEFUN (ipv6_route_ifname_flags_pref_tag_vrf,
ipv6_route_ifname_flags_pref_tag_vrf_cmd,
- "ipv6 route X:X::X:X/M X:X::X:X INTERFACE <reject|blackhole> tag (1-65535) (1-255) vrf NAME",
+ "ipv6 route X:X::X:X/M X:X::X:X INTERFACE <reject|blackhole> tag (1-65535) (1-255) " VRF_CMD_STR,
IP_STR
"Establish static routes\n"
"IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
DEFUN (no_ipv6_route_vrf,
no_ipv6_route_vrf_cmd,
- "no ipv6 route X:X::X:X/M <X:X::X:X|INTERFACE> vrf NAME",
+ "no ipv6 route X:X::X:X/M <X:X::X:X|INTERFACE> " VRF_CMD_STR,
NO_STR
IP_STR
"Establish static routes\n"
DEFUN (no_ipv6_route_tag_vrf,
no_ipv6_route_tag_vrf_cmd,
- "no ipv6 route X:X::X:X/M <X:X::X:X|INTERFACE> tag (1-65535) vrf NAME",
+ "no ipv6 route X:X::X:X/M <X:X::X:X|INTERFACE> tag (1-65535) " VRF_CMD_STR,
NO_STR
IP_STR
"Establish static routes\n"
DEFUN (no_ipv6_route_flags_vrf,
no_ipv6_route_flags_vrf_cmd,
- "no ipv6 route X:X::X:X/M <X:X::X:X|INTERFACE> <reject|blackhole> vrf NAME",
+ "no ipv6 route X:X::X:X/M <X:X::X:X|INTERFACE> <reject|blackhole> " VRF_CMD_STR,
NO_STR
IP_STR
"Establish static routes\n"
DEFUN (no_ipv6_route_flags_tag_vrf,
no_ipv6_route_flags_tag_vrf_cmd,
- "no ipv6 route X:X::X:X/M <X:X::X:X|INTERFACE> <reject|blackhole> tag (1-65535) vrf NAME",
+ "no ipv6 route X:X::X:X/M <X:X::X:X|INTERFACE> <reject|blackhole> tag (1-65535) " VRF_CMD_STR,
NO_STR
IP_STR
"Establish static routes\n"
DEFUN (no_ipv6_route_ifname_vrf,
no_ipv6_route_ifname_vrf_cmd,
- "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE vrf NAME",
+ "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE " VRF_CMD_STR,
NO_STR
IP_STR
"Establish static routes\n"
DEFUN (no_ipv6_route_ifname_tag_vrf,
no_ipv6_route_ifname_tag_vrf_cmd,
- "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) vrf NAME",
+ "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) " VRF_CMD_STR,
NO_STR
IP_STR
"Establish static routes\n"
DEFUN (no_ipv6_route_ifname_flags_vrf,
no_ipv6_route_ifname_flags_vrf_cmd,
- "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE <reject|blackhole> vrf NAME",
+ "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE <reject|blackhole> " VRF_CMD_STR,
NO_STR
IP_STR
"Establish static routes\n"
DEFUN (no_ipv6_route_ifname_flags_tag_vrf,
no_ipv6_route_ifname_flags_tag_vrf_cmd,
- "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE <reject|blackhole> tag (1-65535) vrf NAME",
+ "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE <reject|blackhole> tag (1-65535) " VRF_CMD_STR,
NO_STR
IP_STR
"Establish static routes\n"
DEFUN (no_ipv6_route_pref_vrf,
no_ipv6_route_pref_vrf_cmd,
- "no ipv6 route X:X::X:X/M <X:X::X:X|INTERFACE> (1-255) vrf NAME",
+ "no ipv6 route X:X::X:X/M <X:X::X:X|INTERFACE> (1-255) " VRF_CMD_STR,
NO_STR
IP_STR
"Establish static routes\n"
DEFUN (no_ipv6_route_pref_tag_vrf,
no_ipv6_route_pref_tag_vrf_cmd,
- "no ipv6 route X:X::X:X/M <X:X::X:X|INTERFACE> tag (1-65535) (1-255) vrf NAME",
+ "no ipv6 route X:X::X:X/M <X:X::X:X|INTERFACE> tag (1-65535) (1-255) " VRF_CMD_STR,
NO_STR
IP_STR
"Establish static routes\n"
DEFUN (no_ipv6_route_flags_pref_vrf,
no_ipv6_route_flags_pref_vrf_cmd,
- "no ipv6 route X:X::X:X/M <X:X::X:X|INTERFACE> <reject|blackhole> (1-255) vrf NAME",
+ "no ipv6 route X:X::X:X/M <X:X::X:X|INTERFACE> <reject|blackhole> (1-255) " VRF_CMD_STR,
NO_STR
IP_STR
"Establish static routes\n"
DEFUN (no_ipv6_route_flags_pref_tag_vrf,
no_ipv6_route_flags_pref_tag_vrf_cmd,
- "no ipv6 route X:X::X:X/M <X:X::X:X|INTERFACE> <reject|blackhole> tag (1-65535) (1-255) vrf NAME",
+ "no ipv6 route X:X::X:X/M <X:X::X:X|INTERFACE> <reject|blackhole> tag (1-65535) (1-255) " VRF_CMD_STR,
NO_STR
IP_STR
"Establish static routes\n"
DEFUN (no_ipv6_route_ifname_pref_vrf,
no_ipv6_route_ifname_pref_vrf_cmd,
- "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE (1-255) vrf NAME",
+ "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE (1-255) " VRF_CMD_STR,
NO_STR
IP_STR
"Establish static routes\n"
DEFUN (no_ipv6_route_ifname_pref_tag_vrf,
no_ipv6_route_ifname_pref_tag_vrf_cmd,
- "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) (1-255) vrf NAME",
+ "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) (1-255) " VRF_CMD_STR,
NO_STR
IP_STR
"Establish static routes\n"
DEFUN (no_ipv6_route_ifname_flags_pref_vrf,
no_ipv6_route_ifname_flags_pref_vrf_cmd,
- "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE <reject|blackhole> (1-255) vrf NAME",
+ "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE <reject|blackhole> (1-255) " VRF_CMD_STR,
NO_STR
IP_STR
"Establish static routes\n"
DEFUN (no_ipv6_route_ifname_flags_pref_tag_vrf,
no_ipv6_route_ifname_flags_pref_tag_vrf_cmd,
- "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE <reject|blackhole> tag (1-65535) (1-255) vrf NAME",
+ "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE <reject|blackhole> tag (1-65535) (1-255) " VRF_CMD_STR,
NO_STR
IP_STR
"Establish static routes\n"
/*
* CHECK ME - The following ALIASes need to be implemented in this DEFUN
- * "show ipv6 route vrf NAME [json]",
+ * "show ipv6 route " VRF_CMD_STR " [json]",
* SHOW_STR
* IP_STR
* "IPv6 routing table\n"
/*
* CHECK ME - The following ALIASes need to be implemented in this DEFUN
- * "show ipv6 route vrf NAME <kernel|connected|static|ripng|ospf6|isis|bgp|table>",
+ * "show ipv6 route " VRF_CMD_STR " " QUAGGA_IP6_REDIST_STR_ZEBRA,
* SHOW_STR
* IP_STR
* "IP routing table\n"
*/
DEFUN (show_ipv6_route_protocol,
show_ipv6_route_protocol_cmd,
- "show ipv6 route <kernel|connected|static|ripng|ospf6|isis|bgp|table>",
+ "show ipv6 route " QUAGGA_IP6_REDIST_STR_ZEBRA,
SHOW_STR
IP_STR
"IP routing table\n"
DEFUN (show_ipv6_route_vrf_all,
show_ipv6_route_vrf_all_cmd,
- "show ipv6 route vrf all",
+ "show ipv6 route " VRF_ALL_CMD_STR,
SHOW_STR
IP_STR
"IPv6 routing table\n"
DEFUN (show_ipv6_route_vrf_all_tag,
show_ipv6_route_vrf_all_tag_cmd,
- "show ipv6 route vrf all tag (1-65535)",
+ "show ipv6 route " VRF_ALL_CMD_STR " tag (1-65535)",
SHOW_STR
IP_STR
"IPv6 routing table\n"
DEFUN (show_ipv6_route_vrf_all_prefix_longer,
show_ipv6_route_vrf_all_prefix_longer_cmd,
- "show ipv6 route vrf all X:X::X:X/M longer-prefixes",
+ "show ipv6 route " VRF_ALL_CMD_STR " X:X::X:X/M longer-prefixes",
SHOW_STR
IP_STR
"IPv6 routing table\n"
DEFUN (show_ipv6_route_vrf_all_protocol,
show_ipv6_route_vrf_all_protocol_cmd,
- "show ipv6 route vrf all <kernel|connected|static|ripng|ospf6|isis|bgp|table>",
+ "show ipv6 route " VRF_ALL_CMD_STR " " QUAGGA_IP6_REDIST_STR_ZEBRA,
SHOW_STR
IP_STR
"IP routing table\n"
DEFUN (show_ipv6_route_vrf_all_addr,
show_ipv6_route_vrf_all_addr_cmd,
- "show ipv6 route vrf all X:X::X:X",
+ "show ipv6 route " VRF_ALL_CMD_STR " X:X::X:X",
SHOW_STR
IP_STR
"IPv6 routing table\n"
DEFUN (show_ipv6_route_vrf_all_prefix,
show_ipv6_route_vrf_all_prefix_cmd,
- "show ipv6 route vrf all X:X::X:X/M",
+ "show ipv6 route " VRF_ALL_CMD_STR " X:X::X:X/M",
SHOW_STR
IP_STR
"IPv6 routing table\n"
DEFUN (show_ipv6_route_vrf_all_summary,
show_ipv6_route_vrf_all_summary_cmd,
- "show ipv6 route vrf all summary",
+ "show ipv6 route " VRF_ALL_CMD_STR " summary",
SHOW_STR
IP_STR
"IPv6 routing table\n"
DEFUN (show_ipv6_mroute_vrf_all,
show_ipv6_mroute_vrf_all_cmd,
- "show ipv6 mroute vrf all",
+ "show ipv6 mroute " VRF_ALL_CMD_STR,
SHOW_STR
IP_STR
"IPv6 Multicast routing table\n"
DEFUN (show_ipv6_route_vrf_all_summary_prefix,
show_ipv6_route_vrf_all_summary_prefix_cmd,
- "show ipv6 route vrf all summary prefix",
+ "show ipv6 route " VRF_ALL_CMD_STR " summary prefix",
SHOW_STR
IP_STR
"IPv6 routing table\n"
install_element (CONFIG_NODE, &ip_multicast_mode_cmd);
install_element (CONFIG_NODE, &no_ip_multicast_mode_cmd);
install_element (CONFIG_NODE, &ip_route_cmd);
- install_element (CONFIG_NODE, &ip_route_tag_cmd);
install_element (CONFIG_NODE, &ip_route_flags_cmd);
- install_element (CONFIG_NODE, &ip_route_flags_tag_cmd);
install_element (CONFIG_NODE, &ip_route_flags2_cmd);
- install_element (CONFIG_NODE, &ip_route_flags2_tag_cmd);
install_element (CONFIG_NODE, &ip_route_mask_cmd);
- install_element (CONFIG_NODE, &ip_route_mask_tag_cmd);
install_element (CONFIG_NODE, &ip_route_mask_flags_cmd);
- install_element (CONFIG_NODE, &ip_route_mask_flags_tag_cmd);
install_element (CONFIG_NODE, &ip_route_mask_flags2_cmd);
- install_element (CONFIG_NODE, &ip_route_mask_flags2_tag_cmd);
install_element (CONFIG_NODE, &no_ip_route_cmd);
install_element (CONFIG_NODE, &no_ip_route_tag_cmd);
install_element (CONFIG_NODE, &no_ip_route_flags2_cmd);
install_element (CONFIG_NODE, &no_ip_route_mask_tag_cmd);
install_element (CONFIG_NODE, &no_ip_route_mask_flags2_cmd);
install_element (CONFIG_NODE, &no_ip_route_mask_flags2_tag_cmd);
- install_element (CONFIG_NODE, &ip_route_distance_cmd);
- install_element (CONFIG_NODE, &ip_route_tag_distance_cmd);
- install_element (CONFIG_NODE, &ip_route_flags_distance_cmd);
- install_element (CONFIG_NODE, &ip_route_flags_tag_distance_cmd);
- install_element (CONFIG_NODE, &ip_route_flags_distance2_cmd);
- install_element (CONFIG_NODE, &ip_route_flags_tag_distance2_cmd);
- install_element (CONFIG_NODE, &ip_route_mask_distance_cmd);
- install_element (CONFIG_NODE, &ip_route_mask_tag_distance_cmd);
- install_element (CONFIG_NODE, &ip_route_mask_flags_distance_cmd);
- install_element (CONFIG_NODE, &ip_route_mask_flags_tag_distance_cmd);
- install_element (CONFIG_NODE, &ip_route_mask_flags_distance2_cmd);
- install_element (CONFIG_NODE, &ip_route_mask_flags_tag_distance2_cmd);
install_element (CONFIG_NODE, &no_ip_route_distance_cmd);
install_element (CONFIG_NODE, &no_ip_route_tag_distance_cmd);
install_element (CONFIG_NODE, &no_ip_route_flags_distance_cmd);
/* Commands for VRF */
- install_element (CONFIG_NODE, &ip_route_vrf_cmd);
- install_element (CONFIG_NODE, &ip_route_tag_vrf_cmd);
- install_element (CONFIG_NODE, &ip_route_flags_vrf_cmd);
- install_element (CONFIG_NODE, &ip_route_flags_tag_vrf_cmd);
- install_element (CONFIG_NODE, &ip_route_flags2_vrf_cmd);
- install_element (CONFIG_NODE, &ip_route_flags2_tag_vrf_cmd);
- install_element (CONFIG_NODE, &ip_route_mask_vrf_cmd);
- install_element (CONFIG_NODE, &ip_route_mask_tag_vrf_cmd);
- install_element (CONFIG_NODE, &ip_route_mask_flags_vrf_cmd);
- install_element (CONFIG_NODE, &ip_route_mask_flags_tag_vrf_cmd);
- install_element (CONFIG_NODE, &ip_route_mask_flags2_vrf_cmd);
- install_element (CONFIG_NODE, &ip_route_mask_flags2_tag_vrf_cmd);
install_element (CONFIG_NODE, &no_ip_route_vrf_cmd);
install_element (CONFIG_NODE, &no_ip_route_tag_vrf_cmd);
install_element (CONFIG_NODE, &no_ip_route_flags_vrf_cmd);
install_element (CONFIG_NODE, &no_ip_route_mask_flags_tag_vrf_cmd);
install_element (CONFIG_NODE, &no_ip_route_mask_flags2_vrf_cmd);
install_element (CONFIG_NODE, &no_ip_route_mask_flags2_tag_vrf_cmd);
- install_element (CONFIG_NODE, &ip_route_distance_vrf_cmd);
- install_element (CONFIG_NODE, &ip_route_tag_distance_vrf_cmd);
- install_element (CONFIG_NODE, &ip_route_flags_distance_vrf_cmd);
- install_element (CONFIG_NODE, &ip_route_flags_tag_distance_vrf_cmd);
- install_element (CONFIG_NODE, &ip_route_flags_distance2_vrf_cmd);
- install_element (CONFIG_NODE, &ip_route_flags_tag_distance2_vrf_cmd);
- install_element (CONFIG_NODE, &ip_route_mask_distance_vrf_cmd);
- install_element (CONFIG_NODE, &ip_route_mask_tag_distance_vrf_cmd);
- install_element (CONFIG_NODE, &ip_route_mask_flags_distance_vrf_cmd);
- install_element (CONFIG_NODE, &ip_route_mask_flags_tag_distance_vrf_cmd);
- install_element (CONFIG_NODE, &ip_route_mask_flags_distance2_vrf_cmd);
- install_element (CONFIG_NODE, &ip_route_mask_flags_tag_distance2_vrf_cmd);
install_element (CONFIG_NODE, &no_ip_route_distance_vrf_cmd);
install_element (CONFIG_NODE, &no_ip_route_tag_distance_vrf_cmd);
install_element (CONFIG_NODE, &no_ip_route_flags_distance_vrf_cmd);