19 namespace gbp_recirc_cmds {
35 return ((m_itf == other.m_itf) && (m_is_ext == other.m_is_ext) &&
36 (m_epg_id == other.m_epg_id));
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.epg_id = m_epg_id;
48 payload.recirc.is_ext = m_is_ext;
60 <<
" ext:" << m_is_ext <<
" epg-id:" << m_epg_id;
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.epg_id = ~0;
114 m_dump.reset(
new msg_t(con.
ctx(), std::ref(*
this)));
126 return (
"gbp-recirc-dump");
create_cmd(HW::item< bool > &item, const handle_t &itf, bool is_ext, epg_id_t epg_id)
Constructor.
std::string to_string() const
convert to string format for debug purposes
uint32_t value() const
get the value of the handle
uint32_t epg_id_t
EPG IDs are 32 bit integers.
Error codes that VPP will return during a HW write.
rc_t issue(connection &con)
Issue the command to VPP/HW.
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 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.
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.
A command class that creates or updates the GBP recirc.
A type declaration of an interface handle in VPP.
std::string to_string() const
convert to string format for debug purposes
bool operator==(const dump_cmd &i) const
Comparison operator - only used for UT.
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.
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