23 singular_db<bridge_domain_arp_entry::key_t, bridge_domain_arp_entry>
24 bridge_domain_arp_entry::m_db;
59 , m_ip_addr(bde.m_ip_addr)
69 m_db.release(
key(),
this);
75 return (std::make_pair(m_bd->key(), m_ip_addr));
81 return ((
key() == bdae.
key()) && (m_mac == bdae.m_mac));
85 bridge_domain_arp_entry::sweep()
106 std::ostringstream s;
107 s <<
"bridge-domain-arp-entry:[" << m_bd->to_string() <<
", " 108 << m_mac.
to_string() <<
", " << m_ip_addr.to_string() <<
"]";
125 std::shared_ptr<bridge_domain_arp_entry>
128 return (m_db.find_or_add(temp.
key(), temp));
131 std::shared_ptr<bridge_domain_arp_entry>
134 return (m_db.find(k));
137 std::shared_ptr<bridge_domain_arp_entry>
140 return find_or_add(*
this);
153 "bridge domain ARP termination entries",
this);
157 bridge_domain_arp_entry::event_handler::handle_replay()
163 bridge_domain_arp_entry::event_handler::handle_populate(
169 std::shared_ptr<bridge_domain_arp_entry_cmds::dump_cmd>
cmd =
170 std::make_shared<bridge_domain_arp_entry_cmds::dump_cmd>(~0);
175 for (
auto& record : *cmd) {
176 auto& payload = record.get_payload();
178 std::shared_ptr<bridge_domain> bd =
195 bridge_domain_arp_entry::event_handler::order()
const 209 os <<
"[" << key.first <<
", " << key.second <<
"]";
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.
std::shared_ptr< bridge_domain > singular() const
Return the matchin 'singular' instance of the bridge-domain.
std::string to_string() const
Convert to string for debugging.
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.
rc_t rc() const
Get the HW return code.
static const log_level_t DEBUG
static std::shared_ptr< bridge_domain > find(const key_t &key)
Static function to find the bridge_domain in the model.
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
static void dump(std::ostream &os)
Dump all bridge_domain-doamin into the stream provided.
std::shared_ptr< bridge_domain_arp_entry > singular() const
Return the matching 'singular instance'.
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.
~bridge_domain_arp_entry()
Destructor.
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 const rc_t OK
The HW write was successfull.
static void enqueue(cmd *f)
Enqueue A command for execution.
manual_print typedef address
bool operator==(const bridge_domain_arp_entry &bdae) const
comparison operator
std::ostream & operator<<(std::ostream &os, const std::pair< direction_t, interface::key_t > &key)
std::string to_string() const
String conversion.
The VPP Object Model (VOM) library.
const neighbour::flags_t from_api(vapi_enum_ip_neighbor_flags f)
A representation of a method call to VPP.
const key_t key() const
Return the object's key.
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.