22 singular_db<bridge_domain_arp_entry::key_t, bridge_domain_arp_entry>
23 bridge_domain_arp_entry::m_db;
58 , m_ip_addr(bde.m_ip_addr)
68 m_db.release(
key(),
this);
74 return (std::make_pair(m_bd->key(), m_ip_addr));
80 return ((
key() == bdae.
key()) && (m_mac == bdae.m_mac));
84 bridge_domain_arp_entry::sweep()
105 std::ostringstream s;
106 s <<
"bridge-domain-arp-entry:[" << m_bd->to_string() <<
", " 107 << m_mac.
to_string() <<
", " << m_ip_addr.to_string() <<
"]";
124 std::shared_ptr<bridge_domain_arp_entry>
127 return (m_db.find_or_add(temp.
key(), temp));
130 std::shared_ptr<bridge_domain_arp_entry>
133 return (m_db.find(k));
136 std::shared_ptr<bridge_domain_arp_entry>
139 return find_or_add(*
this);
152 "bridge domain ARP termination entries",
this);
156 bridge_domain_arp_entry::event_handler::handle_replay()
162 bridge_domain_arp_entry::event_handler::handle_populate(
168 std::shared_ptr<bridge_domain_arp_entry_cmds::dump_cmd>
cmd =
169 std::make_shared<bridge_domain_arp_entry_cmds::dump_cmd>(~0);
174 for (
auto& record : *cmd) {
175 auto& payload = record.get_payload();
179 *bd,
from_bytes(payload.is_ipv6, payload.ip_address),
194 bridge_domain_arp_entry::event_handler::order()
const 208 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.
bool operator==(const bridge_domain_arp_entry &bdae) const
comparison operator
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)
std::string to_string() const
String conversion.
The VPP Object Model (VOM) library.
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.