22 l2_binding::event_handler::event_handler()
35 std::shared_ptr<binding_cmds::l2_dump_cmd>
cmd =
36 std::make_shared<binding_cmds::l2_dump_cmd>();
41 for (
auto& record : *cmd) {
42 auto& payload = record.get_payload();
46 for (
int ii = 0; ii < payload.count; ii++) {
47 std::shared_ptr<l2_list> acl =
l2_list::find(payload.acls[ii]);
57 l3_binding::event_handler::event_handler()
67 std::shared_ptr<binding_cmds::l3_dump_cmd>
cmd =
68 std::make_shared<binding_cmds::l3_dump_cmd>();
73 for (
auto& record : *cmd) {
74 auto& payload = record.get_payload();
77 uint8_t n_input = payload.n_input;
79 for (
int ii = 0; ii < payload.count; ii++) {
80 std::shared_ptr<l3_list> acl =
l3_list::find(payload.acls[ii]);
96 l3_binding::update(
const binding& obj)
100 m_binding, m_direction, m_itf->handle(), m_acl->handle()));
107 l3_binding::sweep(
void)
111 m_binding, m_direction, m_itf->handle(), m_acl->handle()));
118 l3_binding::replay(
void)
122 m_binding, m_direction, m_itf->handle(), m_acl->handle()));
128 l2_binding::update(
const binding& obj)
132 m_binding, m_direction, m_itf->handle(), m_acl->handle()));
139 l2_binding::sweep(
void)
143 m_binding, m_direction, m_itf->handle(), m_acl->handle()));
150 l2_binding::replay(
void)
154 m_binding, m_direction, m_itf->handle(), m_acl->handle()));
161 const std::pair<direction_t, interface::key_t>& key)
163 os <<
"[" << key.first.to_string() <<
" " << key.second <<
"]";
A command class that binds the ACL to the interface.
const std::string key_t
In the opflex world each entity is known by a URI which can be converted into a string.
static std::shared_ptr< interface > find(const handle_t &h)
The the singular instance of the interface in the DB by handle.
static void register_handler(const std::vector< std::string > &cmds, const std::string &help, command_handler *ch)
Register a command handler for inspection.
static rc_t write()
Write/Execute all commands hitherto enqueued.
static const direction_t INPUT
Permit Direction.
static std::shared_ptr< list > find(const handle_t &handle)
A command class that binds the ACL to the interface.
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.
std::ostream & operator<<(std::ostream &os, const std::pair< direction_t, interface::key_t > &key)
The VPP Object Model (VOM) library.
A representation of a method call to VPP.
static const direction_t OUTPUT
Deny Direction.
A binding between an ACL and an interface.
static bool register_listener(listener *listener)
Register a listener of events.