live
Public Member Functions | Data Fields | Static Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
Groupsock Class Reference

#include <Groupsock.hh>

Inheritance diagram for Groupsock:
Inheritance graph
[legend]
Collaboration diagram for Groupsock:
Collaboration graph
[legend]

Public Member Functions

 Groupsock (UsageEnvironment &env, struct sockaddr_storage const &groupAddr, Port port, u_int8_t ttl)
 
 Groupsock (UsageEnvironment &env, struct sockaddr_storage const &groupAddr, struct sockaddr_storage const &sourceFilterAddr, Port port)
 
virtual ~Groupsock ()
 
virtual destRecordcreateNewDestRecord (struct sockaddr_storage const &addr, Port const &port, u_int8_t ttl, unsigned sessionId, destRecord *next)
 
void changeDestinationParameters (struct sockaddr_storage const &newDestAddr, Port newDestPort, int newDestTTL, unsigned sessionId=0)
 
unsigned lookupSessionIdFromDestination (struct sockaddr_storage const &destAddrAndPort) const
 
virtual void addDestination (struct sockaddr_storage const &addr, Port const &port, unsigned sessionId)
 
virtual void removeDestination (unsigned sessionId)
 
void removeAllDestinations ()
 
Boolean hasMultipleDestinations () const
 
struct sockaddr_storage const & groupAddress () const
 
struct sockaddr_storage const & sourceFilterAddress () const
 
Boolean isSSM () const
 
u_int8_t ttl () const
 
void multicastSendOnly ()
 
virtual Boolean output (UsageEnvironment &env, unsigned char *buffer, unsigned bufferSize)
 
Boolean wasLoopedBackFromUs (UsageEnvironment &env, struct sockaddr_storage const &fromAddressAndPort)
 
virtual Boolean handleRead (unsigned char *buffer, unsigned bufferMaxSize, unsigned &bytesRead, struct sockaddr_storage &fromAddressAndPort)
 
virtual Boolean write (struct sockaddr_storage const &addressAndPort, u_int8_t ttl, unsigned char *buffer, unsigned bufferSize)
 
void reset ()
 
int socketNum () const
 
Port port () const
 
UsageEnvironmentenv () const
 

Data Fields

NetInterfaceTrafficStats statsGroupIncoming
 
NetInterfaceTrafficStats statsGroupOutgoing
 

Static Public Attributes

static NetInterfaceTrafficStats statsIncoming
 
static NetInterfaceTrafficStats statsOutgoing
 
static int DebugLevel
 
static UsageEnvironmentDefaultUsageEnvironment
 

Protected Member Functions

destRecordlookupDestRecordFromDestination (struct sockaddr_storage const &targetAddrAndPort) const
 
portNumBits sourcePortNum () const
 
Boolean changePort (Port newPort)
 

Protected Attributes

destRecordfDests
 

Private Member Functions

void removeDestinationFrom (destRecord *&dests, unsigned sessionId)
 

Private Attributes

GroupEId fIncomingGroupEId
 
Port fSourcePort
 
unsigned fLastSentTTL
 
int fSocketNum
 
UsageEnvironmentfEnv
 
Port fPort
 
int fFamily
 

Detailed Description

Definition at line 78 of file Groupsock.hh.

Constructor & Destructor Documentation

◆ Groupsock() [1/2]

Groupsock::Groupsock ( UsageEnvironment env,
struct sockaddr_storage const &  groupAddr,
Port  port,
u_int8_t  ttl 
)

◆ Groupsock() [2/2]

Groupsock::Groupsock ( UsageEnvironment env,
struct sockaddr_storage const &  groupAddr,
struct sockaddr_storage const &  sourceFilterAddr,
Port  port 
)

◆ ~Groupsock()

virtual Groupsock::~Groupsock ( )
virtual

Member Function Documentation

◆ addDestination()

virtual void Groupsock::addDestination ( struct sockaddr_storage const &  addr,
Port const &  port,
unsigned  sessionId 
)
virtual

◆ changeDestinationParameters()

void Groupsock::changeDestinationParameters ( struct sockaddr_storage const &  newDestAddr,
Port  newDestPort,
int  newDestTTL,
unsigned  sessionId = 0 
)

◆ changePort()

Boolean Socket::changePort ( Port  newPort)
protectedinherited

◆ createNewDestRecord()

virtual destRecord * Groupsock::createNewDestRecord ( struct sockaddr_storage const &  addr,
Port const &  port,
u_int8_t  ttl,
unsigned  sessionId,
destRecord next 
)
virtual

◆ env()

UsageEnvironment & Socket::env ( ) const
inlineinherited

Definition at line 55 of file NetInterface.hh.

55{ return fEnv; }
UsageEnvironment & fEnv
Definition: NetInterface.hh:66

References Socket::fEnv.

◆ groupAddress()

struct sockaddr_storage const & Groupsock::groupAddress ( ) const
inline

Definition at line 114 of file Groupsock.hh.

114 {
116 }
struct sockaddr_storage const & groupAddress() const
Definition: GroupEId.hh:43
GroupEId fIncomingGroupEId
Definition: Groupsock.hh:153

References fIncomingGroupEId, and GroupEId::groupAddress().

◆ handleRead()

virtual Boolean Groupsock::handleRead ( unsigned char *  buffer,
unsigned  bufferMaxSize,
unsigned &  bytesRead,
struct sockaddr_storage &  fromAddressAndPort 
)
virtual

Reimplemented from OutputSocket.

◆ hasMultipleDestinations()

Boolean Groupsock::hasMultipleDestinations ( ) const
inline

Definition at line 112 of file Groupsock.hh.

