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);
62 <<
" bd:" << m_bd <<
" mac:" << m_mac.
to_string()
63 <<
" ip:" << m_ip_addr.to_string();
82 return ((m_mac == other.m_mac) && (m_ip_addr == other.m_ip_addr) &&
83 (m_bd == other.m_bd));
89 msg_t req(con.
ctx(), std::ref(*
this));
91 auto& payload = req.get_request().get_payload();
94 m_mac.
to_bytes(payload.mac_address, 6);
95 to_bytes(m_ip_addr, &payload.is_ipv6, payload.ip_address);
108 std::ostringstream s;
110 <<
" bd:" << m_bd <<
" mac:" << m_mac.
to_string()
111 <<
" ip:" << m_ip_addr.to_string();
static const rc_t NOOP
The HW write/update action was/has not been attempted.
HW::item< bool > & m_hw_item
A reference to an object's HW::item that the command will update.
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
void to_bytes(const boost::asio::ip::address_v6 &addr, uint8_t *array)
A representation of the connection to VPP.
HW::item< bool > & item()
return the HW item the command updates
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.
vapi::Bd_ip_mac_add_del msg_t
convenient typedef
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.
rc_t wait()
Wait on the commands promise.
std::string to_string() const
convert to string format for debug purposes