|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
24 singular_db<ip_unnumbered::key_t, ip_unnumbered> ip_unnumbered::m_db;
29 : m_itf(itf.singular())
30 , m_l3_itf(l3_itf.singular())
36 , m_l3_itf(o.m_l3_itf)
37 , m_config(o.m_config)
46 m_db.release(m_itf->key(),
this);
50 ip_unnumbered::sweep()
66 ip_unnumbered::replay()
78 s <<
"IP Unnumbered-config:"
79 <<
" itf:" << m_itf->to_string() <<
" l3-itf:" << m_l3_itf->to_string();
93 std::shared_ptr<ip_unnumbered>
94 ip_unnumbered::find_or_add(
const ip_unnumbered& temp)
96 return (m_db.find_or_add(temp.m_itf->key(), temp));
99 std::shared_ptr<ip_unnumbered>
102 return find_or_add(*
this);
112 ip_unnumbered::event_handler::handle_replay()
120 std::shared_ptr<ip_unnumbered_cmds::dump_cmd> cmd =
121 std::make_shared<ip_unnumbered_cmds::dump_cmd>();
126 for (
auto& ip_record : *cmd) {
127 auto& payload = ip_record.get_payload();
130 <<
" itf: " << payload.sw_if_index
131 <<
" ip: " << payload.ip_sw_if_index;
134 std::shared_ptr<interface> ip_itf =
interface::find(payload.ip_sw_if_index);
137 ip_unnumbered ipun(*itf, *ip_itf);
144 ip_unnumbered::event_handler::order()
const
static rc_t write()
Write/Execute all commands hitherto enqueued.
A cmd class that Unconfigs L3 Config from an interface.
static rc_t commit(const client_db::key_t &key, const OBJ &obj)
Make the State in VPP reflect the expressed desired state.
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 ...
ip_unnumbered(const interface &itf, const interface &l3_itf)
Construct a new object matching the desried state.
std::shared_ptr< ip_unnumbered > singular() const
Return the 'singular instance' of the L3-Config that matches this object.
void db_dump(const DB &db, std::ostream &os)
Print each of the objects in the DB into the stream provided.
static bool register_listener(listener *listener)
Register a listener of events.
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.
A command class that configures the IP unnumbered.
static void enqueue(cmd *f)
Enqueue A command for execution.
const static log_level_t DEBUG
A representation of IP unnumbered configuration on an interface.
static void dump(std::ostream &os)
Dump all ip_unnumbereds into the stream provided.
std::string to_string() const
convert to string format for debug purposes
@ BINDING
Then L2/objects that bind to interfaces, BD, ACLS, etc.
void event_handler(void *tls_async)
~ip_unnumbered()
Destructor.
static std::shared_ptr< interface > find(const handle_t &h)
The the singular instance of the interface in the DB by handle.