21 namespace l2_emulation_cmds {
31 return (m_itf == other.m_itf);
37 msg_t req(con.
ctx(), std::ref(*
this));
39 auto& payload = req.get_request().get_payload();
40 payload.sw_if_index = m_itf.
value();
67 return (m_itf == other.m_itf);
73 msg_t req(con.
ctx(), std::ref(*
this));
75 auto& payload = req.get_request().get_payload();
76 payload.sw_if_index = m_itf.
value();
rc_t issue(connection &con)
Issue the command to VPP/HW.
uint32_t value() const
get the value of the handle
disable_cmd(HW::item< bool > &item, const handle_t &itf)
Constructor.
DEFINE_VAPI_MSG_IDS_L2E_API_JSON
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 representation of the connection to VPP.
bool operator==(const enable_cmd &i) const
Comparison operator - only used for UT.
enable_cmd(HW::item< bool > &item, const handle_t &itf)
Constructor.
A base class for all RPC commands to VPP.
#define VAPI_CALL(_stmt)
Convenince wrapper macro for error handling in VAPI sends.
std::string to_string() const
convert to string format for debug purposes
std::string to_string() const
convert to string format for debug purposes
A type declaration of an interface handle in VPP.
A functor class that enable L2 emulation to an interface.
static const rc_t OK
The HW write was successfull.
vapi::Connection & ctx()
Retrun the VAPI context the commands will use.
The VPP Object Model (VOM) library.
rc_t issue(connection &con)
Issue the command to VPP/HW.
A cmd class that Unbinds L2 configuration from an interface.
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::L2_emulation msg_t
convenient typedef
bool operator==(const disable_cmd &i) const
Comparison operator - only used for UT.