19 #include <vapi/vpe.api.vapi.hpp> 44 , m_l2_address(l2_address)
56 , m_prefix(o.m_prefix)
57 , m_l2_address(o.m_l2_address)
62 tap_interface::mk_create_cmd(std::queue<cmd*>& q)
75 tap_interface::mk_delete_cmd(std::queue<cmd*>& q)
85 std::shared_ptr<tap_interface>
88 return std::dynamic_pointer_cast<
tap_interface>(singular_i());
91 std::shared_ptr<interface>
92 tap_interface::singular_i()
const 94 return m_db.find_or_add(
name(), *
this);
110 tap_interface::event_handler::handle_replay()
116 tap_interface::event_handler::order()
const void release()
release/remove an interface form the singular store
tap_interface(const std::string &name, type_t type, admin_state_t state, route::prefix_t prefix)
Construct a new object matching the desried state.
const std::string key_t
In the opflex world each entity is known by a URI which can be converted into a string.
HW::item< handle_t > m_hdl
The SW interface handle VPP has asigned to the interface.
A functor class that creates an interface.
virtual void sweep(void)
Sweep/reap the object if still stale.
static void register_handler(const std::vector< std::string > &cmds, const std::string &help, command_handler *ch)
Register a command handler for inspection.
A functor class that deletes a Tap interface.
Type def of a L2 address as read from VPP.
static singular_db< key_t, interface > m_db
A map of all interfaces key against the interface's name.
vhost_vring_state_t state
A functor class that creates an interface.
const l2_address_t & l2_address() const
Return the L2 Address.
The admin state of the interface.
A representation of an interface in VPP.
void event_handler(void *tls_async)
std::shared_ptr< tap_interface > singular() const
Return the matching 'singular instance' of the TAP interface.
dependency_t
There needs to be a strict order in which object types are read from VPP (at boot time) and replayed ...
const std::string & name() const
Return the interface type.
The VPP Object Model (VOM) library.
A functor class that deletes a Tap interface.
static const type_t TAPV2
TAPv2 interface type.
const type_t & type() const
Return the interface type.
static bool register_listener(listener *listener)
Register a listener of events.
const key_t & key() const
Return the interface type.
interfaces are the root of the dependency graph