aboutsummaryrefslogtreecommitdiffstats
path: root/vpp
diff options
context:
space:
mode:
authorAndrej Kozemcak <akozemca@cisco.com>2016-05-02 12:14:33 +0200
committerDave Barach <openvpp@barachs.net>2016-05-05 11:46:10 +0000
commita9edd85e4cb35fd55c515dbfbad37aecd28c1431 (patch)
tree5e3b18b82beea727d9445a19fcbcec7962813ffc /vpp
parentfdff1e6ed540f2a04792fb64e04b0c7862dc2b8c (diff)
ONE-2: Add new LISP dump API for lisp gpe
API: lisp_gpe_enable_disable_dump Change-Id: I1c8e78f00f9a3f99c1f2f54884af565292e4ccf8 Signed-off-by: Andrej Kozemcak <akozemca@cisco.com>
Diffstat (limited to 'vpp')
-rw-r--r--vpp/api/api.c34
-rw-r--r--vpp/api/vpe.api18
2 files changed, 52 insertions, 0 deletions
diff --git a/vpp/api/api.c b/vpp/api/api.c
index e33e24d2..18c00bd3 100644
--- a/vpp/api/api.c
+++ b/vpp/api/api.c
@@ -331,6 +331,8 @@ _(LISP_LOCATOR_SET_DUMP, lisp_locator_set_dump) \
_(LISP_LOCAL_EID_TABLE_DUMP, lisp_local_eid_table_dump) \
_(LISP_GPE_TUNNEL_DUMP, lisp_gpe_tunnel_dump) \
_(LISP_MAP_RESOLVER_DUMP, lisp_map_resolver_dump) \
+_(LISP_GPE_ENABLE_DISABLE_STATUS_DUMP, \
+ lisp_gpe_enable_disable_status_dump) \
_(SR_MULTICAST_MAP_ADD_DEL, sr_multicast_map_add_del)
#define QUOTE_(x) #x
@@ -5171,6 +5173,38 @@ vl_api_lisp_map_resolver_dump_t_handler (
}
+static void
+send_lisp_gpe_enable_disable_details (unix_shared_memory_queue_t *q,
+ u32 context)
+{
+ vl_api_lisp_gpe_enable_disable_status_details_t *rmp = NULL;
+ u8 is_en;
+
+ rmp = vl_msg_api_alloc (sizeof (*rmp));
+ memset (rmp, 0, sizeof (*rmp));
+ rmp->_vl_msg_id = ntohs(VL_API_LISP_GPE_ENABLE_DISABLE_STATUS_DETAILS);
+
+ is_en = vnet_lisp_gpe_enable_disable_status();
+ rmp->is_en = is_en;
+ rmp->context = context;
+
+ vl_msg_api_send_shmem (q, (u8 *)&rmp);
+}
+
+static void
+vl_api_lisp_gpe_enable_disable_status_dump_t_handler
+(vl_api_lisp_gpe_enable_disable_status_dump_t *mp)
+{
+ unix_shared_memory_queue_t * q = NULL;
+
+ q = vl_api_client_index_to_input_queue (mp->client_index);
+ if (q == 0) {
+ return;
+ }
+
+ send_lisp_gpe_enable_disable_details(q, mp->context);
+}
+
static void
vl_api_interface_name_renumber_t_handler (vl_api_interface_name_renumber_t *mp)
{
diff --git a/vpp/api/vpe.api b/vpp/api/vpe.api
index 9d0f6b7f..6ecb15fb 100644
--- a/vpp/api/vpe.api
+++ b/vpp/api/vpe.api
@@ -2460,6 +2460,24 @@ define lisp_map_resolver_dump {
u32 context;
};
+/** \brief Status of lisp-gpe protocol, enable or disable
+ @param context - sender context, to match reply w/ request
+ @param is_en - enable protocol if non-zero, else disable
+*/
+manual_java define lisp_gpe_enable_disable_status_details {
+ u32 context;
+ u8 is_en;
+};
+
+/** \brief Request for lisp-gpe protocol status
+ @param client_index - opaque cookie to identify the sender
+ @param context - sender context, to match reply w/ request
+*/
+define lisp_gpe_enable_disable_status_dump {
+ u32 client_index;
+ u32 context;
+};
+
/* Gross kludge, DGMS */
define interface_name_renumber {
u32 client_index;