summaryrefslogtreecommitdiffstats
path: root/src/vnet/lisp-cp/control.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/control.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/control.c')
-rw-r--r--src/vnet/lisp-cp/control.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/vnet/lisp-cp/control.c b/src/vnet/lisp-cp/control.c
index ac11d890618..c7853ca73fb 100644
--- a/src/vnet/lisp-cp/control.c
+++ b/src/vnet/lisp-cp/control.c
@@ -3801,6 +3801,29 @@ send_map_resolver_service (vlib_main_t * vm,
return 0;
}
+vnet_api_error_t
+vnet_lisp_stats_enable_disable (u8 enable)
+{
+ lisp_cp_main_t *lcm = vnet_lisp_cp_get_main ();
+
+ if (vnet_lisp_enable_disable_status () == 0)
+ return VNET_API_ERROR_LISP_DISABLED;
+
+ lcm->stats_enabled = enable;
+ return 0;
+}
+
+u8
+vnet_lisp_stats_enable_disable_state (void)
+{
+ lisp_cp_main_t *lcm = vnet_lisp_cp_get_main ();
+
+ if (vnet_lisp_enable_disable_status () == 0)
+ return VNET_API_ERROR_LISP_DISABLED;
+
+ return lcm->stats_enabled;
+}
+
/* *INDENT-OFF* */
VLIB_REGISTER_NODE (lisp_retry_service_node,static) = {
.function = send_map_resolver_service,