25 singular_db<interface::key_t, arp_proxy_binding> arp_proxy_binding::m_db;
30 : m_itf(itf.singular())
37 , m_binding(o.m_binding)
44 m_db.release(m_itf->key(),
this);
48 arp_proxy_binding::sweep()
64 arp_proxy_binding::replay()
76 s <<
"ArpProxy-binding: " << m_itf->to_string();
93 std::shared_ptr<arp_proxy_binding>
96 return (m_db.find_or_add(temp.m_itf->key(), temp));
99 std::shared_ptr<arp_proxy_binding>
102 return find_or_add(*
this);
113 arp_proxy_binding::event_handler::handle_replay()
121 std::shared_ptr<arp_proxy_binding_cmds::dump_cmd>
cmd =
122 std::make_shared<arp_proxy_binding_cmds::dump_cmd>();
127 for (
auto& record : *cmd) {
128 auto& payload = record.get_payload();
137 <<
" itf:" << payload.sw_if_index;
143 arp_proxy_binding::event_handler::order()
const
void db_dump(const DB &db, std::ostream &os)
Print each of the objects in the DB into the stream provided.
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.
std::shared_ptr< arp_proxy_binding > singular() const
Return the 'singular' of the LLDP binding that matches this object.
static void dump(std::ostream &os)
Dump all LLDP bindings into the stream provided.
std::string to_string() const
convert to string format for debug purposes
A representation of LLDP client configuration on an interface.
A cmd class that Unbinds ArpProxy Config from an interface.
A representation of an interface in VPP.
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
Then L2/objects that bind to interfaces, BD, ACLS, etc.
A command class that binds the LLDP config to the interface.
The VPP Object Model (VOM) library.
A representation of a method call to VPP.
static bool register_listener(listener *listener)
Register a listener of events.
~arp_proxy_binding()
Destructor.
arp_proxy_binding(const interface &itf)
Construct a new object matching the desried state.