aboutsummaryrefslogtreecommitdiffstats
path: root/src/vpp-api/vom/interface_cmds.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/vpp-api/vom/interface_cmds.hpp')
-rw-r--r--src/vpp-api/vom/interface_cmds.hpp49
1 files changed, 45 insertions, 4 deletions
diff --git a/src/vpp-api/vom/interface_cmds.hpp b/src/vpp-api/vom/interface_cmds.hpp
index c86df92a4aa..f21a7f3b21c 100644
--- a/src/vpp-api/vom/interface_cmds.hpp
+++ b/src/vpp-api/vom/interface_cmds.hpp
@@ -370,14 +370,15 @@ private:
/**
* A command class represents our desire to recieve interface stats
*/
-class stats_cmd : public event_cmd<vapi::Want_per_interface_combined_stats,
- vapi::Vnet_per_interface_combined_counters>
+class stats_enable_cmd
+ : public event_cmd<vapi::Want_per_interface_combined_stats,
+ vapi::Vnet_per_interface_combined_counters>
{
public:
/**
* Constructor taking the listner to notify
*/
- stats_cmd(interface::stat_listener& el, const handle_t& handle);
+ stats_enable_cmd(interface::stat_listener& el, const handle_t& handle);
/**
* Issue the command to VPP/HW
@@ -397,7 +398,7 @@ public:
/**
* Comparison operator - only used for UT
*/
- bool operator==(const stats_cmd& i) const;
+ bool operator==(const stats_enable_cmd& i) const;
/**
* Called when it's time to poke the listeners
@@ -410,6 +411,46 @@ private:
*/
interface::stat_listener& m_listener;
+ /**
+ * The interface on which we are enabling states
+ */
+ handle_t m_swifindex;
+};
+
+/**
+ * A command class represents our desire to recieve interface stats
+ */
+class stats_disable_cmd
+ : public rpc_cmd<HW::item<bool>,
+ rc_t,
+ vapi::Want_per_interface_combined_stats>
+{
+public:
+ /**
+ * Constructor taking the listner to notify
+ */
+ stats_disable_cmd(const handle_t& handle);
+
+ /**
+ * Issue the command to VPP/HW
+ */
+ rc_t issue(connection& con);
+
+ /**
+ * convert to string format for debug purposes
+ */
+ std::string to_string() const;
+
+ /**
+ * Comparison operator - only used for UT
+ */
+ bool operator==(const stats_disable_cmd& i) const;
+
+private:
+ HW::item<bool> m_res;
+ /**
+ * The interface on which we are disabling states
+ */
handle_t m_swifindex;
};