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 in_addr const &groupAddr, Port port, u_int8_t ttl)
 
 Groupsock (UsageEnvironment &env, struct in_addr const &groupAddr, struct in_addr const &sourceFilterAddr, Port port)
 
virtual ~Groupsock ()
 
virtual destRecordcreateNewDestRecord (struct in_addr const &addr, Port const &port, u_int8_t ttl, unsigned sessionId, destRecord *next)
 
void changeDestinationParameters (struct in_addr const &newDestAddr, Port newDestPort, int newDestTTL, unsigned sessionId=0)
 
unsigned lookupSessionIdFromDestination (struct sockaddr_in const &destAddrAndPort) const
 
virtual void addDestination (struct in_addr const &addr, Port const &port, unsigned sessionId)
 
virtual void removeDestination (unsigned sessionId)
 
void removeAllDestinations ()
 
Boolean hasMultipleDestinations () const
 
struct in_addr const & groupAddress () const
 
struct in_addr const & sourceFilterAddress () const
 
Boolean isSSM () const
 
u_int8_t ttl () const
 
void multicastSendOnly ()
 
virtual Boolean output (UsageEnvironment &env, unsigned char *buffer, unsigned bufferSize, DirectedNetInterface *interfaceNotToFwdBackTo=NULL)
 
DirectedNetInterfaceSetmembers ()
 
Boolean wasLoopedBackFromUs (UsageEnvironment &env, struct sockaddr_in &fromAddressAndPort)
 
virtual Boolean handleRead (unsigned char *buffer, unsigned bufferMaxSize, unsigned &bytesRead, struct sockaddr_in &fromAddressAndPort)
 
virtual Boolean write (netAddressBits address, portNumBits portNum, u_int8_t ttl, unsigned char *buffer, unsigned bufferSize)
 
Boolean write (struct sockaddr_in &addressAndPort, u_int8_t ttl, unsigned char *buffer, unsigned bufferSize)
 
void reset ()
 
int socketNum () const
 
Port port () const
 
UsageEnvironmentenv () const
 

Data Fields

Boolean deleteIfNoMembers
 
Boolean isSlave
 
NetInterfaceTrafficStats statsGroupIncoming
 
NetInterfaceTrafficStats statsGroupOutgoing
 
NetInterfaceTrafficStats statsGroupRelayedIncoming
 
NetInterfaceTrafficStats statsGroupRelayedOutgoing
 

Static Public Attributes

static NetInterfaceTrafficStats statsIncoming
 
static NetInterfaceTrafficStats statsOutgoing
 
static NetInterfaceTrafficStats statsRelayedIncoming
 
static NetInterfaceTrafficStats statsRelayedOutgoing
 
static int DebugLevel
 
static UsageEnvironmentDefaultUsageEnvironment
 

Protected Member Functions

destRecordlookupDestRecordFromDestination (struct sockaddr_in const &destAddrAndPort) const
 
portNumBits sourcePortNum () const
 
Boolean changePort (Port newPort)
 

Protected Attributes

destRecordfDests
 

Private Member Functions

void removeDestinationFrom (destRecord *&dests, unsigned sessionId)
 
int outputToAllMembersExcept (DirectedNetInterface *exceptInterface, u_int8_t ttlToFwd, unsigned char *data, unsigned size, netAddressBits sourceAddr)
 

Private Attributes

GroupEId fIncomingGroupEId
 
DirectedNetInterfaceSet fMembers
 

Detailed Description

Definition at line 82 of file Groupsock.hh.

Constructor & Destructor Documentation

Groupsock::Groupsock ( UsageEnvironment env,
struct in_addr const &  groupAddr,
Port  port,
u_int8_t  ttl 
)
Groupsock::Groupsock ( UsageEnvironment env,
struct in_addr const &  groupAddr,
struct in_addr const &  sourceFilterAddr,
Port  port 
)
virtual Groupsock::~Groupsock ( )
virtual

