|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
24 singular_db<interface::key_t, lldp_binding> lldp_binding::m_db;
29 : m_itf(itf.singular())
30 , m_port_desc(port_desc)
37 , m_port_desc(o.m_port_desc)
47 m_db.release(m_itf->key(),
this);
53 return ((
key() == l.
key()) && (m_port_desc == l.m_port_desc));
59 return (m_itf->key());
78 lldp_binding::replay()
90 s <<
"Lldp-binding: " << m_itf->to_string() <<
" port_desc:" << m_port_desc
108 std::shared_ptr<lldp_binding>
109 lldp_binding::find_or_add(
const lldp_binding& temp)
111 return (m_db.find_or_add(temp.m_itf->key(), temp));
114 std::shared_ptr<lldp_binding>
117 return (m_db.find(k));
120 std::shared_ptr<lldp_binding>
123 return find_or_add(*
this);
133 lldp_binding::event_handler::handle_replay()
145 lldp_binding::event_handler::order()
const
const key_t & key() const
Return this object's key.
static rc_t write()
Write/Execute all commands hitherto enqueued.
static void dump(std::ostream &os)
Dump all LLDP bindings into the stream provided.
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 ...
static std::shared_ptr< lldp_binding > find(const key_t &k)
Find or add LLDP binding based on its key.
std::string to_string() const
convert to string format for debug purposes
A representation of LLDP client configuration on an interface.
A cmd class that Unbinds Lldp Config from an interface.
std::shared_ptr< lldp_binding > singular() const
Return the 'singular' of the LLDP binding that matches this object.
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.
A representation of an interface in VPP.
const typedef std::string key_t
In the opflex world each entity is known by a URI which can be converted into a string.
~lldp_binding()
Destructor.
static void enqueue(cmd *f)
Enqueue A command for execution.
std::string to_string() const
convert to string format for debug purposes
A command class that binds the LLDP config to the interface.
interface::key_t key_t
Typedef for the key of a LLDP binding.
lldp_binding(const interface &itf, const std::string &hostname)
Construct a new object matching the desried state.
@ BINDING
Then L2/objects that bind to interfaces, BD, ACLS, etc.
void event_handler(void *tls_async)
bool operator==(const lldp_binding &b) const
Comparison operator.