19 namespace gbp_bridge_domain_cmds {
31 , m_bm_flood(bm_flood)
40 (m_rd_id == other.m_rd_id) && (m_bvi == other.m_bvi) &&
41 (m_uu_fwd == other.m_uu_fwd) && (m_bm_flood == other.m_bm_flood) &&
42 (m_flags == other.m_flags));
48 msg_t req(con.
ctx(), std::ref(*
this));
50 auto& payload = req.get_request().get_payload();
53 payload.bd.rd_id = m_rd_id;
54 payload.bd.bvi_sw_if_index = m_bvi.
value();
55 payload.bd.uu_fwd_sw_if_index = m_uu_fwd.
value();
56 payload.bd.bm_flood_sw_if_index = m_bm_flood.
value();
60 flags =
static_cast<vapi_enum_gbp_bridge_domain_flags
>(
63 flags =
static_cast<vapi_enum_gbp_bridge_domain_flags
>(
66 flags =
static_cast<vapi_enum_gbp_bridge_domain_flags
>(
69 flags =
static_cast<vapi_enum_gbp_bridge_domain_flags
>(
72 payload.bd.flags =
flags;
103 msg_t req(con.
ctx(), std::ref(*
this));
105 auto& payload = req.get_request().get_payload();
120 std::ostringstream s;
135 m_dump.reset(
new msg_t(con.
ctx(), std::ref(*
this)));
147 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.
vl_api_wireguard_peer_flags_t flags
uint32_t value() const
get the value of the handle
static const flags_t UU_FWD_DROP
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.
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.
A representation of the connection to VPP.
rc_t issue(connection &con)
Issue the command to VPP/HW.
create_cmd(HW::item< uint32_t > &item, u32 rd_id, const handle_t bvi, const handle_t uu_fwd, const handle_t bm_flood, const gbp_bridge_domain::flags_t &flags)
Constructor.
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.
delete_cmd(HW::item< uint32_t > &item)
Constructor.
const 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.
static const rc_t OK
The HW write was successfull.
bool operator==(const create_cmd &i) const
Comparison operator - only used for UT.
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.
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