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;
64 <<
" mac:" << m_mac.
to_string() <<
" tx:" << m_tx_itf
65 <<
" bvi:" << m_is_bvi;
84 return ((m_mac == other.m_mac) && (m_bd == other.m_bd) &&
85 (m_is_bvi == other.m_is_bvi));
91 msg_t req(con.
ctx(), std::ref(*
this));
93 auto& payload = req.get_request().get_payload();
97 payload.sw_if_index = ~0;
98 payload.bvi_mac = m_is_bvi;
111 std::ostringstream s;
113 <<
" mac:" << m_mac.
to_string() <<
" bvi:" << m_is_bvi;
131 m_dump.reset(
new msg_t(con.
ctx(), std::ref(*
this)));
133 auto& payload = m_dump->get_request().get_payload();
146 return (
"bridge-domain-entry-dump");
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.
A command class that creates or updates the bridge_domain.
uint32_t value() const
get the value of the handle
std::string to_string() const
String conversion.
Error codes that VPP will return during a HW write.
A cmd class that deletes a bridge_domain.
std::string to_string() const
convert to string format for debug purposes
bool operator==(const delete_cmd &i) const
Comparison operator - only used for UT.
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.
std::string to_string() const
convert to string format for debug purposes
HW::item< bool > & item()
return the HW item the command updates
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.
#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.
std::string to_string() const
convert to string format for debug purposes
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.
bool operator==(const dump_cmd &i) const
Comparison operator - only used for UT.
The VPP Object Model (VOM) library.
std::string to_string() const
convert to string format for debug purposes
void set(const rc_t &rc)
Set the HW return code - should only be called from the family of Command objects.
vapi::L2fib_add_del msg_t
convenient typedef
bool operator==(const create_cmd &i) const
Comparison operator - only used for UT.
Type def of a Ethernet address.
rc_t wait()
Wait on the commands promise.