|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
21 singular_db<igmp_listen::key_t, igmp_listen> igmp_listen::m_db;
29 const boost::asio::ip::address_v4&
gaddr,
31 : m_igmp_bind(igmp_bind.singular())
39 const boost::asio::ip::address_v4&
gaddr)
40 : m_igmp_bind(igmp_bind.singular())
48 : m_igmp_bind(o.m_igmp_bind)
50 , m_saddrs(o.m_saddrs)
51 , m_listen(o.m_listen)
60 m_db.release(
key(),
this);
66 return ((m_gaddr == l.m_gaddr) && (*m_igmp_bind == *l.m_igmp_bind) &&
67 (m_saddrs == l.m_saddrs));
73 return (make_pair(m_igmp_bind->itf()->key(), m_gaddr));
81 m_listen, m_igmp_bind->itf()->handle(), m_gaddr));
91 m_listen, m_igmp_bind->itf()->handle(), m_gaddr, m_saddrs));
98 auto addr = m_saddrs.cbegin();
100 std::ostringstream s;
101 s <<
"igmp-listen:[" << m_igmp_bind->to_string() <<
" group:" << m_gaddr
103 while (
addr != m_saddrs.cend()) {
107 s <<
" ] " << m_listen.
to_string() <<
"]";
121 m_listen, m_igmp_bind->itf()->handle(), m_gaddr, m_saddrs));
125 std::shared_ptr<igmp_listen>
128 return (m_db.find_or_add(temp.key(), temp));
131 std::shared_ptr<igmp_listen>
134 return (m_db.find(k));
137 std::shared_ptr<igmp_listen>
140 return find_or_add(*
this);
156 igmp_listen::event_handler::handle_replay()
170 igmp_listen::event_handler::order()
const
static rc_t write()
Write/Execute all commands hitherto enqueued.
The VPP Object Model (VOM) library.
static void register_handler(const std::vector< std::string > &cmds, const std::string &help, command_handler *ch)
Register a command handler for inspection.
dependency_t
There needs to be a strict order in which object types are read from VPP (at boot time) and replayed ...
@ ENTRY
Entries in Tables.
A representation of igmp configuration on an interface.
void db_dump(const DB &db, std::ostream &os)
Print each of the objects in the DB into the stream provided.
A functor class that binds the igmp group to the interface.
A cmd class that Unbinds igmp group from an interface.
static bool register_listener(listener *listener)
Register a listener of events.
std::shared_ptr< igmp_listen > singular() const
Return the 'singular instance' of the IGMP that matches this object.
const typedef std::string key_t
In the opflex world each entity is known by a URI which can be converted into a string.
static void enqueue(cmd *f)
Enqueue A command for execution.
std::string to_string() const
convert to string format for debug purposes
static std::shared_ptr< igmp_listen > find(const key_t &k)
Find a listen from its key.
int igmp_listen(vlib_main_t *vm, igmp_filter_mode_t mode, u32 sw_if_index, const ip46_address_t *saddrs, const ip46_address_t *gaddr)
igmp listen Called by a host to request reception of multicast packets
static void dump(std::ostream &os)
Dump all igmp_listens into the stream provided.
igmp_listen(const igmp_binding &igmp_bind, const boost::asio::ip::address_v4 &gaddr, const src_addrs_t &saddrs)
Construct a new object matching the desried state.
vl_api_ip4_address_t saddrs[n_srcs]
std::set< boost::asio::ip::address_v4 > src_addrs_t
A representation of IGMP binding on an interface.
bool operator==(const igmp_listen &l) const
Comparison operator.
vl_api_ip4_address_t gaddr
std::string to_string() const
convert to string format for debug purposes
std::pair< interface::key_t, boost::asio::ip::address > key_t
The key type for igmp_listens.
~igmp_listen()
Destructor.
Error codes that VPP will return during a HW write.
const key_t key() const
Get the object's key.
void event_handler(void *tls_async)