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;
81 return ((m_itf == other.m_itf) && (m_bd == other.m_bd) &&
82 (m_is_bvi == other.m_is_bvi));
88 msg_t req(con.
ctx(), std::ref(*
this));
90 auto& payload = req.get_request().get_payload();
91 payload.rx_sw_if_index = m_itf.
value();
94 payload.bvi = m_is_bvi;
108 std::ostringstream s;
129 (m_tag == other.m_tag));
135 msg_t req(con.
ctx(), std::ref(*
this));
137 auto& payload = req.get_request().get_payload();
138 payload.sw_if_index = m_itf.
value();
140 payload.push_dot1q = 1;
141 payload.tag1 = m_tag;
153 std::ostringstream s;
155 <<
" itf:" << m_itf.
to_string() <<
" tag:" << m_tag;
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.
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
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.
HW::item< bool > & item()
return the HW item the command updates
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.
vapi::Sw_interface_set_l2_bridge msg_t
convenient typedef
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
rc_t wait()
Wait on the commands promise.
rc_t issue(connection &con)
Issue the command to VPP/HW.