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();
86 msg_t req(con.
ctx(), std::ref(*
this));
88 auto& payload = req.get_request().get_payload();
103 std::ostringstream s;
122 m_dump.reset(
new msg_t(con.
ctx(), std::ref(*
this)));
124 auto& payload = m_dump->get_request().get_payload();
137 return (
"bridge-domain-dump");
static const rc_t NOOP
The HW write/update action was/has not been attempted.
HW::item< uint32_t > & m_hw_item
A reference to an object's HW::item that the command will update.
Bridge Domain MAC aging mode.
int value() const
Return the value of the enum - same as integer conversion.
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.
std::string to_string() const
convert to string format for debug purposes
bool operator==(const create_cmd &i) const
Comparison operator - only used for UT.
T & data()
Return the data read/written.
delete_cmd(HW::item< uint32_t > &item)
Constructor.
rc_t issue(connection &con)
Issue the command to VPP/HW.
A representation of the connection to VPP.
A cmd class that Dumps all the bridge domains.
HW::item< uint32_t > & item()
return the HW item the command updates
A base class for all RPC commands to VPP.
#define VAPI_CALL(_stmt)
Convenince wrapper macro for error handling in VAPI sends.
Bridge Domain ARP termination mode.
Bridge Domain Learning mode.
bool operator==(const dump_cmd &i) const
Comparison operator - only used for UT.
bool operator==(const delete_cmd &i) const
Comparison operator - only used for UT.
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.
vapi::Bridge_domain_add_del msg_t
convenient typedef
A command class that creates an Bridge-Domain.
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 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.
std::string to_string() const
convert to string format for debug purposes
rc_t wait()
Wait on the commands promise.