22 singular_db<arp_proxy_config::key_t, arp_proxy_config> arp_proxy_config::m_db;
27 const boost::asio::ip::address_v4& high)
37 , m_config(o.m_config)
46 m_db.release(std::make_pair(m_low, m_high),
this);
50 arp_proxy_config::sweep()
66 arp_proxy_config::replay()
78 <<
" low:" << m_low.to_string() <<
" high:" << m_high.to_string();
91 std::shared_ptr<arp_proxy_config>
94 return (m_db.find_or_add(std::make_pair(temp.m_low, temp.m_high), temp));
97 std::shared_ptr<arp_proxy_config>
100 return find_or_add(*
this);
111 arp_proxy_config::event_handler::handle_replay()
117 arp_proxy_config::event_handler::handle_populate(
const client_db::key_t& key)
119 std::shared_ptr<arp_proxy_config_cmds::dump_cmd>
cmd =
120 std::make_shared<arp_proxy_config_cmds::dump_cmd>();
125 for (
auto& record : *cmd) {
126 auto& payload = record.get_payload();
137 arp_proxy_config::event_handler::order()
const 151 os <<
"[" << key.first <<
", " << key.second <<
"]";
static void dump(std::ostream &os)
Dump all LLDP configs into the stream provided.
Global Configuration has no dependency.
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 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_config > singular() const
Return the 'singular' of the LLDP config that matches this object.
arp_proxy_config(const boost::asio::ip::address_v4 &low, const boost::asio::ip::address_v4 &high)
Construct a new object matching the desried state.
~arp_proxy_config()
Destructor.
std::string to_string() const
convert to string format for debug purposes
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.
A representation of LLDP client configuration on an interface.
boost::asio::ip::address from_bytes(uint8_t is_ip6, const uint8_t *bytes)
Convert a VPP byte stinrg into a boost addresss.
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.
A cmd class that Unconfigs ArpProxy Config from an interface.
A command class that adds the ARP Proxy config.
std::pair< boost::asio::ip::address_v4, boost::asio::ip::address_v4 > key_t
Key type.
static bool register_listener(listener *listener)
Register a listener of events.