16 #ifndef __VOM_INTERFACE_SPAN_H__ 17 #define __VOM_INTERFACE_SPAN_H__ 64 state_t(
int v,
const std::string& s);
91 std::shared_ptr<interface_span>
singular()
const;
101 static void dump(std::ostream& os);
106 typedef std::pair<interface::key_t, interface::key_t>
key_t;
131 void handle_replay();
136 void show(std::ostream& os);
157 static std::shared_ptr<interface_span> find_or_add(
183 const std::shared_ptr<interface> m_itf_from;
188 const std::shared_ptr<interface> m_itf_to;
A template base class for all enum types.
const std::string key_t
In the opflex world each entity is known by a URI which can be converted into a string.
static const state_t TX_ENABLED
TX enable state.
static const state_t TX_RX_ENABLED
TX and RX enable state.
static std::shared_ptr< interface_span > find(const interface &i)
Find a singular instance in the DB for the interface passed.
A Database to store the unique 'singular' instances of a single object type.
static const state_t DISABLED
DISABLED state.
static void dump(std::ostream &os)
Dump all interface_spans into the stream provided.
sll srl srl sll sra u16x4 i
A representation of an interface in VPP.
Class definition for listeners to OM events.
inspect command handler Handler
std::pair< interface::key_t, interface::key_t > key_t
The key type for interface_spans.
const std::string & to_string() const
convert to string format for debug purposes
void event_handler(void *tls_async)
dependency_t
There needs to be a strict order in which object types are read from VPP (at boot time) and replayed ...
std::shared_ptr< interface_span > singular() const
Return the 'singular instance' of the interface_span that matches this object.
The interface to writing objects into VPP OM.
A base class for all object_base in the VPP object_base-Model.
std::ostream & operator<<(std::ostream &os, const std::pair< direction_t, interface::key_t > &key)
The VPP Object Model (VOM) library.
~interface_span()
Destructor.
static state_t from_int(uint8_t val)
Convert VPP's numerical value to enum type.
interface_span(const interface &itf_from, const interface &itf_to, state_t state)
Construct a new object matching the desried state.
static const state_t RX_ENABLED
RX enable state.
vl_api_dhcp_client_state_t state
A representation of interface span configuration.
The state of the interface - rx/tx or both to be mirrored.