19 namespace gbp_recirc_cmds {
35 return ((m_itf == other.m_itf) && (m_is_ext == other.m_is_ext) &&
36 (m_sclass == other.m_sclass));
42 msg_t req(con.
ctx(), std::ref(*
this));
44 auto& payload = req.get_request().get_payload();
46 payload.recirc.sw_if_index = m_itf.
value();
47 payload.recirc.sclass = m_sclass;
48 payload.recirc.is_ext = m_is_ext;
60 <<
" ext:" << m_is_ext <<
" sclass:" << m_sclass;
74 return (m_itf == other.m_itf);
80 msg_t req(con.
ctx(), std::ref(*
this));
82 auto& payload = req.get_request().get_payload();
84 payload.recirc.sw_if_index = m_itf.
value();
85 payload.recirc.sclass = ~0;
114 m_dump.reset(
new msg_t(con.
ctx(), std::ref(*
this)));
126 return (
"gbp-recirc-dump");
std::string to_string() const
convert to string format for debug purposes
std::string to_string() const
convert to string format for debug purposes
uint32_t value() const
get the value of the handle
Error codes that VPP will return during a HW write.
rc_t issue(connection &con)
Issue the command to VPP/HW.
std::string to_string() const
convert to string format for debug purposes
rc_t wait()
Wait on the commands promise.
create_cmd(HW::item< bool > &item, const handle_t &itf, bool is_ext, sclass_t sclass)
Constructor.
A representation of the connection to VPP.
bool operator==(const create_cmd &i) const
Comparison operator - only used for UT.
A base class for all RPC commands to VPP.
A cmd class that deletes a GBP recirc.
#define VAPI_CALL(_stmt)
Convenince wrapper macro for error handling in VAPI sends.
A command class that creates or updates the GBP recirc.
A type declaration of an interface handle in VPP.
static const rc_t OK
The HW write was successfull.
rc_t issue(connection &con)
Issue the command to VPP/HW.
rc_t issue(connection &con)
Issue the command to VPP/HW.
vapi::Connection & ctx()
Retrun the VAPI context the commands will use.
A cmd class that Dumps all the GBP recircs.
The VPP Object Model (VOM) library.
bool operator==(const dump_cmd &i) const
Comparison operator - only used for UT.
std::string to_string() const
convert to string format for debug purposes
bool operator==(const delete_cmd &i) const
Comparison operator - only used for UT.
HW::item< bool > & m_hw_item
A reference to an object's HW::item that the command will update.
delete_cmd(HW::item< bool > &item, const handle_t &itf)
Constructor.
HW::item< bool > & item()
return the HW item the command updates
vapi::Gbp_recirc_add_del msg_t
convenient typedef