diff options
Diffstat (limited to 'zebra/zebra_vty.c')
| -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 4e0df372bb..e5f7c181f9 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); } |
