summaryrefslogtreecommitdiffstats
path: root/zebra/zebra_vty.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/zebra_vty.c')
-rw-r--r--zebra/zebra_vty.c56
1 files changed, 47 insertions, 9 deletions
diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c
index 9c910e9f1..7052fab01 100644
--- a/zebra/zebra_vty.c
+++ b/zebra/zebra_vty.c
@@ -1782,7 +1782,7 @@ DEFUN (show_evpn_vni,
"show evpn vni [json]",
SHOW_STR
"EVPN\n"
- "VxLAN information\n"
+ "VxLAN Network Identifier\n"
JSON_STR)
{
struct zebra_vrf *zvrf;
@@ -1793,6 +1793,22 @@ DEFUN (show_evpn_vni,
return CMD_SUCCESS;
}
+DEFUN (show_evpn_vni_detail, show_evpn_vni_detail_cmd,
+ "show evpn vni detail [json]",
+ SHOW_STR
+ "EVPN\n"
+ "VxLAN Network Identifier\n"
+ "Detailed Information On Each VNI\n"
+ JSON_STR)
+{
+ struct zebra_vrf *zvrf;
+ bool uj = use_json(argc, argv);
+
+ zvrf = vrf_info_lookup(VRF_DEFAULT);
+ zebra_vxlan_print_vnis_detail(vty, zvrf, uj);
+ return CMD_SUCCESS;
+}
+
DEFUN (show_evpn_vni_vni,
show_evpn_vni_vni_cmd,
"show evpn vni " CMD_VNI_RANGE "[json]",
@@ -2199,6 +2215,23 @@ DEFUN (show_evpn_neigh_vni_all,
return CMD_SUCCESS;
}
+DEFUN (show_evpn_neigh_vni_all_detail, show_evpn_neigh_vni_all_detail_cmd,
+ "show evpn arp-cache vni all detail [json]",
+ SHOW_STR
+ "EVPN\n"
+ "ARP and ND cache\n"
+ "VxLAN Network Identifier\n"
+ "All VNIs\n"
+ "Neighbor details for all vnis in detail\n" JSON_STR)
+{
+ struct zebra_vrf *zvrf;
+ bool uj = use_json(argc, argv);
+
+ zvrf = vrf_info_lookup(VRF_DEFAULT);
+ zebra_vxlan_print_neigh_all_vni_detail(vty, zvrf, false, uj);
+ return CMD_SUCCESS;
+}
+
DEFUN (show_evpn_neigh_vni_neigh,
show_evpn_neigh_vni_neigh_cmd,
"show evpn arp-cache vni " CMD_VNI_RANGE " ip WORD [json]",
@@ -2314,6 +2347,7 @@ DEFPY (clear_evpn_dup_addr,
vni_t vni = 0;
struct ipaddr host_ip = {.ipa_type = IPADDR_NONE };
struct ethaddr mac_addr;
+ int ret = CMD_SUCCESS;
zvrf = vrf_info_lookup(VRF_DEFAULT);
if (vni_val) {
@@ -2321,9 +2355,10 @@ DEFPY (clear_evpn_dup_addr,
if (mac_val) {
prefix_str2mac(mac_val, &mac_addr);
- zebra_vxlan_clear_dup_detect_vni_mac(vty, zvrf, vni,
- &mac_addr);
- } else if (ip) {
+ ret = zebra_vxlan_clear_dup_detect_vni_mac(vty, zvrf,
+ vni,
+ &mac_addr);
+ } else if (ip) {
if (sockunion_family(ip) == AF_INET) {
host_ip.ipa_type = IPADDR_V4;
host_ip.ipaddr_v4.s_addr = sockunion2ip(ip);
@@ -2332,16 +2367,17 @@ DEFPY (clear_evpn_dup_addr,
memcpy(&host_ip.ipaddr_v6, &ip->sin6.sin6_addr,
sizeof(struct in6_addr));
}
- zebra_vxlan_clear_dup_detect_vni_ip(vty, zvrf, vni,
- &host_ip);
+ ret = zebra_vxlan_clear_dup_detect_vni_ip(vty, zvrf,
+ vni,
+ &host_ip);
} else
- zebra_vxlan_clear_dup_detect_vni(vty, zvrf, vni);
+ ret = zebra_vxlan_clear_dup_detect_vni(vty, zvrf, vni);
} else {
- zebra_vxlan_clear_dup_detect_vni_all(vty, zvrf);
+ ret = zebra_vxlan_clear_dup_detect_vni_all(vty, zvrf);
}
- return CMD_SUCCESS;
+ return ret;
}
/* Static ip route configuration write function. */
@@ -2894,6 +2930,7 @@ void zebra_vty_init(void)
install_element(VIEW_NODE, &show_evpn_global_cmd);
install_element(VIEW_NODE, &show_evpn_vni_cmd);
+ install_element(VIEW_NODE, &show_evpn_vni_detail_cmd);
install_element(VIEW_NODE, &show_evpn_vni_vni_cmd);
install_element(VIEW_NODE, &show_evpn_rmac_vni_mac_cmd);
install_element(VIEW_NODE, &show_evpn_rmac_vni_cmd);
@@ -2911,6 +2948,7 @@ void zebra_vty_init(void)
install_element(VIEW_NODE, &show_evpn_mac_vni_all_dad_cmd);
install_element(VIEW_NODE, &show_evpn_neigh_vni_cmd);
install_element(VIEW_NODE, &show_evpn_neigh_vni_all_cmd);
+ install_element(VIEW_NODE, &show_evpn_neigh_vni_all_detail_cmd);
install_element(VIEW_NODE, &show_evpn_neigh_vni_neigh_cmd);
install_element(VIEW_NODE, &show_evpn_neigh_vni_vtep_cmd);
install_element(VIEW_NODE, &show_evpn_neigh_vni_dad_cmd);