|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
24 singular_db<l2_emulation::key_t, l2_emulation> l2_emulation::m_db;
32 : m_itf(itf.singular())
46 return (m_itf->key());
52 return ((*m_itf == *l.m_itf));
55 std::shared_ptr<l2_emulation>
58 return (m_db.find(
key));
74 l2_emulation::replay()
78 new l2_emulation_cmds::enable_cmd(m_emulation, m_itf->handle()));
87 m_db.release(m_itf->key(),
this);
94 s <<
"L2-emulation:[" << m_itf->to_string() <<
"]";
111 std::shared_ptr<l2_emulation>
112 l2_emulation::find_or_add(
const l2_emulation& temp)
114 return (m_db.find_or_add(temp.m_itf->key(), temp));
117 std::shared_ptr<l2_emulation>
120 return find_or_add(*
this);
136 l2_emulation::event_handler::handle_replay()
150 l2_emulation::event_handler::order()
const
std::string to_string() const
convert to string format for debug purposes
static rc_t write()
Write/Execute all commands hitherto enqueued.
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.
l2_emulation(const interface &itf)
Construct a new object matching the desried state.
bool operator==(const l2_emulation &l) const
Comparison operator - for UT.
void db_dump(const DB &db, std::ostream &os)
Print each of the objects in the DB into the stream provided.
static void dump(std::ostream &os)
Dump all l2_emulations 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.
static void enqueue(cmd *f)
Enqueue A command for execution.
~l2_emulation()
Destructor.
A functor class that enable L2 emulation to an interface.
std::shared_ptr< l2_emulation > singular() const
Return the 'singular instance' of the L2 config that matches this object.
interface::key_t key_t
Key type for an L2 emulation in the singular DB.
rc_t rc() const
Get the HW return code.
A cmd class that Unbinds L2 configuration from an interface.
A Clas representing the binding of an L2 interface to a bridge-domain and the properties of that bind...
const key_t & key() const
Return the binding's key.
static std::shared_ptr< l2_emulation > find(const key_t &key)
Static function to find the bridge_domain in the model.
const static handle_t INVALID
A value of an interface handle_t that means the itf does not exist.
@ BINDING
Then L2/objects that bind to interfaces, BD, ACLS, etc.
void event_handler(void *tls_async)