19 namespace l2_xconnect_cmds {
24 , m_east_itf(east_itf)
25 , m_west_itf(west_itf)
32 return ((m_east_itf == other.m_east_itf) && (m_west_itf == other.m_west_itf));
38 msg_t req(con.
ctx(), std::ref(*
this));
40 auto& payload = req.get_request().get_payload();
41 payload.rx_sw_if_index = m_east_itf.
value();
42 payload.tx_sw_if_index = m_west_itf.
value();
58 <<
" west-itf:" << m_west_itf.
to_string();
67 , m_east_itf(east_itf)
68 , m_west_itf(west_itf)
75 return ((m_east_itf == other.m_east_itf) && (m_west_itf == other.m_west_itf));
81 msg_t req(con.
ctx(), std::ref(*
this));
83 auto& payload = req.get_request().get_payload();
84 payload.rx_sw_if_index = m_east_itf.
value();
85 payload.tx_sw_if_index = m_west_itf.
value();
101 <<
" east-itf:" << m_east_itf.
to_string()
102 <<
" west-itf:" << m_west_itf.
to_string();
120 m_dump.reset(
new msg_t(con.
ctx(), std::ref(*
this)));
132 return (
"l2-xconnect-dump");
static const rc_t NOOP
The HW write/update action was/has not been attempted.
A functor class that binds L2 configuration to an interface.
A cmd class that Dumps all the bridge domains.
uint32_t value() const
get the value of the handle
bool operator==(const dump_cmd &i) const
Comparison operator - only used for UT.
rc_t issue(connection &con)
Issue the command to VPP/HW.
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.
std::string to_string() const
convert to string format for debug purposes
A cmd class that Unbinds L2 configuration from an interface.
bool operator==(const bind_cmd &i) const
Comparison operator - only used for UT.
A representation of the connection to VPP.
unbind_cmd(HW::item< bool > &item, const handle_t &east_itf, const handle_t &west_itf)
Constructor.
bool operator==(const unbind_cmd &i) const
Comparison operator - only used for UT.
A base class for all RPC commands to VPP.
#define VAPI_CALL(_stmt)
Convenince wrapper macro for error handling in VAPI sends.
bind_cmd(HW::item< bool > &item, const handle_t &east_itf, const handle_t &west_itf)
Constructor.
std::string to_string() const
convert to string format for debug purposes
A type declaration of an interface handle in VPP.
static const rc_t OK
The HW write was successfull.
vapi::Connection & ctx()
Retrun the VAPI context the commands will use.
std::string to_string() const
convert to string format for debug purposes
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.
std::string to_string() const
convert to string format for debug purposes
rc_t issue(connection &con)
Issue the command to VPP/HW.
rc_t issue(connection &con)
Issue the command to VPP/HW.
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_xconnect msg_t
convenient typedef