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::deque<std::shared_ptr<l3_binding>>
find(
const interface&
i);
105 static std::shared_ptr<l3_binding>
find(
const key_t& k);
115 virtual ~event_handler() =
default;
125 void handle_replay();
130 void show(std::ostream& os);
141 static event_handler m_evh;
151 static std::shared_ptr<l3_binding> find_or_add(
const l3_binding& temp);
180 const std::shared_ptr<interface> m_itf;
sll srl srl sll sra u16x4 i
const interface & itf() const
Return the interface associated with this L3 binding.
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()
static const_iterator_t cend()
const route::prefix_t & prefix() const
Return the prefix associated with this L3 binding.
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.
std::string to_string() const
convert to string format for debug purposes
singular_db< key_t, l3_binding >::const_iterator const_iterator_t
The iterator type.
std::shared_ptr< l3_binding > singular() const
Return the 'singular instance' of the L3-Config that matches this object.
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.
bool operator==(const l3_binding &l) const
Comparison operator.
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.
const key_t key() const
Get the object's key.
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.
static std::deque< std::shared_ptr< l3_binding > > find(const interface &i)
Find all bindings in the DB for the interface passed.
A representation of L3 configuration on an interface.