|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
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>
126 bridge_domain_arp_entry::find_or_add(
const bridge_domain_arp_entry& temp)
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 =
180 bridge_domain_arp_entry bd_ae(*bd,
from_api(payload.entry.ip),
195 bridge_domain_arp_entry::event_handler::order()
const
209 os <<
"[" <<
key.first <<
", " <<
key.second <<
"]";
A base class for all object_base in the VPP object_base-Model.
bool operator==(const bridge_domain_arp_entry &bdae) const
comparison operator
static rc_t write()
Write/Execute all commands hitherto enqueued.
static rc_t commit(const client_db::key_t &key, const OBJ &obj)
Make the State in VPP reflect the expressed desired state.
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.
const static uint32_t DEFAULT_TABLE
The value of the defaultbridge domain.
The VPP Object Model (VOM) library.
static void register_handler(const std::vector< std::string > &cmds, const std::string &help, command_handler *ch)
Register a command handler for inspection.
dependency_t
There needs to be a strict order in which object types are read from VPP (at boot time) and replayed ...
const static rc_t OK
The HW write was successfull.
@ ENTRY
Entries in Tables.
A command class that creates or updates the bridge domain ARP Entry.
vnet_hw_if_output_node_runtime_t * r
void db_dump(const DB &db, std::ostream &os)
Print each of the objects in the DB into the stream provided.
static bool register_listener(listener *listener)
Register a listener of events.
static std::shared_ptr< bridge_domain > find(const key_t &key)
Static function to find the bridge_domain in the model.
const typedef std::string key_t
In the opflex world each entity is known by a URI which can be converted into a string.
static void enqueue(cmd *f)
Enqueue A command for execution.
manual_print typedef address
std::shared_ptr< bridge_domain_arp_entry > singular() const
Return the matching 'singular instance'.
const static log_level_t DEBUG
std::ostream & operator<<(std::ostream &os, const std::pair< direction_t, interface::key_t > &key)
A entry in the ARP termination table of a Bridge Domain.
rc_t rc() const
Get the HW return code.
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.
~bridge_domain_arp_entry()
Destructor.
void replay(void)
replay the object to create it in hardware
std::string to_string() const
String conversion.
Type def of a Ethernet address.
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.
A cmd class that deletes a bridge domain ARP entry.
void event_handler(void *tls_async)
const key_t key() const
Return the object's key.
const neighbour::flags_t from_api(vapi_enum_ip_neighbor_flags f)
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 void dump(std::ostream &os)
Dump all bridge_domain-doamin into the stream provided.