aboutsummaryrefslogtreecommitdiffstats
path: root/src/vpp/api/custom_dump.c
diff options
context:
space:
mode:
authorJohn Lo <loj@cisco.com>2018-04-13 16:46:22 -0400
committerNeale Ranns <nranns@cisco.com>2018-04-16 13:39:58 +0000
commitc7b430406cb572e318c5b7b805fd98bdae0d680a (patch)
treec084d15c706999656cb236cfa27275019e65a941 /src/vpp/api/custom_dump.c
parent5c9083d52646153bdc917a7ae37da696d864ad1c (diff)
Implement ip_probe_neighbor API
Add API support similar to VPP CLI "ip probe-neighbor" except API call is asynch and will not wait, as the CLI does, for address resolution of probed neighbor. The API client can use the APIs want_ip4_arp_events or want_ip6_nd_events to get notified of the desired address resolution event. Change-Id: Ieab58abe75b5cc7f5185b3b91418b6362f8992d3 Signed-off-by: John Lo <loj@cisco.com>
Diffstat (limited to 'src/vpp/api/custom_dump.c')
-rw-r--r--src/vpp/api/custom_dump.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/vpp/api/custom_dump.c b/src/vpp/api/custom_dump.c
index ded6e7de337..9989bdc2c35 100644
--- a/src/vpp/api/custom_dump.c
+++ b/src/vpp/api/custom_dump.c
@@ -1996,6 +1996,21 @@ static void *vl_api_interface_name_renumber_t_print
FINISH;
}
+static void *vl_api_ip_probe_neighbor_t_print
+ (vl_api_ip_probe_neighbor_t * mp, void *handle)
+{
+ u8 *s;
+
+ s = format (0, "SCRIPT: ip_probe_neighbor ");
+ s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
+ if (mp->is_ipv6)
+ s = format (s, "address %U ", format_ip6_address, &mp->dst_address);
+ else
+ s = format (s, "address %U ", format_ip4_address, &mp->dst_address);
+
+ FINISH;
+}
+
static void *vl_api_want_ip4_arp_events_t_print
(vl_api_want_ip4_arp_events_t * mp, void *handle)
{
@@ -3515,6 +3530,7 @@ _(L2_FIB_TABLE_DUMP, l2_fib_table_dump) \
_(VXLAN_GPE_ADD_DEL_TUNNEL, vxlan_gpe_add_del_tunnel) \
_(VXLAN_GPE_TUNNEL_DUMP, vxlan_gpe_tunnel_dump) \
_(INTERFACE_NAME_RENUMBER, interface_name_renumber) \
+_(IP_PROBE_NEIGHBOR, ip_probe_neighbor) \
_(WANT_IP4_ARP_EVENTS, want_ip4_arp_events) \
_(WANT_IP6_ND_EVENTS, want_ip6_nd_events) \
_(WANT_L2_MACS_EVENTS, want_l2_macs_events) \