class igmp_binding : public object_base
{
public:
+ /**
+ * A binding is tied to a given interface, hence its key is
+ * that of the interface
+ */
+ typedef interface::key_t key_t;
+
/**
* Construct a new object matching the desried state
*/
*/
bool operator==(const igmp_binding& l) const;
+ /**
+ * Get the object's key
+ */
+ const key_t key() const;
+
/**
* Return the 'singular' of the IGMP binding that matches this object
*/
*/
static void dump(std::ostream& os);
+ /**
+ * Find a listen from its key
+ */
+ static std::shared_ptr<igmp_binding> find(const key_t& k);
+
private:
/**
* Class definition for listeners to OM events
/**
* It's the singular_db class that calls replay()
*/
- friend class singular_db<interface::key_t, igmp_binding>;
+ friend class singular_db<key_t, igmp_binding>;
/**
* Sweep/reap the object if still stale
/**
* A map of all IGMP bindings keyed against the interface.
*/
- static singular_db<interface::key_t, igmp_binding> m_db;
+ static singular_db<key_t, igmp_binding> m_db;
};
};