|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
28 singular_db<route::table_id_t, route_domain> route_domain::m_db;
43 , m_table_id(o.m_table_id)
50 return (m_table_id ==
r.m_table_id);
109 m_db.release(m_table_id,
this);
115 std::ostringstream s;
116 s <<
"route-domain:["
117 <<
"table-id:" << m_table_id <<
" v4:" << m_hw_v4.
to_string()
123 std::shared_ptr<route_domain>
126 return (m_db.find(k));
145 std::shared_ptr<route_domain>
150 return (find_or_add(rd));
153 std::shared_ptr<route_domain>
156 return (m_db.find_or_add(temp.m_table_id, temp));
159 std::shared_ptr<route_domain>
162 return find_or_add(*
this);
174 std::shared_ptr<route_domain_cmds::dump_cmd>
cmd =
175 std::make_shared<route_domain_cmds::dump_cmd>();
180 for (
auto& record : *
cmd) {
181 auto& payload = record.get_payload();
203 route_domain::event_handler::handle_replay()
209 route_domain::event_handler::order()
const
route::table_id_t table_id() const
Get the table ID.
static rc_t write()
Write/Execute all commands hitherto enqueued.
std::string to_string() const
Debug print function.
static rc_t commit(const client_db::key_t &key, const OBJ &obj)
Make the State in VPP reflect the expressed desired state.
bool operator==(const route_domain &r) const
comparison operator - for UT
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 ...
const static rc_t OK
The HW write was successfull.
const static l3_proto_t IPV4
key_t key() const
Get the route-domain's key.
vnet_hw_if_output_node_runtime_t * r
void db_dump(const DB &db, std::ostream &os)
Print each of the objects in the DB into the stream provided.
singular_db< const key_t, route_domain >::const_iterator const_iterator_t
The iterator type.
static bool register_listener(listener *listener)
Register a listener of events.
static std::shared_ptr< route_domain > get_default()
Return the sigular instance for the default table.
void replay(void)
replay the object to create it in hardware
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 enqueue(cmd *f)
Enqueue A command for execution.
std::string to_string() const
convert to string format for debug purposes
const static log_level_t DEBUG
@ TABLE
Tables in which entries are added, e.g bridge/route-domains.
A command class that creates the IP table.
rc_t rc() const
Get the HW return code.
A cmd class that Deletes the IP Table.
static const_iterator_t cbegin()
~route_domain()
Destructor.
route_domain(route::table_id_t id)
Construct a new object matching the desried state.
static const_iterator_t cend()
static void dump(std::ostream &os)
Dump all route-doamin into the stream provided.
std::shared_ptr< route_domain > singular() const
Return the matching 'singular instance'.
uint32_t table_id_t
type def the table-id
const static table_id_t DEFAULT_TABLE
The table-id for the default table.
void event_handler(void *tls_async)
A representation of a method call to VPP.
route::table_id_t key_t
The Key for a route-domain.
const static l3_proto_t IPV6
static std::shared_ptr< route_domain > find(const key_t &temp)
Find the instnace of the route domain in the OM.