|
SatCat5
|
Host/Client for the Internet Group Management Protocol (IGMP).
This class implements the client ("host") side of IGMP. It sends messages when the local endpoint joins or leaves a group, and responds to group membership queries from the server ("querier"), which is usually an IGMP-capable IPv4 router.
This client supports IGMPv1, IGMPv2, and IGMPv3 queries, though SatCat5 endpoints do not currently support the source-address filtering features of IGMPv3.
Definition at line 103 of file igmp_client.h.
#include <igmp_client.h>
Public Member Functions | |
| Client (satcat5::ip::Dispatch *iface) | |
| Link this handler to an IPv4 network interface. | |
| void | join (satcat5::igmp::Address &obj, const satcat5::ip::Addr &addr) |
| Join a multicast group. More... | |
| void | leave (satcat5::igmp::Address &obj) |
| Leave a multicast group. More... | |
Protected Member Functions | |
| void | frame_rcvd (satcat5::io::LimitedRead &src) override |
| Dispatch calls frame_rcvd(...) for each incoming frame with with a matching net::Type value. More... | |
| void | timer_event () override |
| Child class MUST override this method. | |
| satcat5::igmp::Address * | find_match (const satcat5::ip::Addr &group) const |
| void | send_leave (const satcat5::ip::Addr &group) |
| void | send_report (const satcat5::ip::Addr &group) |
| void | set_timer (u32 &timer, u32 max_msec) |
| void | timer_once (unsigned msec) |
| Configure a one-time notification after X milliseconds. | |
| void | timer_every (unsigned msec) |
| Configure a repeating notification every X milliseconds. | |
| void | timer_stop () |
| Stop all future notifications. | |
| unsigned | timer_interval () const |
| Accessor for recurring timer interval, if one is set. | |
| unsigned | timer_remaining () const |
| Accessor for time to next event, if one is set. | |
Static Protected Member Functions | |
| static unsigned | count_timer () |
| Count all objects of this type, including idle timers. | |
Protected Attributes | |
| satcat5::ip::Dispatch *const | m_iface |
| satcat5::util::List< satcat5::igmp::Address > | m_groups |
| u32 | m_reply_timer |
| u8 | m_version |
| satcat5::net::Type | m_filter |
| Incoming packet filter. | |
Private Member Functions | |
| void | query (unsigned elapsed_msec) |
Private Attributes | |
| satcat5::net::Protocol * | m_next |
| Linked list of Protocols. | |
| unsigned | m_trem |
| unsigned | m_tnext |
|
overrideprotectedvirtual |
Dispatch calls frame_rcvd(...) for each incoming frame with with a matching net::Type value.
The child class SHOULD read the frame contents from the provided "src" object, which is only valid until the function returns.
To send a reply:
The child class MUST override this method.
Implements satcat5::net::Protocol.
Definition at line 112 of file igmp_client.cc.
| void Client::join | ( | satcat5::igmp::Address & | obj, |
| const satcat5::ip::Addr & | addr | ||
| ) |
Join a multicast group.
| obj | Endpoint object to be modified. |
| addr | Multicast address/group to be joined. The multicast address must be from the 224.0.0.0/48 block. This method has no effect if SATCAT5_IGMP_ENABLE=0. |
Definition at line 87 of file igmp_client.cc.
| void Client::leave | ( | satcat5::igmp::Address & | obj | ) |
Leave a multicast group.
Definition at line 102 of file igmp_client.cc.