20 namespace bridge_domain_arp_entry_cmds {
36 return ((m_mac == other.m_mac) && (m_ip_addr == other.m_ip_addr) &&
37 (m_bd == other.m_bd));
43 msg_t req(con.
ctx(), std::ref(*
this));
45 auto& payload = req.get_request().get_payload();
46 payload.entry.bd_id = m_bd;
48 to_api(m_mac, payload.entry.mac);
49 to_api(m_ip_addr, payload.entry.ip);
61 <<
" bd:" << m_bd <<
" mac:" << m_mac.
to_string()
62 <<
" ip:" << m_ip_addr.to_string();
81 return ((m_mac == other.m_mac) && (m_ip_addr == other.m_ip_addr) &&
82 (m_bd == other.m_bd));
88 msg_t req(con.
ctx(), std::ref(*
this));
90 auto& payload = req.get_request().get_payload();
91 payload.entry.bd_id = m_bd;
93 to_api(m_mac, payload.entry.mac);
94 to_api(m_ip_addr, payload.entry.ip);
107 std::ostringstream s;
109 <<
" bd:" << m_bd <<
" mac:" << m_mac.
to_string()
110 <<
" ip:" << m_ip_addr.to_string();
136 auto& payload =
m_dump->get_request().get_payload();
137 payload.bd_id = m_bd;
149 return (
"bridge-domain-arp-entry-dump");
static const rc_t NOOP
The HW write/update action was/has not been attempted.
bool operator==(const delete_cmd &i) const
Comparison operator - only used for UT.
Error codes that VPP will return during a HW write.
vapi::Bd_ip_mac_dump msg_t
vapi_enum_ip_neighbor_flags to_api(const neighbour::flags_t &f)
rc_t wait()
Wait on the commands promise.
A cmd class that Dumps all arp termination tables.
std::string to_string() const
convert to string format for debug purposes
std::string to_string() const
convert to string format for debug purposes
A representation of the connection to VPP.
rc_t issue(connection &con)
Issue the command to VPP/HW.
dump_cmd()
Default Constructor.
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.
bool operator==(const dump_cmd &i) const
Comparison operator - only used for UT.
static const rc_t OK
The HW write was successfull.
manual_print typedef address
rc_t wait()
Wait for the issue of the command to complete.
std::string to_string() const
convert to string format for debug purposes
vapi::Connection & ctx()
Retrun the VAPI context the commands will use.
std::string to_string() const
String conversion.
The VPP Object Model (VOM) library.
rc_t issue(connection &con)
Issue the command to VPP/HW.
std::string to_string() const
convert to string format for debug purposes
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.
std::unique_ptr< vapi::Bd_ip_mac_dump > m_dump
The VAPI event registration.
rc_t issue(connection &con)
Issue the command to VPP/HW.
bool operator==(const create_cmd &i) const
Comparison operator - only used for UT.
Type def of a Ethernet address.
A command class that creates or updates the bridge domain ARP Entry.
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