*/
#include "vom/arp_proxy_config_cmds.hpp"
+#include "vom/api_types.hpp"
+
+DEFINE_VAPI_MSG_IDS_ARP_API_JSON;
namespace VOM {
namespace arp_proxy_config_cmds {
: rpc_cmd(item)
, m_low(low)
, m_high(high)
-{
-}
+{}
bool
config_cmd::operator==(const config_cmd& o) const
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);
}
: rpc_cmd(item)
, m_low(low)
, m_high(high)
-{
-}
+{}
bool
unconfig_cmd::operator==(const unconfig_cmd& o) const
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());
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
*