|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
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)
71 q.push(
new tap_interface_cmds::tapv2_delete_cmd(
m_hdl));
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
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 singular_db< key_t, interface > m_db
A map of all interfaces key against the interface's name.
HW::item< handle_t > m_hdl
The SW interface handle VPP has asigned to the interface.
vl_api_dhcp_client_state_t state
const std::string & name() const
Return the interface type.
static bool register_listener(listener *listener)
Register a listener of events.
virtual void sweep(void)
Sweep/reap the object if still stale.
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.
A functor class that creates an interface.
Type def of a L2 address as read from VPP.
@ INTERFACE
interfaces are the root of the dependency graph
The admin state of the interface.
tap_interface(const std::string &name, const admin_state_t &state, const route::prefix_t &prefix)
Construct a new object matching the desried state.
void release()
release/remove an interface form the singular store
void event_handler(void *tls_async)
std::shared_ptr< tap_interface > singular() const
Return the matching 'singular instance' of the TAP interface.