GBP: add allowed ethertypes to contracts
[vpp.git] / extras / vom / vom / ip_unnumbered_cmds.hpp
index 0bb7027..436b0c7 100644 (file)
 #ifndef __VOM_IP_UNNUMBERED_CMDS_H__
 #define __VOM_IP_UNNUMBERED_CMDS_H__
 
+#include "vom/dump_cmd.hpp"
 #include "vom/ip_unnumbered.hpp"
 #include "vom/rpc_cmd.hpp"
 
 #include <vapi/interface.api.vapi.hpp>
+#include <vapi/ip.api.vapi.hpp>
 
 namespace VOM {
 namespace ip_unnumbered_cmds {
@@ -28,7 +30,7 @@ namespace ip_unnumbered_cmds {
 *A command class that configures the IP unnumbered
 */
 class config_cmd
-  : public rpc_cmd<HW::item<bool>, rc_t, vapi::Sw_interface_set_unnumbered>
+  : public rpc_cmd<HW::item<bool>, vapi::Sw_interface_set_unnumbered>
 {
 public:
   /**
@@ -65,7 +67,7 @@ private:
  * A cmd class that Unconfigs L3 Config from an interface
  */
 class unconfig_cmd
-  : public rpc_cmd<HW::item<bool>, rc_t, vapi::Sw_interface_set_unnumbered>
+  : public rpc_cmd<HW::item<bool>, vapi::Sw_interface_set_unnumbered>
 {
 public:
   /**
@@ -100,6 +102,37 @@ private:
   const handle_t& m_l3_itf;
 };
 
+/**
+ * A cmd class that Dumps all the IP unnumbered interfaces
+ */
+class dump_cmd : public VOM::dump_cmd<vapi::Ip_unnumbered_dump>
+{
+public:
+  /**
+   * Constructor
+   */
+  dump_cmd() = default;
+
+  /**
+   * 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 dump_cmd& i) const;
+
+private:
+  /**
+   * HW reutrn code
+   */
+  HW::item<bool> item;
+};
 }; // namespace ip_unnumbered_cmds
 }; // namespace VOM