senf::INet6MulticastSocketProtocol Class Reference

Multicast protocol facet for INet6 addressable multicast enabled sockets. More...

#include <senf/Socket/Protocols/INet/MulticastSocketProtocol.hh>

Inheritance diagram for senf::INet6MulticastSocketProtocol:

Public Member Functions

void mcAddMembership (INet6Address const &mcAddr) const
 Join multicast group on default interface. More...
 
void mcAddMembership (INet6Address const &mcAddr, std::string const &iface) const
 join multicast group on a specific interface More...
 
void mcDropMembership (INet6Address const &mcAddr) const
 Leave multicast group. More...
 
void mcDropMembership (INet6Address const &mcAddr, std::string const &iface) const
 leave multicast group on a specific interface More...
 
void mcJoinSSMSource (INet6Address const &group, INet6Address const &source, std::string const &iface) const
 join SSM multicast group More...
 
void mcJoinSSMSource (INet6Address const &group, INet6Address const &source, int ifacei=0) const
 join SSM multicast group More...
 
void mcLeaveSSMSource (INet6Address const &group, INet6Address const &source, std::string const &iface) const
 leave SSM multicast group More...
 
- Public Member Functions inherited from senf::MulticastSocketProtocol
void broadcastEnabled (bool v) const
 Enable broadcast send/receive. More...
 
bool broadcastEnabled () const
 Get broadcast send/receive state. More...
 
unsigned mcTTL () const
 Return current multicast TTL. More...
 
void mcTTL (unsigned value) const
 Set multicast TTL. More...
 
bool mcLoop () const
 Return current multicast loopback state. More...
 
void mcLoop (bool value) const
 Set multicast loopback state. More...
 
void mcIface (std::string const &iface=std::string()) const
 Set multicast send interface of the socket. More...
 
- Public Member Functions inherited from senf::SocketProtocol
virtual SocketPolicyBase const & policy () const =0
 Access the policy instance. More...
 
virtual unsigned available () const =0
 Return (maximum) number of bytes available for reading without < blocking. More...
 
virtual bool eof () const =0
 Check for end-of-file condition. More...
 
virtual void close ()
 Close socket. More...
 
virtual void terminate () const
 Forcibly close socket. More...
 
virtual void state (SocketStateMap &map, unsigned lod) const
 Return socket state information. More...
 
int fd () const
 Get file descriptor. More...
 
 SocketProtocol ()
 
virtual ~SocketProtocol ()=0
 

Additional Inherited Members

- Protected Member Functions inherited from senf::SocketProtocol
FileHandle fh () const
 Get a FileHandle for this instance. More...
 
void fd (int) const
 Initialize file descriptor. More...
 

Detailed Description

Multicast protocol facet for INet6 addressable multicast enabled sockets.

This implementation supports INet6 mapped INet4 multicast addresses. This is a linux specific extension and NOT part of the relevant RFCs.

Definition at line 153 of file MulticastSocketProtocol.hh.

Member Function Documentation

◆ mcAddMembership() [1/2]

void senf::INet6MulticastSocketProtocol::mcAddMembership ( INet6Address const &  mcAddr) const

Join multicast group on default interface.

This member will add mcAddr to the list of multicast groups received. The group is joined on the default interface.

Parameters
[in]mcAddraddress of group to join

Definition at line 214 of file MulticastSocketProtocol.cc.

◆ mcAddMembership() [2/2]

void senf::INet6MulticastSocketProtocol::mcAddMembership ( INet6Address const &  mcAddr,
std::string const &  iface 
) const

join multicast group on a specific interface

This member will add mcAddr to the list of multicast groups received. The group is joined on the given interface.

Parameters
[in]mcAddraddress of group to join
[in]ifaceinterface name

Definition at line 234 of file MulticastSocketProtocol.cc.

◆ mcDropMembership() [1/2]

void senf::INet6MulticastSocketProtocol::mcDropMembership ( INet6Address const &  mcAddr) const

Leave multicast group.

This member will remove mcAddr from the list of multicast groups received. The group is left from the default interface.

Parameters
[in]mcAddraddress of group to leave

Definition at line 259 of file MulticastSocketProtocol.cc.

◆ mcDropMembership() [2/2]

void senf::INet6MulticastSocketProtocol::mcDropMembership ( INet6Address const &  mcAddr,
std::string const &  iface 
) const

leave multicast group on a specific interface

This member will remove mcAddr from the list of multicast groups received. The group is left from the interface with the given local address.

Parameters
[in]mcAddraddress of group to leave
[in]ifaceinterface name

Definition at line 280 of file MulticastSocketProtocol.cc.

◆ mcJoinSSMSource() [1/2]

void senf::INet6MulticastSocketProtocol::mcJoinSSMSource ( INet6Address const &  group,
INet6Address const &  source,
std::string const &  iface 
) const

join SSM multicast group

This call will join the multicast group group for traffic from source. A single group may be joined multiple times on different sources.

Parameters
[in]groupmulticast group to join
[in]sourceSSM multicast source to join the group on
[in]ifaceinterface to join the group on. If set to the empty string, use the default interface.

Definition at line 337 of file MulticastSocketProtocol.cc.

◆ mcJoinSSMSource() [2/2]

void senf::INet6MulticastSocketProtocol::mcJoinSSMSource ( INet6Address const &  group,
INet6Address const &  source,
int  ifacei = 0 
) const

join SSM multicast group

This call will join the multicast group group for traffic from source. A single group may be joined multiple times on different sources.

Parameters
[in]groupmulticast group to join
[in]sourceSSM multicast source to join the group on
[in]ifaceioptional interface index to join the group on

Definition at line 345 of file MulticastSocketProtocol.cc.

◆ mcLeaveSSMSource()

void senf::INet6MulticastSocketProtocol::mcLeaveSSMSource ( INet6Address const &  group,
INet6Address const &  source,
std::string const &  iface 
) const

leave SSM multicast group

This call will leave the multicast group group for traffic from source.

Parameters
[in]groupmulticast group to leave
[in]sourceSSM multicast source to leave the group from
[in]ifaceinterface to leave the group on

Definition at line 353 of file MulticastSocketProtocol.cc.


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