32 std::shared_ptr<list_cmds::l2_dump_cmd> cmd =
33 std::make_shared<list_cmds::l2_dump_cmd>();
38 for (
auto& record : *cmd) {
39 auto& payload = record.get_payload();
41 const handle_t hdl(payload.acl_index);
42 l2_list acl(hdl, std::string(reinterpret_cast<const char*>(payload.tag)));
44 for (
unsigned int ii = 0; ii < payload.count; ii++) {
45 const route::prefix_t pfx(payload.r[ii].is_ipv6,
46 payload.r[ii].src_ip_addr,
47 payload.r[ii].src_ip_prefix_len);
49 { payload.r[ii].src_mac }, { payload.r[ii].src_mac_mask });
74 std::shared_ptr<list_cmds::l3_dump_cmd> cmd =
75 std::make_shared<list_cmds::l3_dump_cmd>();
80 for (
auto& record : *cmd) {
81 auto& payload = record.get_payload();
83 const handle_t hdl(payload.acl_index);
84 l3_list acl(hdl, std::string(reinterpret_cast<const char*>(payload.tag)));
86 for (
unsigned int ii = 0; ii < payload.count; ii++) {
87 const route::prefix_t src(payload.r[ii].is_ipv6,
88 payload.r[ii].src_ip_addr,
89 payload.r[ii].src_ip_prefix_len);
90 const route::prefix_t dst(payload.r[ii].is_ipv6,
91 payload.r[ii].dst_ip_addr,
92 payload.r[ii].dst_ip_prefix_len);
110 l3_list::update(
const l3_list& obj)
115 if (!m_hdl || obj.m_rules != m_rules) {
123 m_rules = obj.m_rules;
127 l2_list::update(
const l2_list& obj)
132 if (!m_hdl || obj.m_rules != m_rules) {
140 m_rules = obj.m_rules;
169 l3_list::replay(
void)
177 l2_list::replay(
void)
static const action_t & from_int(uint8_t i)
Get the enum type from a VPP integer value.
update_cmd< l3_rule, vapi::Acl_add_replace > l3_update_cmd
Typedef the L3 ACL commands.
const std::string key_t
In the opflex world each entity is known by a URI which can be converted into a string.
delete_cmd< vapi::Macip_acl_del > l2_delete_cmd
static rc_t write()
Write/Execute all commands hitherto enqueued.
static const log_level_t DEBUG
delete_cmd< vapi::Acl_del > l3_delete_cmd
static rc_t commit(const client_db::key_t &key, const OBJ &obj)
Make the State in VPP reflect the expressed desired state.
static void enqueue(cmd *f)
Enqueue A command for execution.
list< l3_rule > l3_list
Typedef the L3 ACL type.
The VPP Object Model (VOM) library.
update_cmd< l2_rule, vapi::Macip_acl_add > l2_update_cmd
Typedef the L2 ACL commands.
list< l2_rule > l2_list
Typedef the L2 ACL type.