19 #include <vapi/vpe.api.vapi.hpp> 42 , m_l2_address(l2_address)
54 , m_prefix(o.m_prefix)
55 , m_l2_address(o.m_l2_address)
60 tap_interface::mk_create_cmd(std::queue<cmd*>& q)
69 tap_interface::mk_delete_cmd(std::queue<cmd*>& q)
76 std::shared_ptr<tap_interface>
79 return std::dynamic_pointer_cast<
tap_interface>(singular_i());
82 std::shared_ptr<interface>
83 tap_interface::singular_i()
const 85 return m_db.find_or_add(
name(), *
this);
101 tap_interface::event_handler::handle_replay()
107 tap_interface::event_handler::order()
const void release()
release/remove an interface form the singular store
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.
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
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.
tap_interface(const std::string &name, const admin_state_t &state, const route::prefix_t &prefix)
Construct a new object matching the desried state.
The VPP Object Model (VOM) library.
A functor class that deletes a Tap interface.
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