19 namespace bridge_domain_entry_cmds {
36 return ((m_mac == other.m_mac) && (m_tx_itf == other.m_tx_itf) &&
37 (m_bd == other.m_bd) && (m_is_bvi == other.m_is_bvi));
43 msg_t req(con.
ctx(), std::ref(*
this));
45 auto& payload = req.get_request().get_payload();
49 payload.sw_if_index = m_tx_itf.
value();
50 payload.bvi_mac = m_is_bvi;
62 <<
" mac:" << m_mac.
to_string() <<
" tx:" << m_tx_itf
63 <<
" bvi:" << m_is_bvi;
82 return ((m_mac == other.m_mac) && (m_bd == other.m_bd) &&
83 (m_is_bvi == other.m_is_bvi));
89 msg_t req(con.
ctx(), std::ref(*
this));
91 auto& payload = req.get_request().get_payload();
95 payload.sw_if_index = ~0;
96 payload.bvi_mac = m_is_bvi;
109 std::ostringstream s;
111 <<
" mac:" << m_mac.
to_string() <<
" bvi:" << m_is_bvi;
129 m_dump.reset(
new msg_t(con.
ctx(), std::ref(*
this)));
131 auto& payload = m_dump->get_request().get_payload();
144 return (
"bridge-domain-entry-dump");
std::string to_string() const
convert to string format for debug purposes
static const rc_t NOOP
The HW write/update action was/has not been attempted.
A command class that creates or updates the bridge_domain.
uint32_t value() const
get the value of the handle
Error codes that VPP will return during a HW write.
A cmd class that deletes a bridge_domain.
void to_bytes(uint8_t *array, uint8_t len) const
Convert to byte array.
rc_t wait()
Wait on the commands promise.
std::string to_string() const
convert to string format for debug purposes
A representation of the connection to VPP.
create_cmd(HW::item< bool > &item, const mac_address_t &mac, uint32_t id, handle_t tx_intf, bool is_bvi)
Constructor.
rc_t issue(connection &con)
Issue the command to VPP/HW.
rc_t issue(connection &con)
Issue the command to VPP/HW.
A base class for all RPC commands to VPP.
delete_cmd(HW::item< bool > &item, const mac_address_t &mac, uint32_t id, bool is_bvi)
Constructor.
std::string to_string() const
convert to string format for debug purposes
bool operator==(const create_cmd &i) const
Comparison operator - only used for UT.
#define VAPI_CALL(_stmt)
Convenince wrapper macro for error handling in VAPI sends.
A type declaration of an interface handle in VPP.
rc_t issue(connection &con)
Issue the command to VPP/HW.
static const rc_t OK
The HW write was successfull.
A cmd class that Dumps all the interface spans.
bool operator==(const dump_cmd &i) const
Comparison operator - only used for UT.
vapi::Connection & ctx()
Retrun the VAPI context the commands will use.
std::string to_string() const
String conversion.
The VPP Object Model (VOM) library.
void set(const rc_t &rc)
Set the HW return code - should only be called from the family of Command objects.
Type def of a Ethernet address.
std::string to_string() const
convert to string format for debug purposes
HW::item< bool > & m_hw_item
A reference to an object's HW::item that the command will update.
bool operator==(const delete_cmd &i) const
Comparison operator - only used for UT.
HW::item< bool > & item()
return the HW item the command updates
vapi::L2fib_add_del msg_t
convenient typedef