21 singular_db<arp_proxy_config::key_t, arp_proxy_config> arp_proxy_config::m_db;
23 arp_proxy_config::event_handler arp_proxy_config::m_evh;
26 const boost::asio::ip::address_v4& high)
36 , m_config(o.m_config)
45 m_db.release(std::make_pair(m_low, m_high),
this);
49 arp_proxy_config::sweep()
65 arp_proxy_config::replay()
77 <<
" low:" << m_low.to_string() <<
" high:" << m_high.to_string();
90 std::shared_ptr<arp_proxy_config>
93 return (m_db.find_or_add(std::make_pair(temp.m_low, temp.m_high), temp));
96 std::shared_ptr<arp_proxy_config>
99 return find_or_add(*
this);
102 arp_proxy_config::event_handler::event_handler()
110 arp_proxy_config::event_handler::handle_replay()
116 arp_proxy_config::event_handler::handle_populate(
const client_db::key_t& key)
122 arp_proxy_config::event_handler::order()
const 136 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.
std::shared_ptr< arp_proxy_config > singular() const
Return the 'singular' of the LLDP config that matches this object.
static rc_t write()
Write/Execute all commands hitherto enqueued.
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
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.
std::ostream & operator<<(std::ostream &os, const std::pair< direction_t, interface::key_t > &key)
The VPP Object Model (VOM) library.
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.