|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
28 payload.is_permit = (vapi_enum_acl_action)rule.
action().
value();
29 rule.
src_ip().
to_vpp((uint8_t*)&payload.src_prefix.address.af,
30 (uint8_t*)&payload.src_prefix.address.un,
31 &payload.src_prefix.len);
39 payload.is_permit = (vapi_enum_acl_action)rule.
action().
value();
43 payload.proto = (vapi_enum_ip_proto)rule.
proto();
57 msg_t req(
con.ctx(), m_rules.size(), std::ref(*
this));
60 auto& payload = req.get_request().get_payload();
62 payload.count = m_rules.size();
63 memset(payload.tag, 0,
sizeof(payload.tag));
65 payload.tag, m_key.c_str(), std::min(m_key.length(),
sizeof(payload.tag)));
67 auto it = m_rules.cbegin();
69 while (
it != m_rules.cend()) {
89 msg_t req(
con.ctx(), std::ref(*
this));
91 auto& payload = req.get_request().get_payload();
110 auto& payload =
m_dump->get_request().get_payload();
111 payload.acl_index = ~0;
124 msg_t req(
con.ctx(), m_rules.size(), std::ref(*
this));
127 auto& payload = req.get_request().get_payload();
129 payload.count = m_rules.size();
130 memset(payload.tag, 0,
sizeof(payload.tag));
132 payload.tag, m_key.c_str(), std::min(m_key.length(),
sizeof(payload.tag)));
134 auto it = m_rules.cbegin();
136 while (
it != m_rules.cend()) {
156 msg_t req(
con.ctx(), std::ref(*
this));
158 auto& payload = req.get_request().get_payload();
177 auto& payload =
m_dump->get_request().get_payload();
178 payload.acl_index = ~0;
uint16_t srcport_or_icmptype_first() const
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.
The VPP Object Model (VOM) library.
const route::prefix_t & dst() const
const static rc_t OK
The HW write was successfull.
An ACL rule is the building block of an ACL.
const route::prefix_t & src() const
Getters.
rc_t issue(connection &con)
Issue the command to VPP/HW.
uint32_t value() const
get the value of the handle
const action_t & action() const
uint16_t dstport_or_icmpcode_first() const
rc_t issue(connection &con)
Issue the command to VPP/HW.
HW::item< handle_t > & m_hw_item
A reference to an object's HW::item that the command will update.
std::unique_ptr< DUMP > m_dump
The VAPI event registration.
int value() const
Return the value of the enum - same as integer conversion.
const action_t & action() const
#define VAPI_CALL(_stmt)
Convenince wrapper macro for error handling in VAPI sends.
rc_t issue(connection &con)
Issue the command to VPP/HW.
A representation of the connection to VPP.
void to_bytes(uint8_t *array, uint8_t len) const
Convert to byte array.
static void to_vpp(const l2_rule &rule, vapi_type_macip_acl_rule &payload)
rc_t wait()
Wait for the issue of the command to complete.
An ACL rule is the building block of an ACL.
const static rc_t NOOP
The HW write/update action was/has not been attempted.
save_rewrite_length must be aligned so that reass doesn t overwrite it
uint8_t tcp_flags_value() const
const mac_address_t & mac_mask() const
const mac_address_t & mac() const
vapi_enum_ip_neighbor_flags to_api(const neighbour::flags_t &f)
UPDATE msg_t
convenient typedef
rc_t rc() const
Get the HW return code.
T & data()
Return the data read/written.
void to_vpp(uint8_t *is_ip6, uint8_t *addr, uint8_t *len) const
Convert the prefix into VPP API parameters.
uint16_t srcport_or_icmptype_last() const
const route::prefix_t & src_ip() const
uint16_t dstport_or_icmpcode_last() const
Error codes that VPP will return during a HW write.
uint8_t tcp_flags_mask() const