A bit of buffer metadata reshuffling to accommodate flow_id
[vpp.git] / src / vpp-api / vom / interface.hpp
index 5d29510..f6708b3 100644 (file)
@@ -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
    */
@@ -58,7 +67,7 @@ public:
   struct type_t : enum_base<type_t>
   {
     /**
-     * Unkown type
+     * Unknown type
      */
     const static type_t UNKNOWN;
     /**
@@ -95,6 +104,11 @@ public:
      */
     const static type_t VHOST;
 
+    /**
+     * bond interface type
+     */
+    const static type_t BOND;
+
     /**
      * Convert VPP's name of the interface to a type
      */
@@ -354,7 +368,7 @@ public:
     void succeeded() {}
 
     /**
-     * add the created interface to the DB
+     * remove the deleted interface from the DB
      */
     void remove_interface() { interface::remove(this->item()); }
 
@@ -442,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:
   /**
@@ -535,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.
@@ -594,6 +609,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
    */