|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
22 namespace igmp_listen_cmds {
25 const boost::asio::ip::address_v4&
gaddr,
37 return ((m_itf == other.m_itf) && (m_gaddr == other.m_gaddr) &&
38 (m_saddrs == other.m_saddrs));
45 msg_t req(
con.ctx(),
sizeof(vapi_type_ip4_address) *
size, std::ref(*
this));
47 auto& payload = req.get_request().get_payload();
48 payload.group.sw_if_index = m_itf.
value();
49 to_api(m_gaddr, payload.group.gaddr);
54 payload.group.n_srcs = 0;
60 for (
auto addr : m_saddrs) {
64 payload.group.n_srcs =
i;
75 auto addr = m_saddrs.cbegin();
78 <<
" group:" << m_gaddr <<
" src-addrs:[";
79 while (
addr != m_saddrs.cend()) {
89 const boost::asio::ip::address_v4&
gaddr)
99 return ((m_itf == other.m_itf) && (m_gaddr == other.m_gaddr));
105 msg_t req(
con.ctx(), 0, std::ref(*
this));
107 auto& payload = req.get_request().get_payload();
108 payload.group.sw_if_index = m_itf.
value();
109 payload.group.n_srcs = 0;
110 payload.group.filter =
INCLUDE;
111 to_api(m_gaddr, payload.group.gaddr);
124 std::ostringstream s;
126 <<
" itf:" << m_itf.
to_string() <<
" group:" << m_gaddr;
152 auto& payload =
m_dump->get_request().get_payload();
153 payload.sw_if_index = m_itf.
value();
165 return (
"igmp-listen-dump");
rc_t wait()
Wait on the commands promise.
void set(const rc_t &rc)
Set the HW return code - should only be called from the family of Command objects.
The VPP Object Model (VOM) library.
const static rc_t OK
The HW write was successfull.
unlisten_cmd(HW::item< bool > &item, const handle_t &itf, const boost::asio::ip::address_v4 &gaddr)
Constructor.
std::string to_string() const
convert to string format for debug purposes
uint32_t value() const
get the value of the handle
A base class for all RPC commands to VPP.
HW::item< bool > & m_hw_item
A reference to an object's HW::item that the command will update.
std::unique_ptr< vapi::Igmp_dump > m_dump
The VAPI event registration.
std::string to_string() const
convert to string format for debug purposes
bool operator==(const dump_cmd &i) const
Comparison operator - only used for UT.
A functor class that binds the igmp group to the interface.
A cmd class that Dumps all the igmp configs.
rc_t issue(connection &con)
Issue the command to VPP/HW.
A cmd class that Unbinds igmp group from an interface.
DEFINE_VAPI_MSG_IDS_IGMP_API_JSON
#define VAPI_CALL(_stmt)
Convenince wrapper macro for error handling in VAPI sends.
A representation of the connection to VPP.
bool operator==(const unlisten_cmd &i) const
Comparison operator - only used for UT.
rc_t wait()
Wait for the issue of the command to complete.
const static rc_t NOOP
The HW write/update action was/has not been attempted.
sll srl srl sll sra u16x4 i
bool operator==(const listen_cmd &i) const
Comparison operator - only used for UT.
A type declaration of an interface handle in VPP.
std::string to_string() const
convert to string format for debug purposes
vapi_enum_ip_neighbor_flags to_api(const neighbour::flags_t &f)
vapi::Igmp_listen msg_t
convenient typedef
std::string to_string() const
convert to string format for debug purposes
vl_api_ip4_address_t saddrs[n_srcs]
std::set< boost::asio::ip::address_v4 > src_addrs_t
vl_api_ip4_address_t gaddr
rc_t issue(connection &con)
Issue the command to VPP/HW.
rc_t issue(connection &con)
Issue the command to VPP/HW.
dump_cmd()
Default Constructor.
listen_cmd(HW::item< bool > &item, const handle_t &itf, const boost::asio::ip::address_v4 &gaddr, const igmp_listen::src_addrs_t &saddrs)
Constructor.
Error codes that VPP will return during a HW write.
std::string to_string() const
convert to string format for debug purposes