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);
97 m_db.release(m_table_id,
this);
103 std::ostringstream s;
104 s <<
"route-domain:[" 105 <<
"table-id:" << m_table_id <<
" v4:" << m_hw_v4.
to_string()
111 std::shared_ptr<route_domain>
114 return (m_db.find(k));
133 std::shared_ptr<route_domain>
138 return (find_or_add(rd));
141 std::shared_ptr<route_domain>
144 return (m_db.find_or_add(temp.m_table_id, temp));
147 std::shared_ptr<route_domain>
150 return find_or_add(*
this);
171 route_domain::event_handler::handle_replay()
177 route_domain::event_handler::order()
const bool operator==(const route_domain &r) const
comparison operator - for UT
uint32_t table_id_t
type def the table-id
static std::shared_ptr< route_domain > find(const key_t &temp)
Find the instnace of the route domain in the OM.
route::table_id_t table_id() const
Get the table ID.
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
Debug print function.
const std::string key_t
In the opflex world each entity is known by a URI which can be converted into a string.
static void register_handler(const std::vector< std::string > &cmds, const std::string &help, command_handler *ch)
Register a command handler for inspection.
static rc_t write()
Write/Execute all commands hitherto enqueued.
rc_t rc() const
Get the HW return code.
std::string to_string() const
convert to string format for debug purposes
key_t key() const
Get the route-domain's key.
static const l3_proto_t IPV4
static const l3_proto_t IPV6
static const table_id_t DEFAULT_TABLE
The table-id for the default table.
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
A command class that creates the IP table.
Tables in which entries are added, e.g bridge/route-domains.
void event_handler(void *tls_async)
A cmd class that Deletes the IP Table.
dependency_t
There needs to be a strict order in which object types are read from VPP (at boot time) and replayed ...
static const rc_t OK
The HW write was successfull.
static void enqueue(cmd *f)
Enqueue A command for execution.
route_domain(route::table_id_t id)
Construct a new object matching the desried state.
The VPP Object Model (VOM) library.
std::shared_ptr< route_domain > singular() const
Return the matching 'singular instance'.
~route_domain()
Destructor.
static void dump(std::ostream &os)
Dump all route-doamin into the stream provided.
static bool register_listener(listener *listener)
Register a listener of events.
route::table_id_t key_t
The Key for a route-domain.