21 namespace bridge_domain_cmds {
28 , m_learning_mode(lmode)
29 , m_arp_term_mode(amode)
31 , m_mac_age_mode(mmode)
44 msg_t req(con.
ctx(), std::ref(*
this));
46 auto& payload = req.get_request().get_payload();
48 payload.flood = m_flood_mode.
value();
49 payload.uu_flood = m_flood_mode.
value();
51 payload.learn = m_learning_mode.
value();
52 payload.arp_term = m_arp_term_mode.
value();
53 payload.mac_age = m_mac_age_mode.
value();
84 msg_t req(con.
ctx(), std::ref(*
this));
86 auto& payload = req.get_request().get_payload();
101 std::ostringstream s;
120 m_dump.reset(
new msg_t(con.
ctx(), std::ref(*
this)));
122 auto& payload = m_dump->get_request().get_payload();
135 return (
"bridge-domain-dump");
static const rc_t NOOP
The HW write/update action was/has not been attempted.
std::string to_string() const
convert to string format for debug purposes
Bridge Domain MAC aging mode.
rc_t issue(connection &con)
Issue the command to VPP/HW.
rc_t issue(connection &con)
Issue the command to VPP/HW.
Error codes that VPP will return during a HW write.
int value() const
Return the value of the enum - same as integer conversion.
rc_t wait()
Wait on the commands promise.
T & data()
Return the data read/written.
std::string to_string() const
convert to string format for debug purposes
delete_cmd(HW::item< uint32_t > &item)
Constructor.
rc_t issue(connection &con)
Issue the command to VPP/HW.
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.
bool operator==(const delete_cmd &i) const
Comparison operator - only used for UT.
A cmd class that Dumps all the bridge domains.
A base class for all RPC commands to VPP.
std::string to_string() const
convert to string format for debug purposes
#define VAPI_CALL(_stmt)
Convenince wrapper macro for error handling in VAPI sends.
Bridge Domain ARP termination mode.
bool operator==(const dump_cmd &i) const
Comparison operator - only used for UT.
Bridge Domain Learning mode.
DEFINE_VAPI_MSG_IDS_L2_API_JSON
static const rc_t OK
The HW write was successfull.
vapi::Connection & ctx()
Retrun the VAPI context the commands will use.
Bridge Domain Learning mode.
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.
A command class that creates an Bridge-Domain.
A cmd class that Delete an Bridge-Domain.
create_cmd(HW::item< uint32_t > &item, const bridge_domain::learning_mode_t &lmode, const bridge_domain::arp_term_mode_t &amode, const bridge_domain::flood_mode_t &fmode, const bridge_domain::mac_age_mode_t &mmode)
Constructor.
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::Bridge_domain_add_del msg_t
convenient typedef