19 namespace bridge_domain_arp_entry_cmds {
35 return ((m_mac == other.m_mac) && (m_ip_addr == other.m_ip_addr) &&
36 (m_bd == other.m_bd));
42 msg_t req(con.
ctx(), std::ref(*
this));
44 auto& payload = req.get_request().get_payload();
47 m_mac.
to_bytes(payload.mac_address, 6);
48 to_bytes(m_ip_addr, &payload.is_ipv6, payload.ip_address);
60 <<
" bd:" << m_bd <<
" mac:" << m_mac.
to_string()
61 <<
" ip:" << m_ip_addr.to_string();
80 return ((m_mac == other.m_mac) && (m_ip_addr == other.m_ip_addr) &&
81 (m_bd == other.m_bd));
87 msg_t req(con.
ctx(), std::ref(*
this));
89 auto& payload = req.get_request().get_payload();
92 m_mac.
to_bytes(payload.mac_address, 6);
93 to_bytes(m_ip_addr, &payload.is_ipv6, payload.ip_address);
106 std::ostringstream s;
108 <<
" bd:" << m_bd <<
" mac:" << m_mac.
to_string()
109 <<
" ip:" << m_ip_addr.to_string();
static const rc_t NOOP
The HW write/update action was/has not been attempted.
bool operator==(const create_cmd &i) const
Comparison operator - only used for UT.
std::string to_string() const
convert to string format for debug purposes
std::string to_string() const
String conversion.
Error codes that VPP will return during a HW write.
std::string to_string() const
convert to string format for debug purposes
rc_t wait()
Wait on the commands promise.
void to_bytes(const boost::asio::ip::address_v6 &addr, uint8_t *array)
A representation of the connection to VPP.
A base class for all RPC commands to VPP.
#define VAPI_CALL(_stmt)
Convenince wrapper macro for error handling in VAPI sends.
delete_cmd(HW::item< bool > &item, uint32_t id, const mac_address_t &mac, const boost::asio::ip::address &ip_addr)
Constructor.
A cmd class that deletes a bridge domain ARP entry.
static const rc_t OK
The HW write was successfull.
vapi::Connection & ctx()
Retrun the VAPI context the commands will use.
void to_bytes(uint8_t *array, uint8_t len) const
Convert to byte array.
The VPP Object Model (VOM) library.
rc_t issue(connection &con)
Issue the command to VPP/HW.
create_cmd(HW::item< bool > &item, uint32_t id, const mac_address_t &mac, const boost::asio::ip::address &ip_addr)
Constructor.
void set(const rc_t &rc)
Set the HW return code - should only be called from the family of Command objects.
rc_t issue(connection &con)
Issue the command to VPP/HW.
Type def of a Ethernet address.
A command class that creates or updates the bridge domain ARP Entry.
bool operator==(const delete_cmd &i) const
Comparison operator - only used for UT.
HW::item< bool > & m_hw_item
A reference to an object's HW::item that the command will update.
HW::item< bool > & item()
return the HW item the command updates
vapi::Bd_ip_mac_add_del msg_t
convenient typedef
std::string to_string() const
convert to string format for debug purposes