DEFUN (show_ipv6_route,
show_ipv6_route_cmd,
- "show ipv6 route [vrf NAME] [json]",
+ "show ipv6 <fib|route> [vrf NAME] [json]",
SHOW_STR
IP_STR
+ "IPv6 forwarding table\n"
"IPv6 routing table\n"
VRF_CMD_HELP_STR
"Output JSON\n")
char buf[SRCDEST2STR_BUFFER];
json_object *json = NULL;
json_object *json_prefix = NULL;
+ bool uf = use_fib(argv[2]);
int vrf = (argc > 3 && strmatch (argv[3]->text, "vrf"));
int uj = vrf ? argc == 6 : argc == 4;
{
RNODE_FOREACH_RIB (rn, rib)
{
+ if (uf && !CHECK_FLAG(rib->status, RIB_ENTRY_SELECTED_FIB))
+ continue;
if (!json_prefix)
json_prefix = json_object_new_array();
vty_show_ip_route (vty, rn, rib, json_prefix);
{
RNODE_FOREACH_RIB (rn, rib)
{
+ if (uf && !CHECK_FLAG(rib->status, RIB_ENTRY_SELECTED_FIB))
+ continue;
if (first)
{
vty_out (vty, SHOW_ROUTE_V6_HEADER);
DEFUN (show_ipv6_route_tag,
show_ipv6_route_tag_cmd,
- "show ipv6 route [vrf NAME] tag (1-4294967295)",
+ "show ipv6 <fib|route> [vrf NAME] tag (1-4294967295)",
SHOW_STR
IP_STR
+ "IPv6 forwarding table\n"
"IPv6 routing table\n"
VRF_CMD_HELP_STR
"Show only routes with tag\n"
int first = 1;
route_tag_t tag = 0;
vrf_id_t vrf_id = VRF_DEFAULT;
+ bool uf = use_fib(argv[2]);
if (strmatch(argv[idx_vrf]->text, "vrf"))
{
for (rn = route_top (table); rn; rn = srcdest_route_next (rn))
RNODE_FOREACH_RIB (rn, rib)
{
+ if (uf && !CHECK_FLAG(rib->status, RIB_ENTRY_SELECTED_FIB))
+ continue;
if (rib->tag != tag)
continue;
DEFUN (show_ipv6_route_prefix_longer,
show_ipv6_route_prefix_longer_cmd,
- "show ipv6 route [vrf NAME] X:X::X:X/M longer-prefixes",
+ "show ipv6 <fib|route> [vrf NAME] X:X::X:X/M longer-prefixes",
SHOW_STR
IP_STR
+ "IPv6 forwarding table\n"
"IPv6 routing table\n"
VRF_CMD_HELP_STR
"IPv6 prefix\n"
int ret;
int first = 1;
vrf_id_t vrf_id = VRF_DEFAULT;
+ bool uf = use_fib(argv[2]);
if (strmatch(argv[3]->text, "vrf"))
{
struct prefix *p, *src_p;
srcdest_rnode_prefixes(rn, &p, &src_p);
+ if (uf && !CHECK_FLAG(rib->status, RIB_ENTRY_SELECTED_FIB))
+ continue;
if (prefix_match (p, &rn->p))
{
if (first)
DEFUN (show_ipv6_route_protocol,
show_ipv6_route_protocol_cmd,
- "show ipv6 route [vrf NAME] " FRR_IP6_REDIST_STR_ZEBRA,
+ "show ipv6 <fib|route> [vrf NAME] " FRR_IP6_REDIST_STR_ZEBRA,
SHOW_STR
IP_STR
- "IP routing table\n"
+ "IPv6 forwarding table\n"
+ "IPv6 routing table\n"
VRF_CMD_HELP_STR
FRR_IP6_REDIST_HELP_STR_ZEBRA)
{
struct rib *rib;
int first = 1;
vrf_id_t vrf_id = VRF_DEFAULT;
+ bool uf = use_fib(argv[2]);
int idx = 0;
if (argv_find (argv, argc, "NAME", &idx))
RNODE_FOREACH_RIB (rn, rib)
if (rib->type == type)
{
+ if (uf && !CHECK_FLAG(rib->status, RIB_ENTRY_SELECTED_FIB))
+ continue;
if (first)
{
vty_out (vty, SHOW_ROUTE_V6_HEADER);
DEFUN (show_ipv6_route_vrf_all,
show_ipv6_route_vrf_all_cmd,
- "show ipv6 route vrf all",
+ "show ipv6 <fib|route> vrf all",
SHOW_STR
IP_STR
+ "IPv6 forwarding table\n"
"IPv6 routing table\n"
VRF_ALL_CMD_HELP_STR)
{
struct zebra_vrf *zvrf;
int first = 1;
int vrf_header = 1;
+ bool uf = use_fib(argv[2]);
RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name)
{
for (rn = route_top (table); rn; rn = srcdest_route_next (rn))
RNODE_FOREACH_RIB (rn, rib)
{
+ if (uf && !CHECK_FLAG(rib->status, RIB_ENTRY_SELECTED_FIB))
+ continue;
if (first)
{
vty_out (vty, SHOW_ROUTE_V6_HEADER);
DEFUN (show_ipv6_route_vrf_all_tag,
show_ipv6_route_vrf_all_tag_cmd,
- "show ipv6 route vrf all tag (1-4294967295)",
+ "show ipv6 <fib|route> vrf all tag (1-4294967295)",
SHOW_STR
IP_STR
+ "IPv6 forwarding table\n"
"IPv6 routing table\n"
VRF_ALL_CMD_HELP_STR
"Show only routes with tag\n"
int first = 1;
int vrf_header = 1;
route_tag_t tag = 0;
+ bool uf = use_fib(argv[2]);
if (argv[idx_number]->arg)
VTY_GET_INTEGER_RANGE("tag", tag, argv[idx_number]->arg, 0, 4294967295);
for (rn = route_top (table); rn; rn = srcdest_route_next (rn))
RNODE_FOREACH_RIB (rn, rib)
{
+ if (uf && !CHECK_FLAG(rib->status, RIB_ENTRY_SELECTED_FIB))
+ continue;
if (rib->tag != tag)
continue;
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 <fib|route> vrf all X:X::X:X/M longer-prefixes",
SHOW_STR
IP_STR
+ "IPv6 forwarding table\n"
"IPv6 routing table\n"
VRF_ALL_CMD_HELP_STR
"IPv6 prefix\n"
int ret;
int first = 1;
int vrf_header = 1;
+ bool uf = use_fib(argv[2]);
ret = str2prefix (argv[idx_ipv6_prefixlen]->arg, &p);
if (! ret)
{
struct prefix *p, *src_p;
srcdest_rnode_prefixes(rn, &p, &src_p);
+ if (uf && !CHECK_FLAG(rib->status, RIB_ENTRY_SELECTED_FIB))
+ continue;
if (prefix_match (p, &rn->p))
{
if (first)
DEFUN (show_ipv6_route_vrf_all_protocol,
show_ipv6_route_vrf_all_protocol_cmd,
- "show ipv6 route vrf all " FRR_IP6_REDIST_STR_ZEBRA,
+ "show ipv6 <fib|route> vrf all " FRR_IP6_REDIST_STR_ZEBRA,
SHOW_STR
IP_STR
- "IP routing table\n"
+ "IPv6 forwarding table\n"
+ "IPv6 routing table\n"
VRF_ALL_CMD_HELP_STR
FRR_IP6_REDIST_HELP_STR_ZEBRA)
{
struct zebra_vrf *zvrf;
int first = 1;
int vrf_header = 1;
+ bool uf = use_fib(argv[2]);
char *proto = argv[argc - 1]->text;
type = proto_redistnum (AFI_IP6, proto);
RNODE_FOREACH_RIB (rn, rib)
if (rib->type == type)
{
+ if (uf && !CHECK_FLAG(rib->status, RIB_ENTRY_SELECTED_FIB))
+ continue;
if (first)
{
vty_out (vty, SHOW_ROUTE_V6_HEADER);