21 namespace bridge_domain_cmds {
30 , m_learning_mode(lmode)
31 , m_arp_term_mode(amode)
32 , m_arp_ufwd_mode(aumode)
34 , m_uu_flood_mode(uufmode)
35 , m_mac_age_mode(mmode)
48 msg_t req(con.
ctx(), std::ref(*
this));
50 auto& payload = req.get_request().get_payload();
52 payload.flood = m_flood_mode.
value();
53 payload.uu_flood = m_uu_flood_mode.
value();
55 payload.learn = m_learning_mode.
value();
56 payload.arp_term = m_arp_term_mode.
value();
57 payload.arp_ufwd = m_arp_ufwd_mode.
value();
58 payload.mac_age = m_mac_age_mode.
value();
89 msg_t req(con.
ctx(), std::ref(*
this));
91 auto& payload = req.get_request().get_payload();
106 std::ostringstream s;
125 m_dump.reset(
new msg_t(con.
ctx(), std::ref(*
this)));
127 auto& payload = m_dump->get_request().get_payload();
140 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.
Bridge Domain Unknown Unicast Flood mode.
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.
Bridge Domain ARP Unicast Forward mode.
vapi::Connection & ctx()
Retrun the VAPI context the commands will use.
Bridge Domain flood 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.
HW::item< uint32_t > & m_hw_item
A reference to an object's HW::item that the command will update.
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::arp_ufwd_mode_t &aumode, const bridge_domain::flood_mode_t &fmode, const bridge_domain::uu_flood_mode_t &uufmode, const bridge_domain::mac_age_mode_t &mmode)
Constructor.
HW::item< uint32_t > & item()
return the HW item the command updates
vapi::Bridge_domain_add_del msg_t
convenient typedef