SatCat5
satcat5::igmp::Client Class Referencefinal

Detailed Description

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.

See also
igmp_client.h, igmp::Address, igmp::Server.

Definition at line 103 of file igmp_client.h.

#include <igmp_client.h>

Inheritance diagram for satcat5::igmp::Client:
[legend]
Collaboration diagram for satcat5::igmp::Client:
[legend]

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::Addressfind_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::Addressm_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::Protocolm_next
 Linked list of Protocols.
 
unsigned m_trem
 
unsigned m_tnext
 

Member Function Documentation

◆ frame_rcvd()

void Client::frame_rcvd ( satcat5::io::LimitedRead src)
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:

  • Call m_iface->open_reply() to obtain a Writable object. (This also writes out any applicable frame headers.)
  • Write frame contents, then call write_finalize().

The child class MUST override this method.

Implements satcat5::net::Protocol.

Definition at line 112 of file igmp_client.cc.

◆ join()

void Client::join ( satcat5::igmp::Address obj,
const satcat5::ip::Addr addr 
)

Join a multicast group.

See also
igmp::Address::join.
Parameters
objEndpoint object to be modified.
addrMulticast 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.

◆ leave()

void Client::leave ( satcat5::igmp::Address obj)

Leave a multicast group.

See also
igmp::Address::leave. This method has no effect if SATCAT5_IGMP_ENABLE=0.

Definition at line 102 of file igmp_client.cc.


The documentation for this class was generated from the following files: