16 #ifndef __VOM_L3_BINDING_H__ 17 #define __VOM_L3_BINDING_H__ 36 typedef std::pair<interface::key_t, route::prefix_t>
key_t;
61 const key_t
key()
const;
68 static const_iterator_t
cbegin();
69 static const_iterator_t
cend();
75 std::shared_ptr<l3_binding>
singular()
const;
95 static void dump(std::ostream& os);
100 static std::shared_ptr<l3_binding>
find(
const key_t& k);
120 void handle_replay();
125 void show(std::ostream& os);
146 static std::shared_ptr<l3_binding> find_or_add(
const l3_binding& temp);
175 const std::shared_ptr<interface> m_itf;
bool operator==(const l3_binding &l) const
Comparison operator.
static std::shared_ptr< l3_binding > find(const key_t &k)
Find a binding from its key.
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_iterator_t cbegin()
const interface & itf() const
Return the interface associated with this L3 binding.
static const_iterator_t cend()
const key_t key() const
Get the object's key.
A Database to store the unique 'singular' instances of a single object type.
static void dump(std::ostream &os)
Dump all l3_bindings into the stream provided.
singular_db< key_t, l3_binding >::const_iterator const_iterator_t
The iterator type.
A representation of an interface in VPP.
Class definition for listeners to OM events.
inspect command handler Handler
std::map< KEY, std::weak_ptr< OBJ > >::const_iterator const_iterator
Iterator.
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 ...
The interface to writing objects into VPP OM.
l3_binding(const interface &itf, const route::prefix_t &pfx)
Construct a new object matching the desried state.
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)
std::pair< interface::key_t, route::prefix_t > key_t
The key type for l3_bindings.
The VPP Object Model (VOM) library.
std::string to_string() const
convert to string format for debug purposes
const route::prefix_t & prefix() const
Return the prefix associated with this L3 binding.
A representation of L3 configuration on an interface.
std::shared_ptr< l3_binding > singular() const
Return the 'singular instance' of the L3-Config that matches this object.