diff options
Diffstat (limited to 'vpp-api-test/vat/api_format.c')
-rw-r--r-- | vpp-api-test/vat/api_format.c | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/vpp-api-test/vat/api_format.c b/vpp-api-test/vat/api_format.c index f13e983c450..7f0f9fa7f20 100644 --- a/vpp-api-test/vat/api_format.c +++ b/vpp-api-test/vat/api_format.c @@ -2428,7 +2428,33 @@ static void vat_json_object_add_uint (node, "vni", clib_net_to_host_u32 (mp->vni)); } +static void + vl_api_lisp_eid_table_vni_details_t_handler + (vl_api_lisp_eid_table_vni_details_t * mp) +{ + vat_main_t *vam = &vat_main; + + u8 *line = format (0, "%d", clib_net_to_host_u32 (mp->vni)); + fformat (vam->ofp, "%v\n", line); + vec_free (line); +} +static void + vl_api_lisp_eid_table_vni_details_t_handler_json + (vl_api_lisp_eid_table_vni_details_t * mp) +{ + vat_main_t *vam = &vat_main; + vat_json_node_t *node = NULL; + + if (VAT_JSON_ARRAY != vam->json_tree.type) + { + ASSERT (VAT_JSON_NONE == vam->json_tree.type); + vat_json_init_array (&vam->json_tree); + } + node = vat_json_array_add (&vam->json_tree); + vat_json_init_object (node); + vat_json_object_add_uint (node, "vni", clib_net_to_host_u32 (mp->vni)); +} static u8 * format_decap_next (u8 * s, va_list * args) @@ -3544,6 +3570,7 @@ _(LISP_LOCATOR_SET_DETAILS, lisp_locator_set_details) \ _(LISP_LOCATOR_DETAILS, lisp_locator_details) \ _(LISP_EID_TABLE_DETAILS, lisp_eid_table_details) \ _(LISP_EID_TABLE_MAP_DETAILS, lisp_eid_table_map_details) \ +_(LISP_EID_TABLE_VNI_DETAILS, lisp_eid_table_vni_details) \ _(LISP_GPE_TUNNEL_DETAILS, lisp_gpe_tunnel_details) \ _(LISP_MAP_RESOLVER_DETAILS, lisp_map_resolver_details) \ _(SHOW_LISP_STATUS_REPLY, show_lisp_status_reply) \ @@ -13117,6 +13144,35 @@ api_lisp_eid_table_map_dump (vat_main_t * vam) } static int +api_lisp_eid_table_vni_dump (vat_main_t * vam) +{ + vl_api_lisp_eid_table_vni_dump_t *mp; + f64 timeout = ~0; + + if (!vam->json_output) + { + fformat (vam->ofp, "VNI\n"); + } + + M (LISP_EID_TABLE_VNI_DUMP, lisp_eid_table_vni_dump); + + /* send it... */ + S; + + /* Use a control ping for synchronization */ + { + vl_api_control_ping_t *mp; + M (CONTROL_PING, control_ping); + S; + } + /* Wait for a reply... */ + W; + + /* NOTREACHED */ + return 0; +} + +static int get_locator_set (vat_main_t * vam) { vl_api_lisp_locator_set_dump_t *mp; @@ -15652,6 +15708,7 @@ _(lisp_locator_set_dump, "[locator-set-index <ls-index> | " \ _(lisp_eid_table_dump, "[eid <ipv4|ipv6>/<prefix> | <mac>] [vni] " \ "[local] | [remote]") \ _(lisp_eid_table_map_dump, "") \ +_(lisp_eid_table_vni_dump, "") \ _(lisp_gpe_tunnel_dump, "") \ _(lisp_map_resolver_dump, "") \ _(show_lisp_status, "") \ |