Member Function Documentation

virtual void Groupsock::addDestination ( struct in_addr const &  addr,
Port const &  port,
unsigned  sessionId 
)
virtual
void Groupsock::changeDestinationParameters ( struct in_addr const &  newDestAddr,
Port  newDestPort,
int  newDestTTL,
unsigned  sessionId = 0 
)
Boolean Socket::changePort ( Port  newPort)
protectedinherited
virtual destRecord* Groupsock::createNewDestRecord ( struct in_addr const &  addr,
Port const &  port,
u_int8_t  ttl,
unsigned  sessionId,
destRecord next 
)
virtual
UsageEnvironment& Socket::env ( ) const
inlineinherited

Definition at line 96 of file NetInterface.hh.

References Socket::fEnv.

96 { return fEnv; }
UsageEnvironment & fEnv
struct in_addr const& Groupsock::groupAddress ( ) const
inline

Definition at line 116 of file Groupsock.hh.

References fIncomingGroupEId, and GroupEId::groupAddress().

116  {
118  }
GroupEId fIncomingGroupEId
Definition: Groupsock.hh:169
struct in_addr const & groupAddress() const
Definition: GroupEId.hh:42
virtual Boolean Groupsock::handleRead ( unsigned char *  buffer,
unsigned  bufferMaxSize,
unsigned &  bytesRead,
struct sockaddr_in &  fromAddressAndPort 
)
virtual

Reimplemented from OutputSocket.

Boolean Groupsock::hasMultipleDestinations ( ) const
inline

Definition at line 114 of file Groupsock.hh.

References fDests, destRecord::fNext, and NULL.

114 { return fDests != NULL && fDests->fNext != NULL; }
#define NULL
destRecord * fNext
Definition: Groupsock.hh:73
destRecord * fDests
Definition: Groupsock.hh:167
Boolean Groupsock::isSSM ( ) const
inline

Definition at line 123 of file Groupsock.hh.

References fIncomingGroupEId, and GroupEId::isSSM().

123  {
124  return fIncomingGroupEId.isSSM();
125  }
GroupEId fIncomingGroupEId
Definition: Groupsock.hh:169
Boolean isSSM() const
destRecord* Groupsock::lookupDestRecordFromDestination ( struct sockaddr_in const &  destAddrAndPort) const
protected
unsigned Groupsock::lookupSessionIdFromDestination ( struct sockaddr_in const &  destAddrAndPort) const
DirectedNetInterfaceSet& Groupsock::members ( )
inline

Definition at line 134 of file Groupsock.hh.

References fMembers.

134 { return fMembers; }
DirectedNetInterfaceSet fMembers
Definition: Groupsock.hh:170
void Groupsock::multicastSendOnly ( )
virtual Boolean Groupsock::output ( UsageEnvironment env,
unsigned char *  buffer,
unsigned  bufferSize,
DirectedNetInterface interfaceNotToFwdBackTo = NULL 
)
virtual
int Groupsock::outputToAllMembersExcept ( DirectedNetInterface exceptInterface,
u_int8_t  ttlToFwd,
unsigned char *  data,
unsigned  size,
netAddressBits  sourceAddr 
)
private
Port Socket::port ( ) const
inlineinherited

Definition at line 92 of file NetInterface.hh.

References Socket::fPort.

92  {
93  return fPort;
94  }
Port fPort
void Groupsock::removeAllDestinations ( )
virtual void Groupsock::removeDestination ( unsigned  sessionId)
virtual
void Groupsock::removeDestinationFrom ( destRecord *&  dests,
unsigned  sessionId 
)
private
void Socket::reset ( )
inherited
int Socket::socketNum ( ) const
inlineinherited

Definition at line 90 of file NetInterface.hh.

References Socket::fSocketNum.

90 { return fSocketNum; }
int fSocketNum
struct in_addr const& Groupsock::sourceFilterAddress ( ) const
inline

