19 namespace gbp_ext_itf_cmds {
35 return ((m_itf == other.m_itf) && (m_bd_id == other.m_bd_id) &&
36 (m_rd_id == other.m_rd_id));
42 msg_t req(con.
ctx(), std::ref(*
this));
44 auto& payload = req.get_request().get_payload();
46 payload.ext_itf.sw_if_index = m_itf.
value();
47 payload.ext_itf.bd_id = m_bd_id;
48 payload.ext_itf.rd_id = m_rd_id;
60 <<
" bd-id:" << m_bd_id <<
" rd-id:" << m_rd_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.ext_itf.sw_if_index = m_itf.
value();
85 payload.ext_itf.bd_id = ~0;
86 payload.ext_itf.rd_id = ~0;
111 m_dump.reset(
new msg_t(con.
ctx(), std::ref(*
this)));
123 return (
"gbp-ext-itf-dump");
create_cmd(HW::item< bool > &item, const handle_t &itf, uint32_t bd_id, uint32_t rd_id)
Constructor.
A cmd class that Dumps all the GBP ext_itfs.
uint32_t value() const
get the value of the handle
rc_t issue(connection &con)
Issue the command to VPP/HW.
Error codes that VPP will return during a HW write.
rc_t issue(connection &con)
Issue the command to VPP/HW.
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.
bool operator==(const create_cmd &i) const
Comparison operator - only used for UT.
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.
bool operator==(const delete_cmd &i) const
Comparison operator - only used for UT.
delete_cmd(HW::item< bool > &item, const handle_t &itf)
Constructor.
A type declaration of an interface handle in VPP.
static const rc_t OK
The HW write was successfull.
std::string to_string() const
convert to string format for debug purposes
vapi::Connection & ctx()
Retrun the VAPI context the commands will use.
The VPP Object Model (VOM) library.
std::string to_string() const
convert to string format for debug purposes
A cmd class that deletes a GBP ext_itf.
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
A command class that creates or updates the GBP ext_itf.
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::Gbp_ext_itf_add_del msg_t
convenient typedef