INET Framework for OMNeT++/OMNEST
inet::sctp::SCTPSendStream Class Reference

#include <SCTPSendStream.h>

Inheritance diagram for inet::sctp::SCTPSendStream:

Public Member Functions

 SCTPSendStream (SCTPAssociation *assoc, const uint16 id)
 
 ~SCTPSendStream ()
 
cPacketQueue * getStreamQ () const
 
cPacketQueue * getUnorderedStreamQ () const
 
uint32 getNextStreamSeqNum ()
 
uint32 getBytesInFlight () const
 
void setNextStreamSeqNum (const uint16 num)
 
void setBytesInFlight (const uint32 bytes)
 
bool getFragInProgress () const
 
void setFragInProgress (const bool frag)
 
uint16 getStreamId () const
 
void setStreamId (const uint16 id)
 
void deleteQueue ()
 

Protected Attributes

SCTPAssociationassoc
 
uint16 streamId
 
uint16 nextStreamSeqNum
 
uint32 bytesInFlight
 
bool resetRequested
 
bool fragInProgress
 
cPacketQueue * streamQ
 
cPacketQueue * uStreamQ
 

Constructor & Destructor Documentation

inet::sctp::SCTPSendStream::SCTPSendStream ( SCTPAssociation assoc,
const uint16  id 
)
28 {
29  assoc = assoc_;
30  streamId = id;
31  nextStreamSeqNum = 0;
32  bytesInFlight = 0;
33  resetRequested = false;
34  fragInProgress = false;
35 
36  char queueName[64];
37  snprintf(queueName, sizeof(queueName), "OrderedSendQueue ID %d", id);
38  streamQ = new cPacketQueue(queueName);
39  snprintf(queueName, sizeof(queueName), "UnorderedSendQueue ID %d", id);
40  uStreamQ = new cPacketQueue(queueName);
41 }
cPacketQueue * streamQ
Definition: SCTPSendStream.h:47
SCTPAssociation * assoc
Definition: SCTPSendStream.h:41
uint16 nextStreamSeqNum
Definition: SCTPSendStream.h:43
uint16 streamId
Definition: SCTPSendStream.h:42
uint32 bytesInFlight
Definition: SCTPSendStream.h:44
uint16_t id
Definition: TCP_NSC.cc:85
bool fragInProgress
Definition: SCTPSendStream.h:46
cPacketQueue * uStreamQ
Definition: SCTPSendStream.h:48
bool resetRequested
Definition: SCTPSendStream.h:45
inet::sctp::SCTPSendStream::~SCTPSendStream ( )
44 {
45  deleteQueue();
46 }
void deleteQueue()
Definition: SCTPSendStream.cc:48

Member Function Documentation

void inet::sctp::SCTPSendStream::deleteQueue ( )

Referenced by ~SCTPSendStream().

49 {
50  SCTPDataMsg *datMsg;
51  SCTPSimpleMessage *smsg;
52  int32 count = streamQ->getLength();
53  while (!streamQ->isEmpty()) {
54  datMsg = check_and_cast<SCTPDataMsg *>(streamQ->pop());
55  smsg = check_and_cast<SCTPSimpleMessage *>(datMsg->decapsulate());
56  delete smsg;
57  delete datMsg;
58  count--;
59  }
60  while (!uStreamQ->isEmpty()) {
61  datMsg = check_and_cast<SCTPDataMsg *>(uStreamQ->pop());
62  smsg = check_and_cast<SCTPSimpleMessage *>(datMsg->decapsulate());
63  delete smsg;
64  delete datMsg;
65  }
66  delete streamQ;
67  delete uStreamQ;
68 }
cPacketQueue * streamQ
Definition: SCTPSendStream.h:47
int count(const std::vector< T > &v, const T &a)
Definition: stlutils.h:58
int32_t int32
Definition: Compat.h:31
cPacketQueue * uStreamQ
Definition: SCTPSendStream.h:48
uint32 inet::sctp::SCTPSendStream::getBytesInFlight ( ) const
inline
bool inet::sctp::SCTPSendStream::getFragInProgress ( ) const
inline
61 { return fragInProgress; };
bool fragInProgress
Definition: SCTPSendStream.h:46
uint32 inet::sctp::SCTPSendStream::getNextStreamSeqNum ( )

Referenced by inet::sctp::SCTPAssociation::makeDataVarFromDataMsg().

70  {
71  return nextStreamSeqNum;
72 };
uint16 nextStreamSeqNum
Definition: SCTPSendStream.h:43
uint16 inet::sctp::SCTPSendStream::getStreamId ( ) const
inline

Referenced by inet::sctp::SCTPAssociation::pathStreamSchedulerMapToPath().

63 { return streamId; };
uint16 streamId
Definition: SCTPSendStream.h:42
void inet::sctp::SCTPSendStream::setBytesInFlight ( const uint32  bytes)
inline
void inet::sctp::SCTPSendStream::setFragInProgress ( const bool  frag)
inline
62 { fragInProgress = frag; };
bool fragInProgress
Definition: SCTPSendStream.h:46
void inet::sctp::SCTPSendStream::setNextStreamSeqNum ( const uint16  num)

Referenced by inet::sctp::SCTPAssociation::makeDataVarFromDataMsg().

74  {
75  nextStreamSeqNum = num;
76 };
uint16 nextStreamSeqNum
Definition: SCTPSendStream.h:43
void inet::sctp::SCTPSendStream::setStreamId ( const uint16  id)
inline

Referenced by inet::sctp::SCTPAssociation::addOutStreams(), and inet::sctp::SCTPAssociation::initStreams().

64 { streamId = id; };
uint16 streamId
Definition: SCTPSendStream.h:42
uint16_t id
Definition: TCP_NSC.cc:85

Member Data Documentation

SCTPAssociation* inet::sctp::SCTPSendStream::assoc
protected

Referenced by SCTPSendStream().

uint32 inet::sctp::SCTPSendStream::bytesInFlight
protected

Referenced by SCTPSendStream().

bool inet::sctp::SCTPSendStream::fragInProgress
protected

Referenced by SCTPSendStream().

uint16 inet::sctp::SCTPSendStream::nextStreamSeqNum
protected
bool inet::sctp::SCTPSendStream::resetRequested
protected

Referenced by SCTPSendStream().

uint16 inet::sctp::SCTPSendStream::streamId
protected

Referenced by SCTPSendStream().

cPacketQueue* inet::sctp::SCTPSendStream::streamQ
protected

Referenced by deleteQueue(), and SCTPSendStream().

cPacketQueue* inet::sctp::SCTPSendStream::uStreamQ
protected

Referenced by deleteQueue(), and SCTPSendStream().


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