19 namespace gbp_bridge_domain_cmds {
29 , m_bm_flood(bm_flood)
38 (m_bvi == other.m_bvi) && (m_uu_fwd == other.m_uu_fwd) &&
39 (m_bm_flood == other.m_bm_flood) && (m_flags == other.m_flags));
45 msg_t req(con.
ctx(), std::ref(*
this));
47 auto& payload = req.get_request().get_payload();
50 payload.bd.bvi_sw_if_index = m_bvi.
value();
51 payload.bd.uu_fwd_sw_if_index = m_uu_fwd.
value();
52 payload.bd.bm_flood_sw_if_index = m_bm_flood.
value();
56 flags =
static_cast<vapi_enum_gbp_bridge_domain_flags
>(
59 flags =
static_cast<vapi_enum_gbp_bridge_domain_flags
>(
62 flags =
static_cast<vapi_enum_gbp_bridge_domain_flags
>(
65 flags =
static_cast<vapi_enum_gbp_bridge_domain_flags
>(
68 payload.bd.flags =
flags;
99 msg_t req(con.
ctx(), std::ref(*
this));
101 auto& payload = req.get_request().get_payload();
116 std::ostringstream s;
131 m_dump.reset(
new msg_t(con.
ctx(), std::ref(*
this)));
143 return (
"gbp-bridge-domain-dump");
static const rc_t NOOP
The HW write/update action was/has not been attempted.
static const flags_t DO_NOT_LEARN
rc_t issue(connection &con)
Issue the command to VPP/HW.
static const flags_t UU_FWD_DROP
uint32_t value() const
get the value of the handle
bool operator==(const dump_cmd &i) const
Comparison operator - only used for UT.
A cmd class that Delete an Bridge-Domain.
Error codes that VPP will return during a HW write.
std::string to_string() const
convert to string format for debug purposes
A cmd class that Dumps all the bridge domains.
rc_t wait()
Wait on the commands promise.
T & data()
Return the data read/written.
static const flags_t MCAST_DROP
std::string to_string() const
convert to string format for debug purposes
static const flags_t UCAST_ARP
std::string to_string() const
convert to string format for debug purposes
A command class that creates an Bridge-Domain.
rc_t issue(connection &con)
Issue the command to VPP/HW.
bool operator==(const delete_cmd &i) const
Comparison operator - only used for UT.
create_cmd(HW::item< uint32_t > &item, const handle_t bvi, const handle_t uu_fwd, const handle_t bm_flood, const gbp_bridge_domain::flags_t &flags)
Constructor.
A representation of the connection to VPP.
rc_t issue(connection &con)
Issue the command to VPP/HW.
bool operator==(const create_cmd &i) const
Comparison operator - only used for UT.
A base class for all RPC commands to VPP.
#define VAPI_CALL(_stmt)
Convenince wrapper macro for error handling in VAPI sends.
A type declaration of an interface handle in VPP.
delete_cmd(HW::item< uint32_t > &item)
Constructor.
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.
void set(const rc_t &rc)
Set the HW return code - should only be called from the family of Command objects.
const std::string & to_string() const
convert to string format for debug purposes
std::string to_string() const
convert to string format for debug purposes
HW::item< uint32_t > & m_hw_item
A reference to an object's HW::item that the command will update.
HW::item< uint32_t > & item()
return the HW item the command updates
vapi::Gbp_bridge_domain_add msg_t
convenient typedef
std::string to_string() const
convert to string format for debug purposes