X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvpp-api%2Fvom%2Finterface.hpp;fp=src%2Fvpp-api%2Fvom%2Finterface.hpp;h=29903b5623bedb56313a44015f4513e1a6a8c0da;hb=871dc4287d8c05ff76106dba4f5f8654c24347fe;hp=0099bde42ba6a335bd3061b0bc4061e8e86ddf94;hpb=6df19030f2bf986f1876c2c46b44c046b9b2c686;p=vpp.git 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 + { + 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. @@ -599,6 +609,11 @@ private: */ HW::item m_l2_address; + /** + * The state of the detailed stats collection + */ + HW::item m_stats_type; + /** * Operational state of the interface */