|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
20 namespace acl_ethertype_cmds {
34 return (m_itf == other.m_itf && m_le == other.m_le);
40 msg_t req(
con.ctx(), m_le.size(), std::ref(*
this));
44 auto& payload = req.get_request().get_payload();
45 payload.sw_if_index = m_itf.
value();
46 payload.count = m_le.size();
48 auto it = m_le.cbegin();
49 while (
it != m_le.cend()) {
50 payload.whitelist[
i] =
it->getEthertype();
57 payload.n_input = n_input;
69 <<
" itf:" << m_itf.
to_string() <<
" ethertype-rules:";
70 auto it = m_le.cbegin();
71 while (
it != m_le.cend()) {
76 s <<
" rules-size:" << m_le.size();
90 return (m_itf == other.m_itf);
96 msg_t req(
con.ctx(), 0, std::ref(*
this));
98 auto& payload = req.get_request().get_payload();
99 payload.sw_if_index = m_itf.
value();
115 std::ostringstream s;
142 auto& payload =
m_dump->get_request().get_payload();
143 payload.sw_if_index = m_itf.
value();
155 return (
"acl-ethertype-dump");
vapi::Acl_interface_etype_whitelist_dump msg_t
rc_t wait()
Wait on the commands promise.
void set(const rc_t &rc)
Set the HW return code - should only be called from the family of Command objects.
std::multiset< ethertype_rule_t > ethertype_rules_t
The ethertype container.
The VPP Object Model (VOM) library.
const static rc_t OK
The HW write was successfull.
uint32_t value() const
get the value of the handle
bind_cmd(HW::item< bool > &item, const handle_t &itf, const acl_ethertype::ethertype_rules_t &le)
Constructor.
A base class for all RPC commands to VPP.
bool operator==(const dump_cmd &i) const
Comparison operator - only used for UT.
std::string to_string() const
convert to string format for debug purposes
HW::item< bool > & m_hw_item
A reference to an object's HW::item that the command will update.
std::unique_ptr< vapi::Acl_interface_etype_whitelist_dump > m_dump
The VAPI event registration.
#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
A representation of the connection to VPP.
rc_t wait()
Wait for the issue of the command to complete.
rc_t issue(connection &con)
Issue the command to VPP/HW.
bool operator==(const unbind_cmd &i) const
Comparison operator - only used for UT.
const static rc_t NOOP
The HW write/update action was/has not been attempted.
sll srl srl sll sra u16x4 i
const static direction_t INPUT
Permit Direction.
A type declaration of an interface handle in VPP.
A command class that unbinds the ethertype list to the interface.
save_rewrite_length must be aligned so that reass doesn t overwrite it
std::string to_string() const
convert to string format for debug purposes
rc_t issue(connection &con)
Issue the command to VPP/HW.
A cmd class that Dumps all the acl ethertypes on given interface.
vapi::Acl_interface_set_etype_whitelist msg_t
convenient typedef
std::string to_string() const
convert to string format for debug purposes
std::string to_string() const
convert to string format for debug purposes
bool operator==(const bind_cmd &i) const
Comparison operator - only used for UT.
unbind_cmd(HW::item< bool > &item, const handle_t &itf)
Constructor.
rc_t issue(connection &con)
Issue the command to VPP/HW.
dump_cmd()
Default Constructor.
Error codes that VPP will return during a HW write.
A command class that binds the ethertype list to the interface.