|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
16 #ifndef __VOM_INTERFACE_IP6_ND_H__
17 #define __VOM_INTERFACE_IP6_ND_H__
34 template <
typename CLASS,
typename CMD>
55 , m_config(o.m_config)
65 m_db.release(m_itf->key(),
this);
72 std::shared_ptr<interface_ip6_nd>
singular()
const
74 return find_or_add(*
this);
83 s <<
"interface-ip6-nd:["
84 <<
" itf:" << m_itf->to_string() <<
" " << m_cls.to_string() <<
" "
93 static void dump(std::ostream& os) { m_db.dump(os); }
110 std::deque<std::shared_ptr<interface_ip6_nd>> rac;
112 auto it = m_db.cbegin();
114 while (
it != m_db.cend()) {
119 auto key =
it->first;
121 if (
i.key() ==
key.first) {
122 rac.push_back(
it->second.lock());
157 std::ostringstream s;
159 <<
" itf:" << m_itf.
to_string() <<
" " << m_cls.to_string();
169 return ((m_itf == other.m_itf) && (m_cls == other.m_cls));
210 std::ostringstream s;
212 <<
" itf:" << m_itf.
to_string() <<
" " << m_cls.to_string();
222 return ((m_itf == other.m_itf) && (m_cls == other.m_cls));
265 void handle_replay() { m_db.replay(); }
270 void show(std::ostream& os) { m_db.dump(os); }
289 HW::enqueue(
new config_cmd(m_config, m_itf->handle(), m_cls));
296 HW::enqueue(
new unconfig_cmd(m_config, m_itf->handle(), m_cls));
307 HW::enqueue(
new config_cmd(m_config, m_itf->handle(), m_cls));
314 static std::shared_ptr<interface_ip6_nd> find_or_add(
317 return (m_db.find_or_add(temp.m_itf->key(), temp));
330 const std::shared_ptr<interface> m_itf;
364 template <
typename CLASS,
typename CMD>
369 template <
typename CLASS,
typename CMD>
static rc_t write()
Write/Execute all commands hitherto enqueued.
interface_ip6_nd(const interface_ip6_nd &o)
Copy Constructor.
A representation of L3 configuration on an interface.
interface_ip6_nd< ra_prefix, vapi::Sw_interface_ip6nd_ra_prefix > ip6nd_ra_prefix
Typedef the ip6nd_ra_prefix.
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.
~interface_ip6_nd()
Destructor.
dependency_t
There needs to be a strict order in which object types are read from VPP (at boot time) and replayed ...
A cmd class that Unbinds L3 Config from an interface.
The interface to writing objects into VPP OM.
std::string to_string() const
convert to string format for debug purposes
inspect command handler Handler
A base class for all RPC commands to VPP.
unconfig_cmd(HW::item< bool > &item, const handle_t &itf, const class_t &cls)
Constructor.
static void dump(std::ostream &os)
Dump all config into the stream provided.
Class definition for listeners to OM events.
std::string to_string() const
convert to string format for debug purposes
std::shared_ptr< interface_ip6_nd > singular() const
Return the 'singular instance' of the interface ip6nd that matches this object.
static bool register_listener(listener *listener)
Register a listener of events.
bool operator==(const config_cmd &other) const
Comparison operator - only used for UT.
static std::shared_ptr< interface_ip6_nd > find(const interface &i)
Find an singular instance in the DB for the interface passed.
A representation of the connection to VPP.
rc_t issue(connection &con)
Issue the command to VPP/HW.
config_cmd(HW::item< bool > &item, const handle_t &itf, const class_t &cls)
Constructor.
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.
sll srl srl sll sra u16x4 i
interface_ip6_nd(const interface &itf, const class_t cls)
Construct a new object matching the desried state.
A type declaration of an interface handle in VPP.
static void enqueue(cmd *f)
Enqueue A command for execution.
save_rewrite_length must be aligned so that reass doesn t overwrite it
A functor class that binds the ra config to the interface.
std::string to_string() const
convert to string format for debug purposes
HW::item< bool > & item()
return the HW item the command updates
std::string to_string() const
convert to string format for debug purposes
std::string to_string() const
convert to string format for debug purposes
rc_t issue(connection &con)
Issue the command to VPP/HW.
bool operator==(const unconfig_cmd &other) const
Comparison operator - only used for UT.
A Database to store the unique 'singular' instances of a single object type.
@ BINDING
Then L2/objects that bind to interfaces, BD, ACLS, etc.
Error codes that VPP will return during a HW write.
std::string key_t
The key for interface's key.
void event_handler(void *tls_async)
interface_ip6_nd< ra_config, vapi::Sw_interface_ip6nd_ra_config > ip6nd_ra_config
Typedef the ip6nd_ra_config.
A base class for all object_base in the VPP object_base-Model.
interface::key_t key_t
The key type for interface ip6 nd.