VOM: stats: Associate stat obj to interface
[vpp.git] / src / vpp-api / vom / interface.hpp
index 181e76d..76ecf8a 100644 (file)
@@ -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
@@ -512,6 +517,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.
    */
@@ -549,6 +559,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
    */