aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/lisp-cp/one_api.c
diff options
context:
space:
mode:
authorFilip Tehlar <ftehlar@cisco.com>2017-03-08 08:46:51 +0100
committerFlorin Coras <florin.coras@gmail.com>2017-03-08 08:54:39 +0000
commit7eaf0e57415615b56904e0054bf0b856db6f9bc1 (patch)
treeeacc48dcf6b1960663f697f791714919a1ab96be /src/vnet/lisp-cp/one_api.c
parent6f19c695583f9d7bd8b39f575e03f01d27e51f64 (diff)
LISP: add stats API/CLI
Change-Id: I5c5b4d680359cf3635c2d7b0088ea2ba6a428f93 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Diffstat (limited to 'src/vnet/lisp-cp/one_api.c')
-rw-r--r--src/vnet/lisp-cp/one_api.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/vnet/lisp-cp/one_api.c b/src/vnet/lisp-cp/one_api.c
index d0a9309b368..ff00bf5bfce 100644
--- a/src/vnet/lisp-cp/one_api.c
+++ b/src/vnet/lisp-cp/one_api.c
@@ -90,6 +90,10 @@ _(SHOW_ONE_PITR, show_one_pitr) \
_(SHOW_ONE_MAP_REQUEST_MODE, show_one_map_request_mode) \
_(ONE_USE_PETR, one_use_petr) \
_(SHOW_ONE_USE_PETR, show_one_use_petr) \
+_(SHOW_ONE_STATS_ENABLE_DISABLE, show_one_stats_enable_disable) \
+_(ONE_STATS_ENABLE_DISABLE, one_stats_enable_disable) \
+_(ONE_STATS_DUMP, one_stats_dump) \
+
static locator_t *
unformat_one_locs (vl_api_one_remote_locator_t * rmt_locs, u32 rloc_num)
@@ -1256,6 +1260,37 @@ vl_api_show_one_pitr_t_handler (vl_api_show_one_pitr_t * mp)
/* *INDENT-ON* */
}
+static void
+ vl_api_show_one_stats_enable_disable_t_handler
+ (vl_api_show_one_stats_enable_disable_t * mp)
+{
+ vl_api_show_one_stats_enable_disable_reply_t *rmp = NULL;
+ vnet_api_error_t rv = 0;
+
+ /* *INDENT-OFF* */
+ REPLY_MACRO2 (VL_API_SHOW_ONE_STATS_ENABLE_DISABLE_REPLY,
+ ({
+ rmp->is_en = vnet_lisp_stats_enable_disable_state ();
+ }));
+ /* *INDENT-ON* */
+}
+
+static void
+ vl_api_one_stats_enable_disable_t_handler
+ (vl_api_one_stats_enable_disable_t * mp)
+{
+ vl_api_one_enable_disable_reply_t *rmp = NULL;
+
+ vnet_api_error_t rv = vnet_lisp_stats_enable_disable (mp->is_en);
+ REPLY_MACRO (VL_API_ONE_ENABLE_DISABLE_REPLY);
+}
+
+static void
+vl_api_one_stats_dump_t_handler (vl_api_one_stats_dump_t * mp)
+{
+
+}
+
/*
* one_api_hookup
* Add vpe's API message handlers to the table.