23 l2_binding::event_handler::order()
const 48 std::shared_ptr<binding_cmds::l2_dump_cmd>
cmd =
49 std::make_shared<binding_cmds::l2_dump_cmd>();
54 for (
auto& record : *cmd) {
55 auto& payload = record.get_payload();
60 for (
int ii = 0; ii < payload.count; ii++) {
61 std::shared_ptr<l2_list> acl =
l2_list::find(payload.acls[ii]);
78 l3_binding::event_handler::order()
const 100 std::shared_ptr<binding_cmds::l3_dump_cmd>
cmd =
101 std::make_shared<binding_cmds::l3_dump_cmd>();
106 for (
auto& record : *cmd) {
107 auto& payload = record.get_payload();
110 uint8_t n_input = payload.n_input;
113 for (
int ii = 0; ii < payload.count; ii++) {
114 std::shared_ptr<l3_list> acl =
l3_list::find(payload.acls[ii]);
137 l3_binding::update(
const binding& obj)
141 m_binding, m_direction, m_itf->handle(), m_acl->handle()));
148 l3_binding::sweep(
void)
152 m_binding, m_direction, m_itf->handle(), m_acl->handle()));
159 l3_binding::replay(
void)
163 m_binding, m_direction, m_itf->handle(), m_acl->handle()));
169 l2_binding::update(
const binding& obj)
173 m_binding, m_direction, m_itf->handle(), m_acl->handle()));
180 l2_binding::sweep(
void)
184 m_binding, m_direction, m_itf->handle(), m_acl->handle()));
191 l2_binding::replay(
void)
195 m_binding, m_direction, m_itf->handle(), m_acl->handle()));
202 const std::pair<direction_t, interface::key_t>& key)
204 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.
void event_handler(void *tls_async)
dependency_t
There needs to be a strict order in which object types are read from VPP (at boot time) and replayed ...
static void enqueue(cmd *f)
Enqueue A command for execution.
static const log_level_t ERROR
std::ostream & operator<<(std::ostream &os, const std::pair< direction_t, interface::key_t > &key)
Then L2/objects that bind to interfaces, BD, ACLS, etc.
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.