aboutsummaryrefslogtreecommitdiffstats
path: root/src/vpp-api/vom/interface.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/vpp-api/vom/interface.hpp')
-rw-r--r--src/vpp-api/vom/interface.hpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/vpp-api/vom/interface.hpp b/src/vpp-api/vom/interface.hpp
index 0099bde42ba..29903b5623b 100644
--- a/src/vpp-api/vom/interface.hpp
+++ b/src/vpp-api/vom/interface.hpp
@@ -41,6 +41,15 @@ class events_cmd;
class interface : public object_base
{
public:
+ struct stats_type_t : public enum_base<stats_type_t>
+ {
+ const static stats_type_t DETAILED;
+ const static stats_type_t NORMAL;
+
+ private:
+ stats_type_t(int v, const std::string& s);
+ };
+
/**
* The key for interface's key
*/
@@ -447,7 +456,8 @@ public:
/**
* Enable stats for this interface
*/
- void enable_stats(stat_listener& el);
+ void enable_stats(stat_listener& el,
+ const stats_type_t& st = stats_type_t::NORMAL);
protected:
/**
@@ -540,7 +550,7 @@ private:
/**
* enable the interface stats in the singular instance
*/
- void enable_stats_i(stat_listener& el);
+ void enable_stats_i(stat_listener& el, const stats_type_t& st);
/**
* Commit the acculmulated changes into VPP. i.e. to a 'HW" write.
@@ -600,6 +610,11 @@ private:
HW::item<l2_address_t> m_l2_address;
/**
+ * The state of the detailed stats collection
+ */
+ HW::item<stats_type_t> m_stats_type;
+
+ /**
* Operational state of the interface
*/
oper_state_t m_oper;