25 singular_db<igmp_binding::key_t, igmp_binding> igmp_binding::m_db;
30 : m_itf(itf.singular())
37 , m_binding(o.m_binding)
44 m_db.release(
key(),
this);
50 return (*m_itf == *l.m_itf);
56 return (m_itf->key());
75 igmp_binding::replay()
86 s <<
"igmp-binding: [" << m_itf->to_string() <<
" mode:host]";
102 std::shared_ptr<igmp_binding>
105 return (m_db.find_or_add(temp.
key(), temp));
108 std::shared_ptr<igmp_binding>
111 return (m_db.find(k));
114 std::shared_ptr<igmp_binding>
117 return find_or_add(*
this);
120 std::shared_ptr<interface>
133 igmp_binding::event_handler::handle_replay()
145 igmp_binding::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.
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 representation of IGMP binding on an interface.
A command class that binds the IGMP config to the interface.
const key_t key() const
Get the object's key.
A representation of an interface in VPP.
~igmp_binding()
Destructor.
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 ...
static void enqueue(cmd *f)
Enqueue A command for execution.
A cmd class that Unbinds IGMP Config from an interface.
Then L2/objects that bind to interfaces, BD, ACLS, etc.
std::shared_ptr< igmp_binding > singular() const
Return the 'singular' of the IGMP binding that matches this object.
The VPP Object Model (VOM) library.
static void dump(std::ostream &os)
Dump all IGMP bindings into the stream provided.
interface::key_t key_t
A binding is tied to a given interface, hence its key is that of the interface.
igmp_binding(const interface &itf)
Construct a new object matching the desried state.
std::shared_ptr< interface > itf() const
Return the matching'singular' of the interface.
static std::shared_ptr< igmp_binding > find(const key_t &k)
Find a listen from its key.
bool operator==(const igmp_binding &l) const
Equal operator.
static bool register_listener(listener *listener)
Register a listener of events.