19 namespace l2_binding_cmds {
34 return ((m_itf == other.m_itf) && (m_bd == other.m_bd) &&
35 (m_is_bvi == other.m_is_bvi));
41 msg_t req(con.
ctx(), std::ref(*
this));
43 auto& payload = req.get_request().get_payload();
44 payload.rx_sw_if_index = m_itf.
value();
47 payload.bvi = m_is_bvi;
79 return ((m_itf == other.m_itf) && (m_bd == other.m_bd) &&
80 (m_is_bvi == other.m_is_bvi));
86 msg_t req(con.
ctx(), std::ref(*
this));
88 auto& payload = req.get_request().get_payload();
89 payload.rx_sw_if_index = m_itf.
value();
92 payload.bvi = m_is_bvi;
106 std::ostringstream s;
127 (m_tag == other.m_tag));
133 msg_t req(con.
ctx(), std::ref(*
this));
135 auto& payload = req.get_request().get_payload();
136 payload.sw_if_index = m_itf.
value();
138 payload.push_dot1q = 1;
139 payload.tag1 = m_tag;
149 std::ostringstream s;
151 <<
" itf:" << m_itf.
to_string() <<
" tag:" << m_tag;
static const rc_t NOOP
The HW write/update action was/has not been attempted.
std::string to_string() const
convert to string format for debug purposes
int value() const
Return the value of the enum - same as integer conversion.
uint32_t value() const
get the value of the handle
bool operator==(const set_vtr_op_cmd &i) const
Comparison operator - only used for UT.
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.
T & data()
Return the data read/written.
std::string to_string() const
convert to string format for debug purposes
A functor class that binds L2 configuration to an interface.
rc_t issue(connection &con)
Issue the command to VPP/HW.
A representation of the connection to VPP.
bind_cmd(HW::item< bool > &item, const handle_t &itf, uint32_t bd, bool is_bvi)
Constructor.
A base class for all RPC commands to VPP.
unbind_cmd(HW::item< bool > &item, const handle_t &itf, uint32_t bd, bool is_bvi)
Constructor.
#define VAPI_CALL(_stmt)
Convenince wrapper macro for error handling in VAPI sends.
rc_t issue(connection &con)
Issue the command to VPP/HW.
A type declaration of an interface handle in VPP.
bool operator==(const unbind_cmd &i) const
Comparison operator - only used for UT.
A cmd class that Unbinds L2 configuration from an interface.
static const rc_t OK
The HW write was successfull.
std::string to_string() const
convert to string format for debug purposes
bool operator==(const bind_cmd &i) const
Comparison operator - only used for UT.
vapi::Connection & ctx()
Retrun the VAPI context the commands will use.
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.
set_vtr_op_cmd(HW::item< l2_binding::l2_vtr_op_t > &item, const handle_t &itf, uint16_t tag)
Constructor.
A cmd class sets the VTR operation.
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.
HW::item< bool > & item()
return the HW item the command updates
vapi::Sw_interface_set_l2_bridge msg_t
convenient typedef
rc_t issue(connection &con)
Issue the command to VPP/HW.