21 singular_db<bridge_domain_arp_entry::key_t, bridge_domain_arp_entry>
22 bridge_domain_arp_entry::m_db;
24 bridge_domain_arp_entry::event_handler bridge_domain_arp_entry::m_evh;
28 const boost::asio::ip::address& ip_addr,
38 const boost::asio::ip::address& ip_addr,
57 , m_ip_addr(bde.m_ip_addr)
67 m_db.release(
key(),
this);
73 return (std::make_pair(m_bd->key(), m_ip_addr));
79 return ((
key() == bdae.
key()) && (m_mac == bdae.m_mac));
83 bridge_domain_arp_entry::sweep()
104 std::ostringstream s;
105 s <<
"bridge-domain-arp-entry:[" << m_bd->to_string() <<
", " 106 << m_mac.
to_string() <<
", " << m_ip_addr.to_string() <<
"]";
123 std::shared_ptr<bridge_domain_arp_entry>
126 return (m_db.find_or_add(temp.
key(), temp));
129 std::shared_ptr<bridge_domain_arp_entry>
132 return (m_db.find(k));
135 std::shared_ptr<bridge_domain_arp_entry>
138 return find_or_add(*
this);
147 bridge_domain_arp_entry::event_handler::event_handler()
151 "bridge domain ARP termination entries",
this);
155 bridge_domain_arp_entry::event_handler::handle_replay()
161 bridge_domain_arp_entry::event_handler::handle_populate(
167 bridge_domain_arp_entry::event_handler::order()
const std::shared_ptr< bridge_domain_arp_entry > singular() const
Return the matching 'singular instance'.
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::string to_string() const
String conversion.
static rc_t write()
Write/Execute all commands hitherto enqueued.
bridge_domain_arp_entry(const bridge_domain &bd, const boost::asio::ip::address &ip_addr, const mac_address_t &mac)
Construct a bridge domain ARP Entry in the given bridge domain.
void replay(void)
replay the object to create it in hardware
rc_t rc() const
Get the HW return code.
static void dump(std::ostream &os)
Dump all bridge_domain-doamin into the stream provided.
std::pair< bridge_domain::key_t, boost::asio::ip::address > key_t
The key for a bridge_domain ARP entry; the BD, IP address and MAC address.
A base class for all object_base in the VPP object_base-Model.
A cmd class that deletes a bridge domain ARP entry.
const key_t key() const
Return the object's key.
~bridge_domain_arp_entry()
Destructor.
dependency_t
There needs to be a strict order in which object types are read from VPP (at boot time) and replayed ...
static const rc_t OK
The HW write was successfull.
static void enqueue(cmd *f)
Enqueue A command for execution.
std::shared_ptr< bridge_domain > singular() const
Return the matchin 'singular' instance of the bridge-domain.
bool operator==(const bridge_domain_arp_entry &bdae) const
comparison operator
The VPP Object Model (VOM) library.
std::string to_string() const
Convert to string for debugging.
Type def of a Ethernet address.
A command class that creates or updates the bridge domain ARP Entry.
static std::shared_ptr< bridge_domain_arp_entry > find(const key_t &k)
Find the instnace of the bridge_domain domain in the OM.
static bool register_listener(listener *listener)
Register a listener of events.
static const uint32_t DEFAULT_TABLE
The value of the defaultbridge domain.
A entry in the ARP termination table of a Bridge Domain.