X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=extras%2Fvom%2Fvom%2Figmp_binding.hpp;h=56af8d1117e514c981d149ff0204eeeb8c974fc2;hb=66b48a9c6155a2c088f0f45fc568c846edb4b1af;hp=e2726cd0e20db410315defcf34ede69e52bbdf21;hpb=f49ba0e81e0cb9b9f8075cb4ce051b5bacde8ad3;p=vpp.git diff --git a/extras/vom/vom/igmp_binding.hpp b/extras/vom/vom/igmp_binding.hpp index e2726cd0e20..56af8d1117e 100644 --- a/extras/vom/vom/igmp_binding.hpp +++ b/extras/vom/vom/igmp_binding.hpp @@ -30,6 +30,12 @@ namespace VOM { 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 */ @@ -50,6 +56,11 @@ public: */ 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 */ @@ -70,6 +81,11 @@ public: */ static void dump(std::ostream& os); + /** + * Find a listen from its key + */ + static std::shared_ptr find(const key_t& k); + private: /** * Class definition for listeners to OM events @@ -124,7 +140,7 @@ private: /** * It's the singular_db class that calls replay() */ - friend class singular_db; + friend class singular_db; /** * Sweep/reap the object if still stale @@ -152,7 +168,7 @@ private: /** * A map of all IGMP bindings keyed against the interface. */ - static singular_db m_db; + static singular_db m_db; }; };