28 rule.
src_ip().
to_vpp(&payload.is_ipv6, payload.src_ip_addr,
29 &payload.src_ip_prefix_len);
38 rule.
src().
to_vpp(&payload.is_ipv6, payload.src_ip_addr,
39 &payload.src_ip_prefix_len);
40 rule.
dst().
to_vpp(&payload.is_ipv6, payload.dst_ip_addr,
41 &payload.dst_ip_prefix_len);
43 payload.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));
64 memcpy(payload.tag, m_key.c_str(),
65 std::min(m_key.length(),
sizeof(payload.tag)));
67 auto it = m_rules.cbegin();
69 while (it != m_rules.cend()) {
70 to_vpp(*it, payload.r[ii]);
88 msg_t req(con.
ctx(), std::ref(*
this));
90 auto& payload = req.get_request().get_payload();
107 m_dump.reset(
new msg_t(con.
ctx(), std::ref(*
this)));
109 auto& payload = m_dump->get_request().get_payload();
110 payload.acl_index = ~0;
123 msg_t req(con.
ctx(), m_rules.size(), std::ref(*
this));
126 auto& payload = req.get_request().get_payload();
128 payload.count = m_rules.size();
129 memset(payload.tag, 0,
sizeof(payload.tag));
130 memcpy(payload.tag, m_key.c_str(),
131 std::min(m_key.length(),
sizeof(payload.tag)));
133 auto it = m_rules.cbegin();
135 while (it != m_rules.cend()) {
136 to_vpp(*it, payload.r[ii]);
154 msg_t req(con.
ctx(), std::ref(*
this));
156 auto& payload = req.get_request().get_payload();
173 m_dump.reset(
new msg_t(con.
ctx(), std::ref(*
this)));
175 auto& payload = m_dump->get_request().get_payload();
176 payload.acl_index = ~0;
const route::prefix_t & src() const
Getters.
static const rc_t NOOP
The HW write/update action was/has not been attempted.
HW::item< handle_t > & m_hw_item
A reference to an object's HW::item that the command will update.
int value() const
Return the value of the enum - same as integer conversion.
const mac_address_t & mac() const
uint32_t value() const
get the value of the handle
uint8_t tcp_flags_mask() const
const route::prefix_t & src_ip() const
uint8_t tcp_flags_value() const
Error codes that VPP will return during a HW write.
T & data()
Return the data read/written.
uint16_t dstport_or_icmpcode_first() const
rc_t issue(connection &con)
Issue the command to VPP/HW.
A representation of the connection to VPP.
const action_t & action() const
static void to_vpp(const l2_rule &rule, vapi_type_macip_acl_rule &payload)
An ACL rule is the building block of an ACL.
uint16_t srcport_or_icmptype_last() const
const mac_address_t & mac_mask() const
#define VAPI_CALL(_stmt)
Convenince wrapper macro for error handling in VAPI sends.
void to_vpp(uint8_t *is_ip6, uint8_t *addr, uint8_t *len) const
Convert the prefix into VPP API parameters.
const action_t & action() const
static const rc_t OK
The HW write was successfull.
const route::prefix_t & dst() const
vapi::Connection & ctx()
Retrun the VAPI context the commands will use.
void to_bytes(uint8_t *array, uint8_t len) const
Convert to byte array.
uint16_t srcport_or_icmptype_first() const
The VPP Object Model (VOM) library.
An ACL rule is the building block of an ACL.
rc_t issue(connection &con)
Issue the command to VPP/HW.
void set(const rc_t &rc)
Set the HW return code - should only be called from the family of Command objects.
UPDATE msg_t
convenient typedef
uint16_t dstport_or_icmpcode_last() const
rc_t issue(connection &con)
Issue the command to VPP/HW.
HW::item< handle_t > wait()
Wait on the commands promise.