|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
16 #ifndef __VOM_ACL_LIST_CMDS_H__
17 #define __VOM_ACL_LIST_CMDS_H__
24 #include <vapi/acl.api.vapi.hpp>
32 template <
typename LIST,
typename UPDATE>
62 s <<
"ACL-list-update:[ " << this->
item().
to_string() <<
" rule-list:[";
63 for (
auto rule : m_rules) {
64 s <<
" " << rule.to_string();
76 return ((m_key == other.m_key) && (m_rules == other.m_rules));
82 LIST::add(m_key, this->
item());
90 int acl_index = reply.get_response().get_payload().acl_index;
91 int retval = reply.get_response().get_payload().retval;
110 void insert_acl() { LIST::add(m_key, this->
item()); }
115 const cmd_key_t& m_key;
126 template <
typename LIST,
typename DELETE>
148 std::ostringstream s;
166 void remove_acl() { LIST::remove(this->
item()); }
172 template <
typename DUMP>
A cmd class that Deletes an ACL.
dump_cmd()=default
Constructor.
update_cmd< l2_list, vapi::Macip_acl_add > l2_update_cmd
Typedef the L2 ACL commands.
The VPP Object Model (VOM) library.
static const rc_t & from_vpp_retval(int32_t rv)
Get the rc_t from the VPP API value.
delete_cmd< l2_list, vapi::Macip_acl_del > l2_delete_cmd
dump_cmd< vapi::Acl_dump > l3_dump_cmd
bool operator==(const dump_cmd &i) const
Comparison operator - only used for UT.
rc_t issue(connection &con)
Issue the command to VPP/HW.
A base class for all RPC commands to VPP.
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 Dumps all the ACLs.
rc_t issue(connection &con)
Issue the command to VPP/HW.
delete_cmd(HW::item< handle_t > &item)
Constructor.
bool operator==(const delete_cmd &other) const
Comparison operator - only used for UT.
virtual vapi_error_e operator()(UPDATE &reply)
A callback function for handling ACL creates.
rc_t issue(connection &con)
Issue the command to VPP/HW.
A representation of the connection to VPP.
sll srl srl sll sra u16x4 i
A type declaration of an interface handle in VPP.
delete_cmd< l3_list, vapi::Acl_del > l3_delete_cmd
const static rc_t INVALID
HW write reported invalid input.
std::string to_string() const
convert to string format for debug purposes
dump_cmd< vapi::Macip_acl_dump > l2_dump_cmd
const static log_level_t DEBUG
update_cmd(HW::item< handle_t > &item, const cmd_key_t &key, const cmd_rules_t &rules)
Constructor.
T & data()
Return the data read/written.
HW::item< handle_t > & item()
return the HW item the command updates
LIST::rules_t cmd_rules_t
vl_api_gbp_rule_t rules[n_rules]
std::string to_string() const
convert to string format for debug purposes
A command class that Create the list.
bool operator==(const update_cmd &other) const
Comparison operator - only used for UT.
Error codes that VPP will return during a HW write.
A base class for VPP dump commands.
void fulfill(const HW::item< handle_t > &d)
Fulfill the commands promise.
void succeeded()
Called by the HW Command Q when it is disabled to indicate the command can be considered successful w...
update_cmd< l3_list, vapi::Acl_add_replace > l3_update_cmd
Typedef the L3 ACL commands.