19 namespace l2_vtr_cmds {
35 (m_tag == other.m_tag));
41 msg_t req(con.
ctx(), std::ref(*
this));
43 auto& payload = req.get_request().get_payload();
44 payload.sw_if_index = m_itf.
value();
46 payload.push_dot1q = 1;
uint32_t value() const
get the value of the handle
Error codes that VPP will return during a HW write.
int value() const
Return the value of the enum - same as integer conversion.
rc_t wait()
Wait on the commands promise.
bool operator==(const set_cmd &i) const
Comparison operator - only used for UT.
T & data()
Return the data read/written.
std::string to_string() const
convert to string format for debug purposes
rc_t issue(connection &con)
Issue the command to VPP/HW.
set_cmd(HW::item< l2_vtr::option_t > &item, const handle_t &itf, uint16_t tag)
Constructor.
A representation of the connection to VPP.
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 cmd class sets the VTR operation.
vapi::Connection & ctx()
Retrun the VAPI context the commands will use.
The VPP Object Model (VOM) library.
HW::item< l2_vtr::option_t > & m_hw_item
A reference to an object's HW::item that the command will update.
vapi::L2_interface_vlan_tag_rewrite msg_t
convenient typedef