Definition at line 119 of file Groupsock.hh.

References fIncomingGroupEId, and GroupEId::sourceFilterAddress().

119  {
121  }
GroupEId fIncomingGroupEId
Definition: Groupsock.hh:169
struct in_addr const & sourceFilterAddress() const
Definition: GroupEId.hh:43
portNumBits OutputSocket::sourcePortNum ( ) const
inlineprotectedinherited

Definition at line 54 of file Groupsock.hh.

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

54 {return fSourcePort.num();}
Port fSourcePort
Definition: Groupsock.hh:62
portNumBits num() const
Definition: NetAddress.hh:98
u_int8_t Groupsock::ttl ( ) const
inline

Definition at line 127 of file Groupsock.hh.

References fIncomingGroupEId, and GroupEId::ttl().

127 { return fIncomingGroupEId.ttl(); }
GroupEId fIncomingGroupEId
Definition: Groupsock.hh:169
u_int8_t ttl() const
Definition: GroupEId.hh:49
Boolean Groupsock::wasLoopedBackFromUs ( UsageEnvironment env,
struct sockaddr_in &  fromAddressAndPort 
)
virtual Boolean OutputSocket::write ( netAddressBits  address,
portNumBits  portNum,
u_int8_t  ttl,
unsigned char *  buffer,
unsigned  bufferSize 
)
virtualinherited

Referenced by OutputSocket::write().

Boolean OutputSocket::write ( struct sockaddr_in &  addressAndPort,
u_int8_t  ttl,
unsigned char *  buffer,
unsigned  bufferSize 
)
inlineinherited

Definition at line 46 of file Groupsock.hh.

References OutputSocket::write().

47  {
48  return write(addressAndPort.sin_addr.s_addr, addressAndPort.sin_port, ttl, buffer, bufferSize);
49  }
virtual Boolean write(netAddressBits address, portNumBits portNum, u_int8_t ttl, unsigned char *buffer, unsigned bufferSize)

Field Documentation

int Socket::DebugLevel
staticinherited

Definition at line 98 of file NetInterface.hh.

UsageEnvironment* NetInterface::DefaultUsageEnvironment
staticinherited

Definition at line 32 of file NetInterface.hh.

Boolean Groupsock::deleteIfNoMembers

Definition at line 136 of file Groupsock.hh.

destRecord* Groupsock::fDests
protected

Definition at line 167 of file Groupsock.hh.

Referenced by hasMultipleDestinations().

GroupEId Groupsock::fIncomingGroupEId
private

Definition at line 169 of file Groupsock.hh.

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

DirectedNetInterfaceSet Groupsock::fMembers
private

Definition at line 170 of file Groupsock.hh.

Referenced by members().

Boolean Groupsock::isSlave

Definition at line 137 of file Groupsock.hh.

NetInterfaceTrafficStats Groupsock::statsGroupIncoming

Definition at line 143 of file Groupsock.hh.

NetInterfaceTrafficStats Groupsock::statsGroupOutgoing

Definition at line 144 of file Groupsock.hh.

NetInterfaceTrafficStats Groupsock::statsGroupRelayedIncoming

Definition at line 145 of file Groupsock.hh.

NetInterfaceTrafficStats Groupsock::statsGroupRelayedOutgoing

Definition at line 146 of file Groupsock.hh.

NetInterfaceTrafficStats Groupsock::statsIncoming
static

Definition at line 139 of file Groupsock.hh.

NetInterfaceTrafficStats Groupsock::statsOutgoing
static

Definition at line 140 of file Groupsock.hh.

NetInterfaceTrafficStats Groupsock::statsRelayedIncoming
static

Definition at line 141 of file Groupsock.hh.

NetInterfaceTrafficStats Groupsock::statsRelayedOutgoing
static

Definition at line 142 of file Groupsock.hh.


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