aboutsummaryrefslogtreecommitdiffstats
path: root/src/vpp-api/vom/interface.hpp
diff options
context:
space:
mode:
authorMohsin Kazmi <sykazmi@cisco.com>2017-11-20 10:23:47 +0100
committerNeale Ranns <nranns@cisco.com>2017-11-22 11:20:45 +0000
commit5a4f96a178b693ace8e736c30c949ced5928d824 (patch)
tree55109d1354c6fc3814282a9b9ba6e52fc19a43df /src/vpp-api/vom/interface.hpp
parent4878cbe276ec1131d0cf30ac5df18aa9ba699bc4 (diff)
VOM: stats: Associate stat obj to interface
Change-Id: Id8b159dd72b92798538a32fe570fb0038d742ef2 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Diffstat (limited to 'src/vpp-api/vom/interface.hpp')
-rw-r--r--src/vpp-api/vom/interface.hpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/vpp-api/vom/interface.hpp b/src/vpp-api/vom/interface.hpp
index 181e76dad69..76ecf8af0a0 100644
--- a/src/vpp-api/vom/interface.hpp
+++ b/src/vpp-api/vom/interface.hpp
@@ -421,6 +421,11 @@ public:
*/
static void dump(std::ostream& os);
+ /**
+ * Enable stats for this interface
+ */
+ void enable_stats(stat_listener& el);
+
protected:
/**
* Construct an interface object with a handle and a HW address
@@ -513,6 +518,11 @@ private:
static event_handler m_evh;
/**
+ * enable the interface stats in the singular instance
+ */
+ void enable_stats_i(stat_listener& el);
+
+ /**
* Commit the acculmulated changes into VPP. i.e. to a 'HW" write.
*/
void update(const interface& obj);
@@ -550,6 +560,11 @@ private:
std::shared_ptr<route_domain> m_rd;
/**
+ * shared pointer to the stats object for this interface.
+ */
+ std::shared_ptr<interface_cmds::stats_cmd> m_stats;
+
+ /**
* The state of the interface
*/
HW::item<admin_state_t> m_state;