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
Collaboration diagram for Groupsock:
Collaboration graph

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


Private Member Functions

void removeDestinationFrom (destRecord *&dests, unsigned sessionId)

Private Attributes

GroupEId fIncomingGroupEId

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 ( )

Member Function Documentation

◆ addDestination()

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

◆ changeDestinationParameters()

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

◆ changePort()

Boolean Socket::changePort ( Port  newPort)

◆ createNewDestRecord()

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

◆ env()

UsageEnvironment& Socket::env ( ) const

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

Definition at line 114 of file Groupsock.hh.

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

References fIncomingGroupEId, and GroupEId::groupAddress().

◆ handleRead()

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

Reimplemented from OutputSocket.

◆ hasMultipleDestinations()

Boolean Groupsock::hasMultipleDestinations ( ) const

Definition at line 112 of file Groupsock.hh.

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

References fDests, destRecord::fNext, and NULL.

◆ isSSM()

Boolean Groupsock::isSSM ( ) const

Definition at line 121 of file Groupsock.hh.

121  {
122  return fIncomingGroupEId.isSSM();
123  }
GroupEId fIncomingGroupEId
Definition: Groupsock.hh:153
Boolean isSSM() const

References fIncomingGroupEId, and GroupEId::isSSM().

◆ lookupDestRecordFromDestination()

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

◆ 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 

◆ port()

Port Socket::port ( ) const

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)

◆ removeDestinationFrom()

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

◆ reset()

void Socket::reset ( )

◆ socketNum()

int Socket::socketNum ( ) const

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

Definition at line 117 of file Groupsock.hh.

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

References fIncomingGroupEId, and GroupEId::sourceFilterAddress().

◆ sourcePortNum()

portNumBits OutputSocket::sourcePortNum ( ) const

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

Definition at line 125 of file Groupsock.hh.

125 { return fIncomingGroupEId.ttl(); }
GroupEId fIncomingGroupEId
Definition: Groupsock.hh:153
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 

Field Documentation

◆ DebugLevel

int Socket::DebugLevel

Definition at line 57 of file NetInterface.hh.

◆ DefaultUsageEnvironment

UsageEnvironment* NetInterface::DefaultUsageEnvironment

Definition at line 32 of file NetInterface.hh.

◆ fDests

destRecord* Groupsock::fDests

Definition at line 151 of file Groupsock.hh.

Referenced by hasMultipleDestinations().

◆ fIncomingGroupEId

GroupEId Groupsock::fIncomingGroupEId

Definition at line 153 of file Groupsock.hh.

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

◆ 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

Definition at line 131 of file Groupsock.hh.

◆ statsOutgoing

NetInterfaceTrafficStats Groupsock::statsOutgoing

Definition at line 132 of file Groupsock.hh.

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