senf::INet4MulticastSocketProtocol Class Reference

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

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

Inheritance diagram for senf::INet4MulticastSocketProtocol:

Public Member Functions

void mcAddMembership (INet4Address const &mcAddr) const
 Join multicast group on default interface. More...
 
void mcAddMembership (INet4Address const &mcAddr, INet4Address const &localAddr) const
 join multicast group on a specific interface More...
 
void mcAddMembership (INet4Address const &mcAddr, std::string const &iface) const
 join multicast group on a specific interface More...
 
void mcDropMembership (INet4Address const &mcAddr) const
 Leave multicast group. More...
 
void mcDropMembership (INet4Address const &mcAddr, INet4Address const &localAddr) const
 leave multicast group on a specific interface More...
 
void mcDropMembership (INet4Address const &mcAddr, std::string const &iface) const
 leave multicast group on a specific interface More...
 
void mcJoinSSMSource (INet4Address const &group, INet4Address const &source, std::string const &iface) const
 join SSM multicast group More...
 
void mcLeaveSSMSource (INet4Address const &group, INet4Address 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 INet4 addressable multicast enabled sockets.

Definition at line 74 of file MulticastSocketProtocol.hh.

Member Function Documentation

◆ mcAddMembership() [1/3]

void senf::INet4MulticastSocketProtocol::mcAddMembership ( INet4Address 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 103 of file MulticastSocketProtocol.cc.

◆ mcAddMembership() [2/3]

void senf::INet4MulticastSocketProtocol::mcAddMembership ( INet4Address const &  mcAddr,
INet4Address const &  localAddr 
) 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 interface with the given local address.

Deprecated:
Use mcAddMembership( mcAddr , iface ) for compatibility with the IPv6 API.
Parameters
[in]mcAddraddress of group to join
[in]localAddraddress of interface to join on

Definition at line 114 of file MulticastSocketProtocol.cc.

◆ mcAddMembership() [3/3]

void senf::INet4MulticastSocketProtocol::mcAddMembership ( INet4Address 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 126 of file MulticastSocketProtocol.cc.

◆ mcDropMembership() [1/3]

void senf::INet4MulticastSocketProtocol::mcDropMembership ( INet4Address 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 140 of file MulticastSocketProtocol.cc.

◆ mcDropMembership() [2/3]

void senf::INet4MulticastSocketProtocol::mcDropMembership ( INet4Address const &  mcAddr,
INet4Address const &  localAddr 
) 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.

Deprecated:
Use mcDropMembership( mcAddr , iface ) for compatibility with the IPv6 API.
Parameters
[in]mcAddraddress of group to leave
[in]localAddraddress of interface to leave from

Definition at line 151 of file MulticastSocketProtocol.cc.

◆ mcDropMembership() [3/3]

void senf::INet4MulticastSocketProtocol::mcDropMembership ( INet4Address 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 163 of file MulticastSocketProtocol.cc.

◆ mcJoinSSMSource()

void senf::INet4MulticastSocketProtocol::mcJoinSSMSource ( INet4Address const &  group,
INet4Address 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

Definition at line 195 of file MulticastSocketProtocol.cc.

◆ mcLeaveSSMSource()

void senf::INet4MulticastSocketProtocol::mcLeaveSSMSource ( INet4Address const &  group,
INet4Address 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 203 of file MulticastSocketProtocol.cc.


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