diff options
author | vivek <vivek@cumulusnetworks.com> | 2016-04-16 20:23:04 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-09-23 15:30:57 +0200 |
commit | 3ab18ff268c297e7279d71f8f82fc8ce7712c23e (patch) | |
tree | 5cecedf834a9b184c57d35e678f6e78493fbcb4c /zebra/zebra_vty.c | |
parent | Quagga: Install label forwarding entries for statically configured LSPs (diff) | |
download | frr-3ab18ff268c297e7279d71f8f82fc8ce7712c23e.tar.xz frr-3ab18ff268c297e7279d71f8f82fc8ce7712c23e.zip |
Quagga: Display MPLS label forwarding table
Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-4084, ...
Reviewed By: CCR-3089
Testing Done: Manual
Diffstat (limited to '')
-rw-r--r-- | zebra/zebra_vty.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index 4e0df372b..e5f7c181f 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -5909,6 +5909,37 @@ zebra_mpls_config (struct vty *vty) return write; } +DEFUN (show_mpls_table, + show_mpls_table_cmd, + "show mpls table", + SHOW_STR + MPLS_STR + "MPLS table\n") +{ + struct zebra_vrf *zvrf; + + zvrf = vrf_info_lookup(VRF_DEFAULT); + zebra_mpls_print_lsp_table(vty, zvrf); + return CMD_SUCCESS; +} + +DEFUN (show_mpls_table_lsp, + show_mpls_table_lsp_cmd, + "show mpls table <16-1048575>", + SHOW_STR + MPLS_STR + "MPLS table\n" + "LSP to display information about\n") +{ + u_int32_t label; + struct zebra_vrf *zvrf; + + zvrf = vrf_info_lookup(VRF_DEFAULT); + label = atoi(argv[0]); + zebra_mpls_print_lsp (vty, zvrf, label); + return CMD_SUCCESS; +} + DEFUN (ip_zebra_import_table_distance, ip_zebra_import_table_distance_cmd, "ip import-table <1-252> distance <1-255>", @@ -6418,4 +6449,9 @@ zebra_vty_init (void) install_element (CONFIG_NODE, &no_mpls_transit_lsp_cmd); install_element (CONFIG_NODE, &no_mpls_transit_lsp_out_label_cmd); install_element (CONFIG_NODE, &no_mpls_transit_lsp_all_cmd); + + install_element (VIEW_NODE, &show_mpls_table_cmd); + install_element (ENABLE_NODE, &show_mpls_table_cmd); + install_element (VIEW_NODE, &show_mpls_table_lsp_cmd); + install_element (ENABLE_NODE, &show_mpls_table_lsp_cmd); } |