summaryrefslogtreecommitdiffstats
path: root/src/vnet/interface_api.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2018-03-16 16:26:21 -0700
committerDave Barach <openvpp@barachs.net>2018-03-19 15:56:23 +0000
commit6f4a6be8f222dd8caa94d19a7e4d87cb864ba7f4 (patch)
treecadc511a5926926133b3bbb4ca9c7b4239d3b2eb /src/vnet/interface_api.c
parent7b867a8e491357058d37838091ed67a2e77bce2c (diff)
Interface Unicast, Multicast and Broadcast stats on the API
Change-Id: I7c75da358aff1bd0216a602a49f2909cef5d920d Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/interface_api.c')
-rw-r--r--src/vnet/interface_api.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/vnet/interface_api.c b/src/vnet/interface_api.c
index b22cadd871e..3d9bb30f142 100644
--- a/src/vnet/interface_api.c
+++ b/src/vnet/interface_api.c
@@ -68,7 +68,8 @@ _(DELETE_SUBIF, delete_subif) \
_(CREATE_LOOPBACK, create_loopback) \
_(CREATE_LOOPBACK_INSTANCE, create_loopback_instance) \
_(DELETE_LOOPBACK, delete_loopback) \
-_(INTERFACE_NAME_RENUMBER, interface_name_renumber)
+_(INTERFACE_NAME_RENUMBER, interface_name_renumber) \
+_(COLLECT_DETAILED_INTERFACE_STATS, collect_detailed_interface_stats)
static void
vl_api_sw_interface_set_flags_t_handler (vl_api_sw_interface_set_flags_t * mp)
@@ -1169,6 +1170,25 @@ vl_api_delete_loopback_t_handler (vl_api_delete_loopback_t * mp)
REPLY_MACRO (VL_API_DELETE_LOOPBACK_REPLY);
}
+static void
+ vl_api_collect_detailed_interface_stats_t_handler
+ (vl_api_collect_detailed_interface_stats_t * mp)
+{
+ vl_api_collect_detailed_interface_stats_reply_t *rmp;
+ int rv = 0;
+
+ if (mp->enable_disable)
+ {
+ collect_detailed_interface_stats_flag_set ();
+ }
+ else
+ {
+ collect_detailed_interface_stats_flag_clear ();
+ }
+
+ REPLY_MACRO (VL_API_COLLECT_DETAILED_INTERFACE_STATS_REPLY);
+}
+
/*
* vpe_api_hookup
* Add vpe's API message handlers to the table.