|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
16 #ifndef __VOM_ACL_BINDING_H__
17 #define __VOM_ACL_BINDING_H__
38 template <
typename LIST>
45 typedef std::pair<direction_t, interface::key_t>
key_t;
63 : m_direction(o.m_direction)
66 , m_binding(o.m_binding)
76 m_db.release(std::make_pair(m_direction, m_itf->key()),
this);
83 std::shared_ptr<binding>
singular()
const {
return find_or_add(*
this); }
91 s <<
"acl-binding:[" << m_direction.
to_string() <<
" " << m_itf->to_string()
92 <<
" " << m_acl->to_string() <<
" " << m_binding.
to_string() <<
"]";
100 static void dump(std::ostream& os) { m_db.dump(os); }
123 void handle_replay() { m_db.replay(); }
144 void update(
const binding& obj);
149 static std::shared_ptr<binding> find_or_add(
const binding& temp)
151 return (m_db.find_or_add(
152 std::make_pair(temp.m_direction, temp.m_itf->key()), temp));
186 const std::shared_ptr<interface> m_itf;
193 const std::shared_ptr<LIST> m_acl;
220 template <
typename LIST>
224 template <
typename LIST>
234 const std::pair<direction_t, interface::key_t>&
key);
The VPP Object Model (VOM) library.
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.
inspect command handler Handler
Class definition for listeners to OM events.
void db_dump(const DB &db, std::ostream &os)
Print each of the objects in the DB into the stream provided.
binding< l3_list > l3_binding
Typedef the L3 binding type.
binding< l2_list > l2_binding
Typedef the L2 binding type.
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.
std::shared_ptr< binding > singular() const
Return the 'singular instance' of the L2 config that matches this object.
binding(const binding &o)
Copy Constructor.
std::string to_string() const
convert to string format for debug purposes
std::ostream & operator<<(std::ostream &os, const std::pair< direction_t, interface::key_t > &key)
const std::string & to_string() const
convert to string format for debug purposes
static dependency_t order()
std::pair< direction_t, interface::key_t > key_t
The key for a binding is the direction and the interface.
static void dump(std::ostream &os)
Dump all bindings into the stream provided.
A Database to store the unique 'singular' instances of a single object type.
std::string to_string() const
convert to string format for debug purposes
A binding between an ACL and an interface.
binding(const direction_t &direction, const interface &itf, const LIST &acl)
Construct a new object matching the desried state.
void event_handler(void *tls_async)
A base class for all object_base in the VPP object_base-Model.