112{ return fDests != NULL && fDests->fNext != NULL; }
#define NULL
destRecord * fDests
Definition: Groupsock.hh:151
destRecord * fNext
Definition: Groupsock.hh:69

References fDests, destRecord::fNext, and NULL.

◆ isSSM()

Boolean Groupsock::isSSM ( ) const
inline

Definition at line 121 of file Groupsock.hh.

121 {
122 return fIncomingGroupEId.isSSM();
123 }
Boolean isSSM() const

References fIncomingGroupEId, and GroupEId::isSSM().

◆ lookupDestRecordFromDestination()

destRecord * Groupsock::lookupDestRecordFromDestination ( struct sockaddr_storage const &  targetAddrAndPort) const
protected

◆ lookupSessionIdFromDestination()

unsigned Groupsock::lookupSessionIdFromDestination ( struct sockaddr_storage const &  destAddrAndPort) const

◆ multicastSendOnly()

void Groupsock::multicastSendOnly ( )

◆ output()

virtual Boolean Groupsock::output ( UsageEnvironment env,
unsigned char *  buffer,
unsigned  bufferSize 
)
virtual

◆ port()

Port Socket::port ( ) const
inlineinherited

Definition at line 51 of file NetInterface.hh.

51 {
52 return fPort;
53 }
Port fPort
Definition: NetInterface.hh:67

References Socket::fPort.

◆ removeAllDestinations()

void Groupsock::removeAllDestinations ( )

◆ removeDestination()

virtual void Groupsock::removeDestination ( unsigned  sessionId)
virtual

◆ removeDestinationFrom()

void Groupsock::removeDestinationFrom ( destRecord *&  dests,
unsigned  sessionId 
)
private

◆ reset()

void Socket::reset ( )
inherited

◆ socketNum()

int Socket::socketNum ( ) const
inlineinherited

Definition at line 49 of file NetInterface.hh.

49{ return fSocketNum; }
int fSocketNum
Definition: NetInterface.hh:65

References Socket::fSocketNum.

◆ sourceFilterAddress()

struct sockaddr_storage const & Groupsock::sourceFilterAddress ( ) const
inline

Definition at line 117 of file Groupsock.hh.

117 {
119 }
struct sockaddr_storage const & sourceFilterAddress() const
Definition: GroupEId.hh:44

References fIncomingGroupEId, and GroupEId::sourceFilterAddress().

◆ sourcePortNum()

portNumBits OutputSocket::sourcePortNum ( ) const
inlineprotectedinherited

Definition at line 50 of file Groupsock.hh.

50{return fSourcePort.num();}
Port fSourcePort
Definition: Groupsock.hh:58
portNumBits num() const
Definition: NetAddress.hh:108

References OutputSocket::fSourcePort, and Port::num().

◆ ttl()

u_int8_t Groupsock::ttl ( ) const
inline

Definition at line 125 of file Groupsock.hh.

125{ return fIncomingGroupEId.ttl(); }
u_int8_t ttl() const
Definition: GroupEId.hh:50

References fIncomingGroupEId, and GroupEId::ttl().

◆ wasLoopedBackFromUs()

Boolean Groupsock::wasLoopedBackFromUs ( UsageEnvironment env,
struct sockaddr_storage const &  fromAddressAndPort 
)

◆ write()

virtual Boolean OutputSocket::write ( struct sockaddr_storage const &  addressAndPort,
u_int8_t  ttl,
unsigned char *  buffer,
unsigned  bufferSize 
)
virtualinherited

Field Documentation

◆ DebugLevel

int Socket::DebugLevel
staticinherited

Definition at line 57 of file NetInterface.hh.

◆ DefaultUsageEnvironment

UsageEnvironment* NetInterface::DefaultUsageEnvironment
staticinherited

Definition at line 32 of file NetInterface.hh.

◆ fDests

destRecord* Groupsock::fDests
protected

Definition at line 151 of file Groupsock.hh.

Referenced by hasMultipleDestinations().

◆ fEnv

UsageEnvironment& Socket::fEnv
privateinherited

Definition at line 66 of file NetInterface.hh.

Referenced by Socket::env().

◆ fFamily

int Socket::fFamily
privateinherited

Definition at line 68 of file NetInterface.hh.

◆ fIncomingGroupEId

GroupEId Groupsock::fIncomingGroupEId
private

Definition at line 153 of file Groupsock.hh.

Referenced by groupAddress(), isSSM(), sourceFilterAddress(), and ttl().

◆ fLastSentTTL

unsigned OutputSocket::fLastSentTTL
privateinherited

Definition at line 59 of file Groupsock.hh.

◆ fPort

Port Socket::fPort
privateinherited

Definition at line 67 of file NetInterface.hh.

Referenced by Socket::port().

◆ fSocketNum

int Socket::fSocketNum
privateinherited

Definition at line 65 of file NetInterface.hh.

Referenced by Socket::socketNum().

◆ fSourcePort

Port OutputSocket::fSourcePort
privateinherited

Definition at line 58 of file Groupsock.hh.

Referenced by OutputSocket::sourcePortNum().

◆ statsGroupIncoming

NetInterfaceTrafficStats Groupsock::statsGroupIncoming

Definition at line 133 of file Groupsock.hh.

◆ statsGroupOutgoing

NetInterfaceTrafficStats Groupsock::statsGroupOutgoing

Definition at line 134 of file Groupsock.hh.

◆ statsIncoming

NetInterfaceTrafficStats Groupsock::statsIncoming
static

Definition at line 131 of file Groupsock.hh.

◆ statsOutgoing

NetInterfaceTrafficStats Groupsock::statsOutgoing
static

Definition at line 132 of file Groupsock.hh.


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