API: Change ip4_address and ip6_address to use type alias.
[vpp.git] / extras / vom / vom / bridge_domain_arp_entry_cmds.hpp
index 094de4c..490fc4b 100644 (file)
@@ -17,6 +17,7 @@
 #define __VOM_BRIDGE_DOMAIN_ARP_ENTRY_CMDS_H__
 
 #include "vom/bridge_domain_arp_entry.hpp"
+#include "vom/dump_cmd.hpp"
 
 #include <vapi/l2.api.vapi.hpp>
 #include <vapi/vpe.api.vapi.hpp>
@@ -27,7 +28,7 @@ namespace bridge_domain_arp_entry_cmds {
 /**
 * A command class that creates or updates the bridge domain ARP Entry
 */
-class create_cmd : public rpc_cmd<HW::item<bool>, rc_t, vapi::Bd_ip_mac_add_del>
+class create_cmd : public rpc_cmd<HW::item<bool>, vapi::Bd_ip_mac_add_del>
 {
 public:
   /**
@@ -62,7 +63,7 @@ private:
 /**
  * A cmd class that deletes a bridge domain ARP entry
  */
-class delete_cmd : public rpc_cmd<HW::item<bool>, rc_t, vapi::Bd_ip_mac_add_del>
+class delete_cmd : public rpc_cmd<HW::item<bool>, vapi::Bd_ip_mac_add_del>
 {
 public:
   /**
@@ -93,6 +94,44 @@ private:
   mac_address_t m_mac;
   boost::asio::ip::address m_ip_addr;
 };
+
+/**
+ * A cmd class that Dumps all arp termination tables
+ */
+class dump_cmd : public VOM::dump_cmd<vapi::Bd_ip_mac_dump>
+{
+public:
+  /**
+   * Constructor
+   */
+  dump_cmd(uint32_t bd_id);
+  dump_cmd(const dump_cmd& d);
+
+  /**
+   * 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;
+
+  /**
+   * The bd_id to get the arp termination table for
+   */
+  uint32_t m_bd;
+};
 };
 };