ip: Protocol Independent IP Neighbors
[vpp.git] / extras / vom / vom / arp_proxy_config_cmds.hpp
index ac0e1fd..ae95251 100644 (file)
 #include "vom/dump_cmd.hpp"
 #include "vom/rpc_cmd.hpp"
 
-#include <vapi/ip.api.vapi.hpp>
+#include <vapi/arp.api.vapi.hpp>
 
 namespace VOM {
 namespace arp_proxy_config_cmds {
 /**
  * A command class that adds the ARP Proxy config
  */
-class config_cmd : public rpc_cmd<HW::item<bool>, rc_t, vapi::Proxy_arp_add_del>
+class config_cmd : public rpc_cmd<HW::item<bool>, vapi::Proxy_arp_add_del>
 {
 public:
   /**
@@ -62,8 +62,7 @@ private:
 /**
  * A cmd class that Unconfigs ArpProxy Config from an interface
  */
-class unconfig_cmd
-  : public rpc_cmd<HW::item<bool>, rc_t, vapi::Proxy_arp_add_del>
+class unconfig_cmd : public rpc_cmd<HW::item<bool>, vapi::Proxy_arp_add_del>
 {
 public:
   /**
@@ -94,8 +93,41 @@ private:
   const boost::asio::ip::address_v4 m_low;
   const boost::asio::ip::address_v4 m_high;
 };
+
+/**
+ * A cmd class that Dumps all the Proxy ARP configs
+ */
+class dump_cmd : public VOM::dump_cmd<vapi::Proxy_arp_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 cmds
+}; // namespace VOM
 
 /*
  * fd.io coding-style-patch-verification: ON