]> git.proxmox.com Git - mirror_frr.git/blobdiff - zebra/zebra_vty.c
nexthop-tracking.patch
[mirror_frr.git] / zebra / zebra_vty.c
index 254354c72b7cac498074b0f392d74a00656c2058..72095706eeb15e3724a211bde27d77bb426c45f3 100644 (file)
 #include "command.h"
 #include "table.h"
 #include "rib.h"
+#include "nexthop.h"
 
 #include "zebra/zserv.h"
+#include "zebra/zebra_rnh.h"
 
 /* General fucntion for static route. */
 static int
@@ -811,6 +813,28 @@ DEFUN (show_ip_route,
   return CMD_SUCCESS;
 }
 
+DEFUN (show_ip_nht,
+       show_ip_nht_cmd,
+       "show ip nht",
+       SHOW_STR
+       IP_STR
+       "IP nexthop tracking table\n")
+{
+  zebra_print_rnh_table(0, AF_INET, vty);
+  return CMD_SUCCESS;
+}
+
+DEFUN (show_ipv6_nht,
+       show_ipv6_nht_cmd,
+       "show ipv6 nht",
+       SHOW_STR
+       IP_STR
+       "IPv6 nexthop tracking table\n")
+{
+  zebra_print_rnh_table(0, AF_INET6, vty);
+  return CMD_SUCCESS;
+}
+
 DEFUN (show_ip_route_prefix_longer,
        show_ip_route_prefix_longer_cmd,
        "show ip route A.B.C.D/M longer-prefixes",
@@ -2210,6 +2234,8 @@ zebra_vty_init (void)
   install_element (CONFIG_NODE, &no_ip_route_mask_flags_distance2_cmd);
 
   install_element (VIEW_NODE, &show_ip_route_cmd);
+  install_element (VIEW_NODE, &show_ip_nht_cmd);
+  install_element (VIEW_NODE, &show_ipv6_nht_cmd);
   install_element (VIEW_NODE, &show_ip_route_addr_cmd);
   install_element (VIEW_NODE, &show_ip_route_prefix_cmd);
   install_element (VIEW_NODE, &show_ip_route_prefix_longer_cmd);
@@ -2218,6 +2244,8 @@ zebra_vty_init (void)
   install_element (VIEW_NODE, &show_ip_route_summary_cmd);
   install_element (VIEW_NODE, &show_ip_route_summary_prefix_cmd);
   install_element (ENABLE_NODE, &show_ip_route_cmd);
+  install_element (ENABLE_NODE, &show_ip_nht_cmd);
+  install_element (ENABLE_NODE, &show_ipv6_nht_cmd);
   install_element (ENABLE_NODE, &show_ip_route_addr_cmd);
   install_element (ENABLE_NODE, &show_ip_route_prefix_cmd);
   install_element (ENABLE_NODE, &show_ip_route_prefix_longer_cmd);