|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
21 singular_db<l3_binding::key_t, l3_binding> l3_binding::m_db;
29 : m_itf(itf.singular())
38 , m_binding(o.m_binding)
47 m_db.release(
key(),
this);
53 return ((m_pfx == l.m_pfx) && (*m_itf == *l.m_itf));
59 return (make_pair(m_itf->key(), m_pfx));
77 new l3_binding_cmds::bind_cmd(m_binding, m_itf->handle(), m_pfx));
81 const route::prefix_t&
108 std::ostringstream s;
109 s <<
"L3-binding:[" << m_itf->to_string() <<
" prefix:" << m_pfx.
to_string()
129 std::shared_ptr<l3_binding>
130 l3_binding::find_or_add(
const l3_binding& temp)
132 return (m_db.find_or_add(temp.key(), temp));
135 std::shared_ptr<l3_binding>
138 return (m_db.find(k));
141 std::shared_ptr<l3_binding>
144 return find_or_add(*
this);
156 os <<
"[" <<
key.first <<
", " <<
key.second <<
"]";
168 l3_binding::event_handler::handle_replay()
182 l3_binding::event_handler::order()
const
bool operator==(const l3_binding &l) const
Comparison operator.
static rc_t write()
Write/Execute all commands hitherto enqueued.
static const_iterator_t cbegin()
static std::shared_ptr< l3_binding > find(const key_t &k)
Find a binding from its key.
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 const_iterator_t cend()
const interface & itf() const
Return the interface associated with this L3 binding.
A functor class that binds the L3 config to the interface.
void db_dump(const DB &db, std::ostream &os)
Print each of the objects in the DB into the stream provided.
std::string to_string() const
convert to string format for debug purposes
binding< l3_list > l3_binding
Typedef the L3 binding type.
static bool register_listener(listener *listener)
Register a listener of events.
std::string to_string() const
convert to string format for debug purposes
const key_t key() const
Get the object's key.
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.
static void dump(std::ostream &os)
Dump all l3_bindings into the stream provided.
static void enqueue(cmd *f)
Enqueue A command for execution.
std::string to_string() const
convert to string format for debug purposes
std::pair< interface::key_t, route::prefix_t > key_t
The key type for l3_bindings.
std::ostream & operator<<(std::ostream &os, const std::pair< direction_t, interface::key_t > &key)
l3_binding(const interface &itf, const route::prefix_t &pfx)
Construct a new object matching the desried state.
std::shared_ptr< l3_binding > singular() const
Return the 'singular instance' of the L3-Config that matches this object.
singular_db< key_t, l3_binding >::const_iterator const_iterator_t
The iterator type.
@ BINDING
Then L2/objects that bind to interfaces, BD, ACLS, etc.
Error codes that VPP will return during a HW write.
void event_handler(void *tls_async)
A representation of L3 configuration on an interface.
A cmd class that Unbinds L3 Config from an interface.
const route::prefix_t & prefix() const
Return the prefix associated with this L3 binding.