20 singular_db<arp_proxy_config::key_t, arp_proxy_config> arp_proxy_config::m_db;
22 arp_proxy_config::event_handler arp_proxy_config::m_evh;
25 const boost::asio::ip::address_v4& high)
35 , m_config(o.m_config)
44 m_db.release(std::make_pair(m_low, m_high),
this);
48 arp_proxy_config::sweep()
64 arp_proxy_config::replay()
76 <<
" low:" << m_low.to_string() <<
" high:" << m_high.to_string();
89 std::shared_ptr<arp_proxy_config>
92 return (m_db.find_or_add(std::make_pair(temp.m_low, temp.m_high), temp));
95 std::shared_ptr<arp_proxy_config>
98 return find_or_add(*
this);
101 arp_proxy_config::event_handler::event_handler()
108 arp_proxy_config::event_handler::handle_replay()
114 arp_proxy_config::event_handler::handle_populate(
const client_db::key_t& key)
120 arp_proxy_config::event_handler::order()
const 134 os <<
"[" << key.first <<
", " << key.second <<
"]";
static void dump(std::ostream &os)
Dump all LLDP configs into the stream provided.
Global Configuration has no dependency.
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.