24 singular_db<ip_punt_redirect::key_t, ip_punt_redirect> ip_punt_redirect::m_db;
31 : m_rx_itf(rx_itf.singular())
32 , m_tx_itf(tx_itf.singular())
38 : m_rx_itf(o.m_rx_itf)
39 , m_tx_itf(o.m_tx_itf)
41 , m_config(o.m_config)
50 m_db.release(m_rx_itf->key(),
this);
54 ip_punt_redirect::sweep()
58 m_config, m_rx_itf->handle(), m_tx_itf->handle(), m_addr));
70 ip_punt_redirect::replay()
74 m_config, m_rx_itf->handle(), m_tx_itf->handle(), m_addr));
82 s <<
"IP-punt-redirect-config:" 83 <<
" rx-itf:" << m_rx_itf->to_string()
84 <<
" tx-itf:" << m_tx_itf->to_string() <<
" next-hop:" << m_addr;
94 m_config, m_rx_itf->handle(), m_tx_itf->handle(), m_addr));
98 std::shared_ptr<ip_punt_redirect>
101 return (m_db.find_or_add(temp.m_rx_itf->key(), temp));
104 std::shared_ptr<ip_punt_redirect>
107 return find_or_add(*
this);
114 "IP punt redirect configurations",
this);
118 ip_punt_redirect::event_handler::handle_replay()
124 ip_punt_redirect::event_handler::handle_populate(
const client_db::key_t& key)
129 ip_punt_redirect::event_handler::order()
const std::string to_string() const
convert to string format for debug purposes
void db_dump(const DB &db, std::ostream &os)
Print each of the objects in the DB into the stream provided.
const 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 punt_redirect.
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.
A cmd class that Unconfigs Ip punt redirect.
static void dump(std::ostream &os)
Dump all ip_punt_redirects into the stream provided.
~ip_punt_redirect()
Destructor.
A representation of an interface in VPP.
void event_handler(void *tls_async)
dependency_t
There needs to be a strict order in which object types are read from VPP (at boot time) and replayed ...
std::shared_ptr< ip_punt_redirect > singular() const
Return the 'singular instance' of the ip_punt_redirect that matches this object.
static void enqueue(cmd *f)
Enqueue A command for execution.
ip_punt_redirect(const interface &rx_itf, const interface &tx_itf, const boost::asio::ip::address &addr)
Construct a new object matching the desried state.
Then L2/objects that bind to interfaces, BD, ACLS, etc.
The VPP Object Model (VOM) library.
A representation of IP punt_redirect configuration on an interface.
static bool register_listener(listener *listener)
Register a listener of events.