diff options
author | Filip Tehlar <ftehlar@cisco.com> | 2016-07-13 13:17:15 +0200 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2016-07-13 19:36:43 +0000 |
commit | 2f653d08f4647905b241508e282a491794a54285 (patch) | |
tree | 6cf109d0276448f682e768b3357a183b799c7ecd /vpp | |
parent | ad476c7861d0428766f9bee01f69cd00025a47c0 (diff) |
Add API dump call for vrf/vni mapping to vpp-api-test
Change-Id: I7a028ce9ddf21bd3a7d4991ba1be05e5e74202d6
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Diffstat (limited to 'vpp')
-rw-r--r-- | vpp/vpp-api/api.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/vpp/vpp-api/api.c b/vpp/vpp-api/api.c index 9acda745..63e0ed25 100644 --- a/vpp/vpp-api/api.c +++ b/vpp/vpp-api/api.c @@ -5454,6 +5454,23 @@ vl_api_lisp_map_resolver_dump_t_handler ( } static void +send_eid_table_map_pair (hash_pair_t * p, + unix_shared_memory_queue_t * q, + u32 context) +{ + vl_api_lisp_eid_table_map_details_t * rmp = NULL; + + rmp = vl_msg_api_alloc (sizeof (*rmp)); + memset (rmp, 0, sizeof (*rmp)); + rmp->_vl_msg_id = ntohs(VL_API_LISP_EID_TABLE_MAP_DETAILS); + + rmp->vni = clib_host_to_net_u32 (p->key); + rmp->vrf = clib_host_to_net_u32 (p->value[0]); + rmp->context = context; + vl_msg_api_send_shmem (q, (u8 *)&rmp); +} + +static void vl_api_lisp_eid_table_map_dump_t_handler ( vl_api_lisp_eid_table_map_dump_t *mp) { @@ -5466,12 +5483,7 @@ vl_api_lisp_eid_table_map_dump_t_handler ( return; } hash_foreach_pair (p, lcm->table_id_by_vni, { - vl_api_lisp_eid_table_map_details_t * rmp = NULL; - memset (rmp, 0, sizeof (*rmp)); - rmp->_vl_msg_id = ntohs(VL_API_LISP_EID_TABLE_MAP_DETAILS); - rmp->vni = p->key; - rmp->vrf = p->value[0]; - rmp->context = mp->context; + send_eid_table_map_pair (p, q, mp->context); }); } |