dhcp ip: DSCP settings for transmitted DHCP packets
[vpp.git] / extras / vom / vom / arp_proxy_config_cmds.cpp
index cf7fad5..8185c09 100644 (file)
@@ -14,6 +14,7 @@
  */
 
 #include "vom/arp_proxy_config_cmds.hpp"
+#include "vom/api_types.hpp"
 
 namespace VOM {
 namespace arp_proxy_config_cmds {
@@ -41,14 +42,12 @@ config_cmd::issue(connection& con)
   auto& payload = req.get_request().get_payload();
   payload.is_add = 1;
 
-  std::copy_n(std::begin(m_low.to_bytes()), m_low.to_bytes().size(),
-              payload.low_address);
-  std::copy_n(std::begin(m_high.to_bytes()), m_high.to_bytes().size(),
-              payload.hi_address);
+  to_api(m_low, payload.proxy.low);
+  to_api(m_high, payload.proxy.hi);
 
   VAPI_CALL(req.execute());
 
-  m_hw_item.set(wait());
+  wait();
 
   return (rc_t::OK);
 }
@@ -86,10 +85,8 @@ unconfig_cmd::issue(connection& con)
   auto& payload = req.get_request().get_payload();
   payload.is_add = 0;
 
-  std::copy_n(std::begin(m_low.to_bytes()), m_low.to_bytes().size(),
-              payload.low_address);
-  std::copy_n(std::begin(m_high.to_bytes()), m_high.to_bytes().size(),
-              payload.hi_address);
+  to_api(m_low, payload.proxy.low);
+  to_api(m_high, payload.proxy.hi);
 
   VAPI_CALL(req.execute());
 
@@ -108,9 +105,34 @@ unconfig_cmd::to_string() const
 
   return (s.str());
 }
+
+bool
+dump_cmd::operator==(const dump_cmd& other) const
+{
+  return (true);
+}
+
+rc_t
+dump_cmd::issue(connection& con)
+{
+  m_dump.reset(new msg_t(con.ctx(), std::ref(*this)));
+
+  VAPI_CALL(m_dump->execute());
+
+  wait();
+
+  return rc_t::OK;
 }
+
+std::string
+dump_cmd::to_string() const
+{
+  return ("ARP-proxy-dump");
 }
 
+}; // namesapce cmds
+}; // namespace VOM
+
 /*
  * fd.io coding-style-patch-verification: ON
  *